/* MP Prosto — глобальные стили */

:root {
  --mpb-primary: #3b82f6;
  --mpb-primary-hover: #2563eb;
  --mpb-primary-light: #dbeafe;
  --mpb-inventory-hero-bg:
    linear-gradient(135deg, rgba(2, 6, 23, 0.78) 0%, rgba(2, 6, 23, 0.32) 45%, rgba(2, 6, 23, 0.1) 100%),
    linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
  --mpb-white: #ffffff;
  --mpb-gray-50: #f9fafb;
  --mpb-gray-100: #f3f4f6;
  --mpb-gray-200: #e5e7eb;
  --mpb-gray-400: #9ca3af;
  --mpb-gray-500: #6b7280;
  --mpb-gray-600: #4b5563;
  --mpb-gray-700: #374151;
  --mpb-gray-900: #111827;
  --mpb-radius: 0.5rem;
  --mpb-radius-lg: 0.75rem;
}

/* Balance report */
.balance-page {
  color: #0f172a;
}

.balance-page__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.15rem;
  border: 1px solid #dbe5ef;
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.balance-page__title-block {
  min-width: 0;
}

.balance-page__title {
  margin: 0.25rem 0 0;
  color: #0f172a;
  font-size: clamp(1.55rem, 2.3vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.balance-page__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.balance-page__date-field,
.balance-page__segmented,
.balance-page__icon-btn {
  min-height: 2.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
  background: #fff;
}

.balance-page__date-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.65rem;
}

.balance-page__date-field svg {
  width: 1rem;
  height: 1rem;
  color: #64748b;
}

.balance-page__date-field input {
  width: 8.8rem;
  border: 0;
  outline: 0;
  color: #0f172a;
  background: transparent;
  font: inherit;
}

.balance-page__segmented {
  display: inline-flex;
  overflow: hidden;
}

.balance-page__segmented button {
  border: 0;
  border-right: 1px solid #e2e8f0;
  background: transparent;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0 0.8rem;
}

.balance-page__segmented button:last-child {
  border-right: 0;
}

.balance-page__segmented button.is-active {
  background: #0f172a;
  color: #ffffff;
}

.balance-page__icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.55rem;
  color: #0f172a;
  cursor: pointer;
}

.balance-page__icon-btn svg {
  width: 1rem;
  height: 1rem;
}

.balance-page__surface {
  border: 1px solid #dbe5ef;
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.balance-page__state {
  padding: 1.5rem;
  color: #475569;
  text-align: center;
}

.balance-page__state--error {
  color: #b91c1c;
  background: #fff1f2;
}

.balance-page__table-wrap {
  width: 100%;
  overflow: auto;
}

.balance-page__table {
  width: 100%;
  min-width: 56rem;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.balance-page__table th,
.balance-page__table td {
  height: 3.15rem;
  padding: 0.68rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.9rem;
  vertical-align: middle;
}

.balance-page__table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
}

.balance-page__table thead th span,
.balance-page__table thead th small {
  display: block;
}

.balance-page__table thead th small {
  margin-top: 0.18rem;
  color: #94a3b8;
  font-size: 0.7rem;
}

.balance-page__table .balance-page__pin {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 17rem;
  min-width: 17rem;
  text-align: left;
  box-shadow: 1px 0 0 #e2e8f0;
}

.balance-page__section-row th,
.balance-page__section-row td {
  background: #eef6ff;
  color: #0f172a;
  font-weight: 900;
}

.balance-page__section-row--assets th,
.balance-page__section-row--assets td {
  background: #eef6ff;
}

.balance-page__section-row--liabilities th,
.balance-page__section-row--liabilities td {
  background: #fff0ed;
}

.balance-page__section-row--equity th,
.balance-page__section-row--equity td {
  background: #ecfdf3;
}

.balance-page__section-row th {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.balance-page__section-row svg {
  width: 1rem;
  height: 1rem;
}

.balance-page__name {
  font-weight: 700;
}

.balance-page__row--level-0 .balance-page__name > span,
.balance-page__row--level-0 .balance-page__expand {
  padding-left: 1.35rem;
}

.balance-page__row--child .balance-page__name {
  color: #64748b;
  font-weight: 650;
}

.balance-page__row--child .balance-page__name > span {
  padding-left: 2.7rem;
}

.balance-page__row--child .balance-page__expand {
  padding-left: 2.7rem;
}

.balance-page__amount,
.balance-page__section-row td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.balance-page__amount-btn {
  max-width: 100%;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-weight: inherit;
  padding: 0.28rem 0.38rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.balance-page__amount-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.balance-page__expand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-align: left;
}

.balance-page__caret {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.16s ease;
}

.balance-page__caret.is-closed {
  transform: rotate(-45deg);
}

.balance-page__mobile-list {
  display: none;
}

.balance-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.balance-detail-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.48);
  cursor: pointer;
}

.balance-detail-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(58rem, calc(100vw - 2rem));
  max-height: min(44rem, calc(100dvh - 2rem));
  border: 1px solid #dbe5ef;
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.balance-detail-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.balance-detail-modal__eyebrow {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.balance-detail-modal__head h2 {
  margin: 0.15rem 0 0;
  color: #0f172a;
  font-size: 1.25rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.balance-detail-modal__head p {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

.balance-detail-modal__close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.balance-detail-modal__body {
  overflow: auto;
  padding: 1rem;
}

.balance-detail-modal__state,
.balance-detail-modal__empty {
  padding: 1.25rem;
  color: #64748b;
  text-align: center;
}

.balance-detail-modal__state--error {
  color: #b91c1c;
  background: #fff1f2;
}

.balance-detail-modal__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid #bad4ff;
  border-radius: 0.5rem;
  background: #f5f9ff;
}

.balance-detail-modal__total span,
.balance-detail-modal__formula span,
.balance-detail-modal__summary span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.balance-detail-modal__total strong {
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1.1;
  text-align: right;
  overflow-wrap: anywhere;
}

.balance-detail-modal__formula {
  margin-top: 0.75rem;
  padding: 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #ffffff;
}

.balance-detail-modal__formula p {
  margin: 0.35rem 0 0;
  color: #334155;
  line-height: 1.45;
}

.balance-detail-modal__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.balance-detail-modal__summary div {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.45rem;
  background: #f8fafc;
}

.balance-detail-modal__summary strong {
  display: block;
  margin-top: 0.25rem;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.balance-detail-modal__table-wrap {
  margin-top: 0.85rem;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

.balance-detail-modal__table {
  width: 100%;
  min-width: 42rem;
  border-collapse: separate;
  border-spacing: 0;
}

.balance-detail-modal__table th,
.balance-detail-modal__table td {
  padding: 0.58rem 0.7rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.84rem;
  text-align: left;
  vertical-align: top;
}

.balance-detail-modal__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.balance-detail-modal__table tr:last-child td {
  border-bottom: 0;
}

.balance-detail-modal__table td[data-kind="amount"],
.balance-detail-modal__table td[data-kind="unit_cost"],
.balance-detail-modal__table td[data-kind="quantity"],
.balance-detail-modal__table td[data-kind="fact_income"],
.balance-detail-modal__table td[data-kind="fact_expense"],
.balance-detail-modal__table td[data-kind="purchase_amount"],
.balance-detail-modal__table td[data-kind="paid_amount"],
.balance-detail-modal__table td[data-kind="count"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .balance-page__header {
    flex-direction: column;
  }

  .balance-page__controls {
    width: 100%;
    justify-content: stretch;
  }

  .balance-page__date-field {
    flex: 1 1 12rem;
  }

  .balance-page__date-field input {
    width: 100%;
  }

  .balance-page__segmented {
    flex: 1 1 12rem;
  }

  .balance-page__segmented button {
    flex: 1;
  }

}

@media (max-width: 680px) {
  .balance-page {
    margin: 0;
  }

  .balance-page__header {
    padding: 1rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .balance-page__controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .balance-page__date-field,
  .balance-page__segmented,
  .balance-page__icon-btn {
    width: 100%;
  }

  .balance-page__icon-btn {
    min-height: 2.65rem;
  }

  .balance-page__surface {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .balance-page__table-wrap {
    display: none;
  }

  .balance-page__mobile-list {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f1f5f9;
  }

  .balance-page__period-card {
    border: 1px solid #dbe5ef;
    border-radius: 0.5rem;
    background: #ffffff;
    overflow: hidden;
  }

  .balance-page__period-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 0.85rem;
    background: #0f172a;
    color: #ffffff;
  }

  .balance-page__period-card > header span {
    font-size: 0.9rem;
    font-weight: 850;
  }

  .balance-page__period-card > header strong {
    color: #cbd5e1;
    font-size: 0.78rem;
  }

  .balance-page__mobile-section {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
  }

  .balance-page__mobile-section:last-child {
    border-bottom: 0;
  }

  .balance-page__mobile-total,
  .balance-page__mobile-row,
  .balance-page__mobile-children div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(6rem, auto);
    gap: 0.75rem;
    align-items: baseline;
  }

  .balance-page__mobile-total {
    margin-bottom: 0.45rem;
    font-weight: 900;
  }

  .balance-page__mobile-row {
    padding: 0.35rem 0;
    color: #334155;
    font-size: 0.9rem;
  }

  .balance-page__mobile-row strong,
  .balance-page__mobile-total strong,
  .balance-page__mobile-children strong {
    text-align: right;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  .balance-page__mobile-total .balance-page__amount-btn,
  .balance-page__mobile-row .balance-page__amount-btn,
  .balance-page__mobile-children .balance-page__amount-btn {
    justify-self: end;
  }

  .balance-page__mobile-children {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.25rem;
    margin-top: 0.25rem;
    padding: 0.45rem 0 0 0.65rem;
    border-left: 2px solid #cbd5e1;
    color: #64748b;
    font-size: 0.84rem;
  }

  .balance-detail-modal {
    padding: 0.45rem;
  }

  .balance-detail-modal__dialog {
    width: calc(100vw - 0.9rem);
    max-height: calc(100dvh - 0.9rem);
  }

  .balance-detail-modal__head,
  .balance-detail-modal__body {
    padding: 0.8rem;
  }

  .balance-detail-modal__summary {
    grid-template-columns: 1fr;
  }

  .balance-detail-modal__total {
    align-items: flex-start;
    flex-direction: column;
  }

  .balance-detail-modal__total strong {
    text-align: left;
  }
}

/* External Яндекс ID suggest layer must stay under sticky headers and app modals. */
[data-mpb-yandex-suggest-layer="true"] {
  z-index: 90 !important;
}

/* Sales / Соты */
.sales-cells-page {
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fafc 46%, #ffffff 100%);
  min-height: calc(100vh - 4rem);
}

.sales-cells-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.sales-cells-settings-btn,
.sales-cells-toolbar button,
.sales-cells-settings-panel button,
.sales-cell-card__top button {
  font-family: inherit;
}

.sales-cells-settings-btn {
  border: 1px solid #cfd9e7;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  min-height: 2.45rem;
  padding: 0 0.9rem;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.sales-cells-toolbar {
  margin: 1.05rem 2.25rem 0.9rem 0;
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) auto auto;
  align-items: end;
  gap: 0.85rem;
}

.sales-cells-field {
  display: grid;
  gap: 0.32rem;
}

.sales-cells-field > span {
  font-size: 0.64rem;
  color: #748198;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.sales-cells-date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.42rem;
}

.sales-cells-date-range input {
  width: 100%;
  min-height: 2.42rem;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 0 0.62rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.sales-cells-date-range span {
  color: #a8b3c3;
}

.sales-cells-quick,
.sales-cells-history-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  padding: 0.22rem;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.sales-cells-quick button,
.sales-cells-history-toggle button {
  min-height: 2rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  padding: 0 0.62rem;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.sales-cells-history-toggle button.is-active {
  background: #e9f2ff;
  color: #1d4ed8;
}

.account-create-page__shell {
  width: 100%;
  margin: 1.25rem auto;
}

.account-create-page__shell--success {
  margin-top: auto;
  margin-bottom: auto;
}

.account-create-page__success {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border: 1px solid rgba(147, 197, 253, 0.82);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 15% 8%, rgba(56, 189, 248, 0.22), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #eff6ff 54%, #ecfdf5 100%);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.16);
  padding: 2rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  text-align: center;
  animation: account-create-success-in 0.42s ease-out both;
}

.account-create-page__success::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.72) 42%, transparent 72%);
  transform: translateX(-110%);
  animation: account-create-success-shine 1.25s ease-out 0.12s both;
  pointer-events: none;
}

.account-create-page__success-icon {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34);
  display: grid;
  place-items: center;
}

.account-create-page__success-icon span {
  width: 1.75rem;
  height: 0.95rem;
  border-left: 4px solid #ffffff;
  border-bottom: 4px solid #ffffff;
  transform: rotate(-45deg) translate(2px, -2px);
  border-radius: 2px;
}

.account-create-page__success-kicker {
  margin: 0 0 0.45rem;
  color: #2563eb;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-create-page__success h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.account-create-page__success-text {
  max-width: 470px;
  margin: 0.8rem auto 0;
  color: #475569;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 650;
}

.account-create-page__marketing-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.72rem;
  align-items: start;
  margin-top: 0.15rem;
  padding: 0.82rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(147, 197, 253, 0.55);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
  cursor: pointer;
  user-select: none;
}

.account-create-page__marketing-consent input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.account-create-page__marketing-consent-box {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.08rem;
  border-radius: 0.42rem;
  border: 1.5px solid rgba(148, 163, 184, 0.9);
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
  display: inline-grid;
  place-items: center;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.account-create-page__marketing-consent-box::after {
  content: "";
  width: 0.42rem;
  height: 0.68rem;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: border-color 0.18s ease;
}

.account-create-page__marketing-consent input:checked + .account-create-page__marketing-consent-box {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.account-create-page__marketing-consent input:checked + .account-create-page__marketing-consent-box::after {
  border-color: #ffffff;
}

.account-create-page__marketing-consent input:focus-visible + .account-create-page__marketing-consent-box {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.account-create-page__marketing-consent-text {
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.45;
  font-weight: 560;
}

@keyframes account-create-success-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes account-create-success-shine {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(110%);
  }
}

.sales-cells-alert,
.sales-cells-save-note {
  margin: 0.5rem 2.25rem 0.25rem 0;
}

.sales-cells-save-note {
  color: #166534;
  font-size: 0.78rem;
  font-weight: 700;
}

.sales-cells-summary {
  margin: 0.7rem 2.25rem 1rem 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.sales-cells-summary div {
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #fff;
  padding: 0.72rem 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.sales-cells-summary span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.sales-cells-summary strong {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 900;
}

.sales-cells-grid {
  margin: 0 2.25rem 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.82rem;
}

.sales-cells-loading {
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  padding: 2rem;
  color: #64748b;
  font-weight: 750;
  text-align: center;
}

.sales-cell-card {
  min-height: 220px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #fff;
  padding: 0.9rem;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 0.62rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  position: relative;
  overflow: hidden;
}

.sales-cell-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #3b82f6;
}

.sales-cell-card--positive::before {
  background: #16a34a;
}

.sales-cell-card--negative::before {
  background: #e11d48;
}

.sales-cell-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.sales-cell-card__group {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  border-radius: 6px;
  background: #eef2ff;
  color: #334155;
  padding: 0 0.45rem;
  font-size: 0.64rem;
  font-weight: 850;
}

.sales-cell-card h2 {
  margin: 0.48rem 0 0;
  color: #0f172a;
  font-size: 0.92rem;
  line-height: 1.22;
  font-weight: 850;
}

.sales-cell-card__top button {
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.sales-cell-card__value {
  color: #020617;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.08;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.sales-cell-card__compare,
.sales-cell-card__delta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
  font-size: 0.76rem;
}

.sales-cell-card__compare span,
.sales-cell-card__delta span {
  color: #7b8797;
  font-weight: 700;
}

.sales-cell-card__compare strong {
  color: #334155;
  font-weight: 850;
  text-align: right;
}

.sales-cell-card__delta {
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.48rem 0.56rem;
}

.sales-cell-card__delta strong {
  font-size: 0.88rem;
  font-weight: 900;
}

.sales-cell-card__delta.is-positive strong {
  color: #15803d;
}

.sales-cell-card__delta.is-negative strong {
  color: #be123c;
}

.sales-cell-card__delta.is-neutral strong {
  color: #475569;
}

.sales-cell-card__bars {
  height: 56px;
  align-self: flex-end;
  display: flex;
  align-items: flex-end;
  gap: 0.24rem;
  padding-top: 0.35rem;
}

.sales-cell-card__bars span {
  flex: 1 1 0;
  min-width: 4px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #2563eb, #7dd3fc);
  opacity: 0.86;
}

.sales-cell-card--positive .sales-cell-card__bars span {
  background: linear-gradient(180deg, #16a34a, #86efac);
}

.sales-cell-card--negative .sales-cell-card__bars span {
  background: linear-gradient(180deg, #e11d48, #fda4af);
}

.sales-cells-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(4px);
}

.sales-cells-settings-panel {
  width: min(520px, calc(100vw - 1rem));
  height: 100%;
  background: #fff;
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.18);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.sales-cells-settings-panel__head,
.sales-cells-settings-panel__foot {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sales-cells-settings-panel__foot {
  border-top: 1px solid #e2e8f0;
  border-bottom: none;
}

.sales-cells-settings-panel__head span,
.sales-cells-settings-panel__foot span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 750;
}

.sales-cells-settings-panel__head h2 {
  margin: 0.18rem 0 0;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 900;
}

.sales-cells-settings-panel__head > button,
.sales-cells-settings-panel__foot > button {
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  min-height: 2.2rem;
  padding: 0 0.75rem;
  font-weight: 850;
  cursor: pointer;
}

.sales-cells-settings-panel__body {
  overflow: auto;
  padding: 0.75rem;
  display: grid;
  align-content: start;
  gap: 0.48rem;
}

.sales-cells-setting-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.62rem;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #fff;
  padding: 0.58rem;
}

.sales-cells-setting-row.is-hidden {
  background: #f8fafc;
  opacity: 0.78;
}

.sales-cells-setting-row__order {
  display: flex;
  gap: 0.22rem;
}

.sales-cells-setting-row__order button {
  width: 1.86rem;
  height: 1.86rem;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
}

.sales-cells-setting-row__order button:disabled {
  opacity: 0.36;
  cursor: default;
}

.sales-cells-setting-row__text {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.sales-cells-setting-row__text strong {
  color: #0f172a;
  font-size: 0.86rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sales-cells-setting-row__text span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 750;
}

.sales-cells-setting-row > button {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  min-height: 2rem;
  padding: 0 0.62rem;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.sales-cells-setting-row > button.is-hidden {
  border-color: #bbf7d0;
  color: #15803d;
  background: #f0fdf4;
}

@media (max-width: 900px) {
  .sales-cells-hero,
  .sales-cells-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .sales-cells-hero {
    display: grid;
  }

  .sales-cells-settings-btn {
    width: 100%;
  }

  .sales-cells-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sales-cells-toolbar,
  .sales-cells-summary,
  .sales-cells-grid {
    margin-right: 0;
  }

  .sales-cells-date-range {
    grid-template-columns: 1fr;
  }

  .sales-cells-date-range span {
    display: none;
  }

  .sales-cells-quick,
  .sales-cells-history-toggle {
    overflow-x: auto;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-geist-sans), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Единый шрифт для полей ввода даты и всех форм — как в основном интерфейсе */
input,
select,
textarea,
button {
  font-family: inherit;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  font-family: var(--font-geist-sans), system-ui, sans-serif;
}

/* Layout */
.mpb-layout {
  display: flex;
  min-height: 100vh;
}

.mpb-sidebar {
  width: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0;
  background: var(--mpb-white);
  border-right: 1px solid var(--mpb-gray-200);
  box-shadow: 1px 0 0 0 var(--mpb-gray-100);
  overflow: visible;
  /* Важно: сайдбар должен быть поверх контента */
  position: relative;
  z-index: 200;
}

.mpb-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow: visible;
}

.mpb-sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mpb-sidebar-divider {
  width: 1.5rem;
  height: 1px;
  background: var(--mpb-gray-200);
  margin: 0.5rem 0;
}

.mpb-sidebar-dropdown-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--mpb-radius);
  color: var(--mpb-gray-500);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mpb-sidebar-dropdown-trigger:hover {
  background: var(--mpb-primary-light);
  color: var(--mpb-primary);
}

/* Мост между иконкой и flyout — не даёт панели скрыться при движении мыши */
.mpb-sidebar-dropdown-trigger::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 0;
  width: 12px;
  height: 100%;
  background: transparent;
}

.mpb-sidebar-flyout {
  position: fixed;
  left: 4rem; /* ширина сайдбара */
  top: 0;    /* переопределяется через JS при hover */
  min-width: 14rem;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.375rem;
  background: var(--mpb-white);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07);
  border: 1px solid var(--mpb-gray-200);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
  z-index: 9999;
  scrollbar-width: thin;
  scrollbar-color: var(--mpb-gray-200) transparent;
}

.mpb-sidebar-dropdown-trigger:hover .mpb-sidebar-flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
}

.mpb-sidebar-flyout-title {
  padding: 0.5rem 0.875rem 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mpb-gray-400);
  border-bottom: 1px solid var(--mpb-gray-100);
  margin-bottom: 0.25rem;
}

.mpb-sidebar-flyout-section {
  padding: 0.55rem 0.875rem 0.2rem;
  font-size: 0.6375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mpb-gray-400);
  margin-top: 0.25rem;
}

.mpb-sidebar-flyout-section:first-child {
  margin-top: 0;
}

/* Иконки-кнопки в сайдбаре (прямые ссылки, не внутри flyout) */
.mpb-sidebar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--mpb-radius);
  color: var(--mpb-gray-500);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.mpb-sidebar a:hover {
  background: var(--mpb-primary-light);
  color: var(--mpb-primary);
}

.mpb-sidebar a.mpb-active {
  background: var(--mpb-primary);
  color: var(--mpb-white);
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

/* Ссылки внутри flyout-панели — идут ПОСЛЕ .mpb-sidebar a чтобы перебить его */
.mpb-sidebar-flyout a {
  display: block;
  width: auto;
  height: auto;
  padding: 0.45rem 0.875rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mpb-gray-700);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}

.mpb-sidebar-flyout a:hover {
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-900);
}

.mpb-sidebar-flyout a.mpb-active {
  background: var(--mpb-primary-light);
  color: var(--mpb-primary);
  font-weight: 600;
}

.dashboard-page .dashboard-kpi-card .kpi-mini-bar {
  margin-top: 0.75rem;
  width: 100%;
  min-height: 48px;
}

.mpb-main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header */
.mpb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 8vw, 11rem);
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--mpb-gray-200);
  position: relative;
  z-index: 140;
}

.mpb-header-left {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  min-width: 0;
}

.mpb-brand-link {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
  text-decoration: none;
  flex-shrink: 0;
}

.mpb-header-nav {
  display: flex;
  gap: 0.125rem;
  padding: 0.25rem;
  background: var(--mpb-gray-100);
  border-radius: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.mpb-header-nav--desktop {
  display: flex;
}

.mpb-header-group {
  display: inline-flex;
  align-items: center;
}

.mpb-header-group-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mpb-gray-500);
  padding: 0.5rem 1.25rem;
  border-radius: var(--mpb-radius);
  cursor: default;
  transition: background 0.15s, color 0.15s;
}

.mpb-header-group-label--active {
  background: var(--mpb-gray-900);
  color: var(--mpb-white);
}

.mpb-header-group--dropdown:hover .mpb-header-group-label:not(.mpb-header-group-label--active) {
  background: var(--mpb-white);
  color: var(--mpb-gray-900);
}

.mpb-header-group--dropdown {
  position: relative;
}

.mpb-header-group--dropdown .mpb-header-group-label {
  padding-right: 1.25rem;
}

.mpb-header-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 2px;
  min-width: 10rem;
  padding: 0.25rem;
  background: var(--mpb-white);
  border-radius: var(--mpb-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid var(--mpb-gray-200);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 50;
}

.mpb-header-group--dropdown:hover .mpb-header-dropdown {
  opacity: 1;
  pointer-events: auto;
}

.mpb-header-dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--mpb-radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mpb-gray-600);
  text-decoration: none;
  white-space: nowrap;
}

.mpb-header-dropdown a:hover {
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-900);
}

.mpb-header-dropdown a.mpb-active {
  background: var(--mpb-primary-light);
  color: var(--mpb-primary);
}

.mpb-header-dropdown-section {
  display: block;
  padding: 0.5rem 0.75rem 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mpb-gray-500);
  margin-top: 0.35rem;
  pointer-events: none;
}

.mpb-header-dropdown-section:first-of-type {
  margin-top: 0;
}

.mpb-header-nav a {
  padding: 0.5rem 1.25rem;
  border-radius: var(--mpb-radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mpb-gray-500);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.mpb-header-nav a:hover {
  background: var(--mpb-white);
  color: var(--mpb-gray-900);
}

.mpb-header-nav a.mpb-active {
  background: var(--mpb-gray-900);
  color: var(--mpb-white);
}

.mpb-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mpb-header-right .mpb-day {
  font-size: 0.875rem;
  color: var(--mpb-gray-500);
}

.mpb-trial-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2rem;
  padding: 0.34rem 0.58rem;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 999px;
  background: linear-gradient(135deg, #f0fdfa 0%, #eff6ff 54%, #ffffff 100%);
  color: #075985;
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.09);
  white-space: nowrap;
  outline: none;
}

.mpb-trial-badge__dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: #14b8a6;
  box-shadow: 0 0 0 0.22rem rgba(20, 184, 166, 0.13);
}

.mpb-trial-badge__text {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.mpb-trial-badge strong {
  font-size: 0.86rem;
  font-weight: 800;
  color: #64748b;
}

.mpb-trial-badge--expired {
  border-color: rgba(248, 113, 113, 0.28);
  background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 56%, #ffffff 100%);
  color: #991b1b;
}

.mpb-trial-badge--expired strong {
  color: #64748b;
}

.mpb-trial-badge--expired .mpb-trial-badge__dot {
  background: #ef4444;
  box-shadow: 0 0 0 0.22rem rgba(239, 68, 68, 0.12);
}

.mpb-trial-popover {
  position: absolute;
  top: calc(100% + 0.62rem);
  right: 0;
  width: 18.5rem;
  padding: 0.85rem;
  border-radius: 0.78rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16), 0 8px 18px rgba(15, 23, 42, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.2rem);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 180;
}

.mpb-trial-popover::before {
  content: "";
  position: absolute;
  top: -0.4rem;
  right: 1.15rem;
  width: 0.75rem;
  height: 0.75rem;
  background: #ffffff;
  border-left: 1px solid rgba(226, 232, 240, 0.95);
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  transform: rotate(45deg);
}

.mpb-trial-badge:hover .mpb-trial-popover,
.mpb-trial-badge:focus-within .mpb-trial-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mpb-trial-popover__eyebrow {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
}

.mpb-trial-popover__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.42rem 0;
  border-top: 1px solid #f1f5f9;
  color: #64748b;
  font-size: 0.82rem;
}

.mpb-trial-popover__row strong {
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 850;
}

.mpb-trial-popover__action {
  display: block;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #f1f5f9;
}

.mpb-trial-popover__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 0.62rem;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.28);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}

.mpb-trial-popover__btn:hover,
.mpb-trial-popover__btn:focus-visible {
  filter: brightness(1.04);
  box-shadow: 0 12px 26px rgba(14, 165, 233, 0.34);
}

.mpb-trial-popover__btn:active {
  transform: translateY(1px);
}

.mpb-header-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.mpb-header-icon-btn:hover {
  background: #f3f4f6;
  color: #6b7280;
}

.mpb-onboarding-launcher {
  position: relative;
  border: none;
  border-radius: 0.5rem;
  color: #9ca3af;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.25rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.mpb-onboarding-launcher:hover {
  background: #f3f4f6;
  color: #6b7280;
}

.mpb-onboarding-launcher svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.mpb-prep-launcher {
  position: relative;
  border: none;
  border-radius: 0.5rem;
  color: #9ca3af;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.25rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.mpb-prep-launcher:hover {
  background: #f3f4f6;
  color: #6b7280;
}

.mpb-prep-launcher.is-done {
  color: #059669;
}

.mpb-prep-launcher svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.mpb-prep-launcher__dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.46);
  animation: mpb-prep-pulse 1.7s ease-out infinite;
}

@keyframes mpb-prep-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.52); }
  72% { box-shadow: 0 0 0 0.55rem rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.mpb-onboarding-launcher__dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: #facc15;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.5);
  animation: mpb-onboarding-pulse 1.55s ease-out infinite;
}

@keyframes mpb-onboarding-pulse {
  0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.58); }
  72% { box-shadow: 0 0 0 0.55rem rgba(250, 204, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}

.mpb-header-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.mpb-header-profile-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
}

.mpb-header-profile-caret {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg) translateY(-1px);
  flex-shrink: 0;
}

.mpb-header-mobile-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--mpb-gray-200);
  background: #fff;
  color: var(--mpb-gray-700);
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.mpb-header-mobile-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.mpb-header-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 240;
  touch-action: none;
  overscroll-behavior: contain;
}

.mpb-header-mobile-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.mpb-header-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: auto;
  width: min(92vw, 23rem);
  height: 100dvh;
  max-height: 100dvh;
  background: var(--mpb-white);
  border-left: 1px solid var(--mpb-gray-200);
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 250;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  visibility: hidden;
  pointer-events: none;
}

@supports not (height: 100dvh) {
  .mpb-header-mobile-drawer {
    height: 100vh;
    max-height: 100vh;
  }
}

.mpb-header-mobile-drawer--open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.mpb-header-mobile-drawer-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.mpb-header-mobile-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

.mpb-header-mobile-drawer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mpb-gray-900);
}

.mpb-header-mobile-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mpb-gray-200);
  background: #fff;
  color: var(--mpb-gray-600);
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.mpb-header-mobile-home-link {
  display: block;
  border-radius: 0.7rem;
  border: 1px solid var(--mpb-gray-200);
  background: #fff;
  padding: 0.74rem 0.82rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mpb-gray-700);
  text-decoration: none;
  margin-bottom: 0.7rem;
}

.mpb-header-mobile-home-link.mpb-active {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--mpb-gray-900);
}

.mpb-header-mobile-group {
  border: 1px solid var(--mpb-gray-200);
  border-radius: 0.82rem;
  background: #f8fafc;
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.mpb-header-mobile-group-toggle {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--mpb-gray-900);
  text-align: left;
  padding: 0.72rem 0.82rem;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.mpb-header-mobile-group-caret {
  font-size: 0.92rem;
  color: var(--mpb-gray-500);
  transition: transform 0.18s ease;
}

.mpb-header-mobile-group-toggle.is-open .mpb-header-mobile-group-caret {
  transform: rotate(180deg);
}

.mpb-header-mobile-group-body {
  display: none;
  padding: 0 0.52rem 0.62rem;
}

.mpb-header-mobile-group-body.is-open {
  display: block;
}

.mpb-header-mobile-section {
  display: block;
  padding: 0.72rem 0.44rem 0.26rem;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mpb-gray-500);
}

.mpb-header-mobile-group-body a {
  display: block;
  padding: 0.52rem 0.45rem;
  border-radius: 0.58rem;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--mpb-gray-700);
  text-decoration: none;
}

.mpb-header-mobile-group-body a:hover {
  background: #edf2f7;
  color: var(--mpb-gray-900);
}

.mpb-header-mobile-group-body a.mpb-active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
}

.mpb-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, var(--mpb-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden;
}

.mpb-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content */
.mpb-content {
  position: relative;
  flex: 1;
  overflow: auto;
  padding: 1.5rem clamp(1rem, 8vw, 11rem);
  background: var(--mpb-white);
}

@media (min-width: 1025px) {
  .mpb-header-mobile-overlay,
  .mpb-header-mobile-drawer {
    display: none;
  }
}

@media (max-width: 1024px) {
  .mpb-header {
    padding: 0.82rem 1rem;
    gap: 0.5rem;
  }

  .mpb-header-left {
    gap: 0.62rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  .mpb-brand-link {
    font-size: 0.9rem;
    letter-spacing: 0.06em;
  }

  .mpb-header-nav--desktop {
    display: none;
  }

  .mpb-header-mobile-toggle {
    display: inline-flex;
  }

  .mpb-header-right {
    flex: 0 0 auto;
    gap: 0.46rem;
  }

  .mpb-header-right .mpb-day {
    display: none;
  }

  .mpb-trial-badge {
    padding-inline: 0.52rem;
  }

  .mpb-header-profile-name,
  .mpb-header-profile-caret {
    display: none;
  }
}

@media (max-width: 768px) {
  .mpb-content {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .mpb-header {
    padding: 0.68rem 0.62rem;
    gap: 0.4rem;
  }

  .mpb-header-left {
    gap: 0.46rem;
  }

  .mpb-brand-link {
    font-size: clamp(0.72rem, 3vw, 0.82rem);
    letter-spacing: 0.035em;
  }

  .mpb-header-mobile-toggle {
    gap: 0.34rem;
    padding: 0.38rem 0.58rem;
    font-size: 0.8rem;
  }

  .mpb-header-right {
    gap: 0.28rem;
  }

  .mpb-trial-badge {
    min-height: 2rem;
    padding: 0.3rem 0.44rem;
  }

  .mpb-trial-badge strong {
    font-size: 0.78rem;
  }

  .mpb-trial-popover {
    right: -4.6rem;
    width: min(18rem, calc(100vw - 1rem));
    padding: 0.95rem;
  }

  .mpb-trial-popover::before {
    right: 5.4rem;
  }

  .mpb-trial-popover__btn {
    min-height: 2.85rem;
    font-size: 0.9rem;
  }

  .mpb-header-icon-btn,
  .mpb-onboarding-launcher,
  .mpb-prep-launcher {
    width: 2rem;
    height: 2rem;
    padding: 0;
    flex: 0 0 auto;
  }

  .mpb-header-icon-btn svg,
  .mpb-onboarding-launcher svg,
  .mpb-prep-launcher svg {
    width: 1.12rem;
    height: 1.12rem;
  }

  .mpb-avatar {
    width: 2.12rem;
    height: 2.12rem;
  }
}

@media (max-width: 430px) {
  .mpb-trial-badge {
    min-height: 1.9rem;
    padding: 0.26rem 0.4rem;
  }

  .mpb-trial-badge strong {
    font-size: 0.72rem;
  }

  .mpb-trial-popover {
    position: fixed;
    top: auto;
    right: 0.5rem;
    left: 0.5rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
    padding: 1rem;
    border-radius: 0.9rem;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22), 0 10px 24px rgba(15, 23, 42, 0.12);
    transform: translateY(0.35rem);
  }

  .mpb-trial-popover::before {
    display: none;
  }

  .mpb-trial-badge:hover .mpb-trial-popover,
  .mpb-trial-badge:focus-within .mpb-trial-popover {
    transform: translateY(0);
  }

  .mpb-trial-popover__btn {
    min-height: 3rem;
    font-size: 0.94rem;
  }

  .mpb-header-mobile-toggle span {
    display: none;
  }

  .mpb-header-mobile-toggle {
    width: 2.35rem;
    height: 2.35rem;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 374px) {
  .mpb-header {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .mpb-brand-link {
    max-width: 7.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.mpb-space {
  width: 100%;
  margin: 0;
}

.mpb-muted {
  color: var(--mpb-gray-500);
  font-size: 0.875rem;
}

.mpb-card {
  background: var(--mpb-white);
  border-radius: var(--mpb-radius-lg);
  border: 1px solid var(--mpb-gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}

.mpb-btn-primary {
  padding: 0.5rem 1.25rem;
  border-radius: var(--mpb-radius);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--mpb-primary);
  color: var(--mpb-white);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.mpb-btn-primary:hover:not(:disabled) {
  background: var(--mpb-primary-hover);
}

.mpb-btn-secondary {
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: #f9fafb;
  color: var(--mpb-gray-700);
  border: 1px solid var(--mpb-gray-200);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.06s ease;
}

.mpb-btn-secondary:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: var(--mpb-gray-300);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transform: translateY(-0.5px);
}

.mpb-btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.mpb-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--mpb-gray-900);
}

.mpb-section-desc {
  font-size: 0.875rem;
  color: var(--mpb-gray-500);
  margin: 0 0 1rem;
}

/* Dashboard — главная страница (профессиональный стиль) */
.dashboard-page {
  --dashboard-radius: 0.75rem;
  --dashboard-radius-sm: 0.5rem;
}

.dashboard-page__card {
  background: var(--mpb-white);
  border-radius: var(--dashboard-radius);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08), 0 8px 20px rgba(15, 23, 42, 0.04);
  border: 1px solid var(--mpb-gray-200);
  overflow: hidden;
}

.trial-status-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(10rem, 14rem);
  gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 1.25rem 2.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.96) 0%, rgba(239, 246, 255, 0.96) 52%, rgba(255, 255, 255, 0.98) 100%);
  overflow: hidden;
}

.trial-status-banner__icon {
  position: relative;
  z-index: 1;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #0f766e;
  border: 1px solid rgba(20, 184, 166, 0.24);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.11);
}

.trial-status-banner__icon svg {
  width: 1.22rem;
  height: 1.22rem;
}

.trial-status-banner__content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.trial-status-banner__eyebrow {
  margin-bottom: 0.18rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0f766e;
}

.trial-status-banner h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0;
  color: #0f172a;
}

.trial-status-banner p {
  margin: 0.32rem 0 0;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.45;
}

.trial-status-banner__meter {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.5rem;
  justify-items: stretch;
}

.trial-status-banner__meter span {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.trial-status-banner__track {
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.trial-status-banner__track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #2563eb);
}

.trial-status-banner--expired {
  background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 54%, #ffffff 100%);
}

.trial-status-banner--expired .trial-status-banner__track i {
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.trial-status-banner--expired .trial-status-banner__icon {
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.3);
}

.trial-status-banner--expired .trial-status-banner__eyebrow {
  color: #b91c1c;
}

/* Hero */
.dashboard-page__hero {
  position: relative;
  padding: 3rem 2.25rem;
  background: #3b82f6;
  border-radius: var(--dashboard-radius);
  color: white;
}

.dashboard-page__hero-grid {
  display: flex;
  gap: 1.75rem;
  align-items: stretch;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.dashboard-page__hero-main {
  flex: 1.1;
  min-width: 320px;
}

.dashboard-page__hero-side {
  flex: 0.9;
  min-width: 300px;
  display: flex;
  align-items: stretch;
}

.dashboard-page__hero-inner {
  max-width: 44rem;
}

.dashboard-page__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.92;
  margin-bottom: 1.15rem;
}

.dashboard-page__badge svg {
  width: 1rem;
  height: 1rem;
}

.dashboard-page__title {
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 0.8rem;
  line-height: 1.08;
}

.dashboard-page__hero-inner::after {
  content: "";
  display: block;
  width: 4rem;
  height: 3px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  margin-top: 1.35rem;
}

.dashboard-page__subtitle {
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1.5rem;
  opacity: 0.9;
}

.dashboard-page__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.05rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background 0.2s, transform 0.1s, border-color 0.2s;
}

.dashboard-page__cta:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.dashboard-page__hero-stat-card {
  position: relative;
  flex: 1;
  overflow: hidden;
  padding: 1.45rem 1.45rem 1.2rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--mpb-gray-900);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.dashboard-page__hero-stat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.dashboard-page__hero-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.dashboard-page__hero-stat-value {
  margin-top: 0.45rem;
  font-size: clamp(1.9rem, 2vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #0f172a;
  line-height: 1;
}

.dashboard-page__hero-stat-meta {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.8rem;
  color: #64748b;
}

.dashboard-page__hero-stat-meta strong {
  color: #0f172a;
}

.dashboard-page__hero-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: none;
}

.dashboard-page__hero-stat-chip[data-positive="true"] {
  background: #dcfce7;
  color: #15803d;
}

.dashboard-page__hero-stat-chip[data-positive="false"] {
  background: #fee2e2;
  color: #dc2626;
}

.dashboard-page__hero-stat-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-page__hero-stat-card .mpb-mini-bar-chart {
  margin-top: 0.15rem;
}

.dashboard-page__hero-stat-card--link {
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.dashboard-page__hero-stat-card--link:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.dashboard-page__hero-stat-card--link:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}

/* KPI */
.dashboard-page__kpi {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  padding: 2rem 2.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.dashboard-page__kpi--planning-row {
  padding-bottom: 0;
  margin-bottom: 1.75rem;
}

.dashboard-page__kpi--planning-row .dashboard-page__planning-summary-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-color: #dbe3ee;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.dashboard-page__kpi--primary {
  flex-wrap: nowrap;
}

.dashboard-page__kpi--primary .dashboard-page__kpi-card {
  min-width: 0;
  flex: 1 1 0;
}

.dashboard-page__kpi--primary .dashboard-page__kpi-card--summary-primary {
  flex: 1.05 1 0;
}

.dashboard-page__kpi--primary .dashboard-page__kpi-card--pay-today {
  flex: 0.95 1 0;
  min-width: 0;
}

.dashboard-page__kpi-card {
  flex: 1 1 220px;
  min-width: 220px;
  padding: 1.35rem 1.4rem;
  background: #fff;
  border-radius: 1.1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.dashboard-page__kpi-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

/* Карточки с мини-графиками в ряду аналитики */
.dashboard-page__kpi-card--analytics-chart {
  padding: 1.25rem;
  min-width: 240px;
}
.dashboard-page__kpi-card--analytics-chart .dashboard-page__kpi-label {
  margin-bottom: 0.2rem;
}
.dashboard-page__kpi-chart-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.9rem;
}

/* Цветной акцент у карточек аналитики (точка у заголовка) */
.dashboard-page__kpi-card--accent-orders .dashboard-page__kpi-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 0.5rem;
  vertical-align: 0.15em;
}
.dashboard-page__kpi-card--accent-pdp .dashboard-page__kpi-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0ea5e9;
  margin-right: 0.5rem;
  vertical-align: 0.15em;
}
.dashboard-page__kpi-card--accent-cr .dashboard-page__kpi-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7c3aed;
  margin-right: 0.5rem;
  vertical-align: 0.15em;
}
.dashboard-page__kpi-card--accent-impressions .dashboard-page__kpi-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  margin-right: 0.5rem;
  vertical-align: 0.15em;
}

.dashboard-page__kpi-card.accent {
  background: var(--mpb-white);
  border-left: 4px solid var(--mpb-primary);
}

.dashboard-page__kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.45rem;
}

.dashboard-page__kpi-label--fcf-today {
  width: 90%;
}

.dashboard-page__kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--mpb-gray-900);
  font-variant-numeric: tabular-nums;
}

.dashboard-page__kpi-value--compact {
  margin-bottom: 0.25rem;
  font-size: 1.35rem;
}

.dashboard-page__ads-kpi-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.dashboard-page__ads-kpi-side {
  min-width: 0;
}

.dashboard-page__ads-kpi-side--right {
  text-align: right;
}

.dashboard-page__ads-kpi-side-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-page__ads-kpi-side-value {
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.dashboard-page__today-ads-card {
  position: relative;
  overflow: hidden;
  border-color: #e5e7eb;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98) 58%),
    #fff;
}

.dashboard-page__today-ads-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.dashboard-page__today-ads-updated {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 300;
  line-height: 1.2;
  white-space: nowrap;
}

.dashboard-page__today-ads-list {
  display: grid;
  gap: 0.56rem;
}

.dashboard-page__today-ads-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.52rem 0.62rem;
}

.dashboard-page__today-ads-label {
  min-width: 0;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
}

.dashboard-page__today-ads-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
  min-width: 6.7rem;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-page__today-ads-dot {
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.dashboard-page__kpi-card--ads-orders {
  display: flex;
  flex-direction: column;
}

.dashboard-page__ads-orders-chart-wrap {
  flex: 1 1 auto;
  min-height: 170px;
}

.dashboard-page__planning-summary-card {
  flex: 1 1 100%;
  min-width: 100%;
  position: relative;
  overflow: hidden;
}

.dashboard-page__planning-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid #e2e8f0;
}

.dashboard-page__planning-summary-month {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.78rem;
}

.dashboard-page__planning-summary-featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 0.55rem;
  min-width: min(360px, 45%);
}

.dashboard-page__planning-summary-feature {
  min-width: 0;
  padding: 0.62rem 0.7rem;
  border: 1px solid #dbe3ee;
  border-radius: 0.65rem;
  background: #ffffff;
}

.dashboard-page__planning-summary-feature span,
.dashboard-page__planning-summary-feature small {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-page__planning-summary-feature strong {
  display: block;
  margin-top: 0.22rem;
  color: #0f172a;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-page__planning-summary-feature small {
  margin-top: 0.12rem;
  color: #475569;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-page__planning-summary-feature[data-tone="good"] {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.dashboard-page__planning-summary-feature[data-tone="warning"] {
  border-color: #fed7aa;
  background: #fff7ed;
}

.dashboard-page__planning-summary-feature[data-tone="good"] strong,
.dashboard-page__planning-summary-row[data-tone="good"] .dashboard-page__planning-cell--completion strong {
  color: #047857;
}

.dashboard-page__planning-summary-feature[data-tone="warning"] strong,
.dashboard-page__planning-summary-row[data-tone="warning"] .dashboard-page__planning-cell--completion strong {
  color: #b45309;
}

.dashboard-page__planning-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.25rem;
}

.dashboard-page__planning-summary-column {
  min-width: 0;
}

.dashboard-page__planning-summary-column--totals {
  padding-right: 1.1rem;
  border-right: 1px solid #e2e8f0;
}

.dashboard-page__planning-summary-column--products {
  padding-left: 0.15rem;
}

.dashboard-page__planning-summary-table--totals .dashboard-page__planning-summary-row:not(.dashboard-page__planning-summary-row--head) {
  min-height: 2.05rem;
  padding: 0.55rem 0;
}

.dashboard-page__planning-summary-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 750;
}

.dashboard-page__planning-summary-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.45rem;
  background: #eef2ff;
  color: #2563eb;
  flex-shrink: 0;
}

.dashboard-page__planning-summary-title-icon--products {
  background: #ecfdf5;
  color: #059669;
}

.dashboard-page__planning-summary-title-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.dashboard-page__planning-summary-table {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.dashboard-page__planning-summary-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(104px, 0.56fr) minmax(104px, 0.56fr) minmax(76px, 0.36fr);
  align-items: center;
  gap: 0.65rem;
  min-height: 2.35rem;
  padding: 0.48rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.dashboard-page__planning-summary-row:last-child {
  border-bottom: 0;
}

.dashboard-page__planning-summary-row--head {
  min-height: 1.6rem;
  padding-top: 0;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-page__planning-summary-row--head span:not(:first-child) {
  text-align: right;
}

.dashboard-page__planning-summary-row--aggregate {
  margin-top: 0.1rem;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  border-radius: 0.5rem;
  background: #eef2f7;
  border-bottom: 0;
}

.dashboard-page__planning-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
}

.dashboard-page__planning-cell strong {
  color: #0f172a;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-page__planning-progress {
  width: min(94px, 100%);
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.dashboard-page__planning-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #94a3b8;
}

.dashboard-page__planning-summary-row[data-tone="good"] .dashboard-page__planning-progress span {
  background: #10b981;
}

.dashboard-page__planning-summary-row[data-tone="warning"] .dashboard-page__planning-progress span {
  background: #f59e0b;
}

.dashboard-page__planning-summary-name {
  min-width: 0;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
}

.dashboard-page__planning-product {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-page__planning-product .dashboard-page__abc-photo {
  width: 34px;
  height: 46px;
  border-radius: 0.55rem;
}

.dashboard-page__planning-product .dashboard-page__abc-photo-img {
  object-fit: cover;
}

.dashboard-page__planning-product-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.dashboard-page__planning-product-name {
  min-width: 0;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-page__planning-product-sku {
  color: #64748b;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-page__planning-head-label--short {
  display: none;
}

.dashboard-page__planning-summary-state,
.dashboard-page__planning-summary-empty {
  padding: 0.9rem 0;
  color: #64748b;
  font-size: 0.84rem;
}

.dashboard-page__planning-summary-state--error {
  color: #b91c1c;
}

.dashboard-page__kpi--secondary .dashboard-page__planning-summary-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-color: #dbe3ee;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.dashboard-page__kpi-label--with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-page__kpi-card.accent .dashboard-page__kpi-value {
  color: var(--mpb-primary);
}

.dashboard-page__kpi-card--wide {
  flex: 2 1 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard-page__kpi-card--link {
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.dashboard-page__kpi-card--link:hover {
  background-color: var(--mpb-gray-50);
  border-color: var(--mpb-primary);
}

.dashboard-page__kpi-card--summary {
  flex: 0 1 auto;
  min-width: 160px;
  text-decoration: none;
  color: inherit;
}

.dashboard-page__kpi-card--summary-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 100%;
}

.dashboard-page__kpi-card--summary-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem 0.75rem 0 0;
  background: linear-gradient(135deg, var(--mpb-primary) 0%, #4338ca 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-page__kpi-card--summary-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.dashboard-page__kpi-card--summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.dashboard-page__kpi-card--summary-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--mpb-primary);
}

.dashboard-page__cf-chart {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-page__cf-chart-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--mpb-gray-600);
}

.dashboard-page__cf-value {
  font-weight: 600;
  color: var(--mpb-gray-900);
}

.dashboard-page__cf-bars {
  display: flex;
  gap: 1rem;
}

.dashboard-page__cf-hist {
  margin-top: 0.5rem;
  height: 4rem;
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
}

.dashboard-page__cf-hist-bar-wrapper {
  flex: 1 1 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dashboard-page__cf-hist-bar {
  width: 10px;
  border-radius: 999px 999px 0 0;
  background: var(--mpb-gray-200);
  transition: height 0.2s ease, background 0.2s ease;
}

.dashboard-page__cf-hist-bar--pos {
  background: #4ade80;
}

.dashboard-page__cf-hist-bar--neg {
  background: #f97373;
}

.dashboard-page__cf-hist-bar--neutral {
  background: var(--mpb-gray-300);
}

.dashboard-page__kpi-sub {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #475569;
}

.dashboard-page__kpi-card--risk {
  border-left: 4px solid #dc2626;
}

.dashboard-page__kpi-card--risk .dashboard-page__kpi-value {
  color: #b91c1c;
}

.dashboard-page__kpi-card .kpi-mini-bar {
  margin-top: 0.75rem;
}

.dashboard-page__kpi-icon {
  margin-top: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--dashboard-radius-sm);
  background: var(--mpb-gray-200);
  color: var(--mpb-gray-600);
}

.dashboard-page__kpi-card.accent .dashboard-page__kpi-icon {
  background: var(--mpb-primary-light);
  color: var(--mpb-primary);
}

.dashboard-page__kpi-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.dashboard-page__pay-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  font-size: 0.8rem;
  color: var(--mpb-gray-600);
  line-height: 1.4;
}
.dashboard-page__pay-list li {
  padding: 0.15rem 0;
  border-bottom: 1px solid var(--mpb-gray-100);
}
.dashboard-page__pay-list li:last-child {
  border-bottom: none;
}

/* Оплатить сегодня — последняя карточка в ряду, стиль как у остальных */
.dashboard-page__kpi-card--pay-today {
  flex: 0.95 1 260px;
  min-width: 240px;
}
.dashboard-page__kpi-card--pay-today-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.dashboard-page__kpi-card--pay-today-header .dashboard-page__kpi-label {
  margin-bottom: 0;
}
.dashboard-page__kpi-card--pay-today-sum {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mpb-gray-900);
  font-variant-numeric: tabular-nums;
}
.dashboard-page__pay-list--styled {
  margin-top: 0.75rem;
}
.dashboard-page__pay-list--styled li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--mpb-gray-100);
}
.dashboard-page__pay-list-desc {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--mpb-gray-700);
}
.dashboard-page__pay-list-amount {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--mpb-gray-900);
  font-variant-numeric: tabular-nums;
}
.dashboard-page__pay-list-more {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--mpb-gray-600);
}
.dashboard-page__pay-today-empty {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--mpb-gray-500);
}

.dashboard-page__kpi-card--summary-primary {
  flex: 1.15 1 280px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.dashboard-page__kpi-card--fcf {
  flex: 0.9 1 0;
}

.dashboard-page__kpi-card--abc {
  flex: 1 1 100%;
}

.dashboard-page__kpi-card--placement {
  flex: 1 1 100%;
  min-width: 0;
}

.dashboard-page__placement-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
}

.dashboard-page__placement-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.dashboard-page__placement-meta-sep {
  color: #94a3b8;
}

.dashboard-page__placement-days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.dashboard-page__placement-day {
  display: inline-flex;
  align-items: baseline;
  gap: 0.38rem;
  min-height: 1.85rem;
  padding: 0.34rem 0.52rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.45rem;
  background: #f8fafc;
  color: #475569;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-page__placement-day strong {
  color: #0f172a;
  font-size: 0.82rem;
}

.dashboard-page__placement-top-title {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 0.2rem;
}

.dashboard-page__placement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
}

.dashboard-page__placement-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
}

.dashboard-page__placement-photo {
  width: 2.08rem;
  height: 2.82rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  border: 1px solid #d7e3f4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-page__placement-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-page__placement-photo-fallback {
  color: var(--mpb-gray-400);
  font-size: 0.72rem;
}

.dashboard-page__placement-text {
  min-width: 0;
}

.dashboard-page__placement-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-page__placement-meta {
  margin-top: 0.14rem;
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-page__placement-cost {
  flex: 0 0 auto;
  min-width: 5.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.dashboard-page__placement-cost-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.38rem;
  white-space: nowrap;
}

.dashboard-page__placement-cost-row span {
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
}

.dashboard-page__placement-cost-row strong {
  font-size: 0.86rem;
  font-weight: 750;
}

.dashboard-page__placement-cost-row--m2d strong {
  color: #475569;
  font-size: 0.78rem;
}

.dashboard-page__abc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.dashboard-page__abc-period {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 0.75rem 0.8rem;
  min-width: 0;
}

.dashboard-page__abc-period-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
}

.dashboard-page__abc-empty {
  font-size: 0.8rem;
}

.dashboard-page__abc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dashboard-page__abc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.2rem 0;
}

.dashboard-page__abc-item--aggregate {
  padding: 0.42rem 0.5rem;
  border-radius: 0.5rem;
  background: #f8fafc;
}

.dashboard-page__abc-item-main {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-page__abc-photo {
  width: 26px;
  height: 26px;
  border-radius: 0.45rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.dashboard-page__abc-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-page__abc-photo-fallback {
  font-size: 0.62rem;
}

.dashboard-page__abc-item-text {
  min-width: 0;
  flex: 1;
}

.dashboard-page__abc-item-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-page__abc-item-name--aggregate {
  font-weight: 700;
}

.dashboard-page__abc-item-sku {
  font-size: 0.72rem;
  margin-top: 0.12rem;
}

.dashboard-page__abc-item-values {
  flex-shrink: 0;
  text-align: right;
}

.dashboard-page__abc-item-profit {
  font-weight: 700;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.dashboard-page__abc-item-delta {
  font-size: 0.72rem;
  margin-top: 0.1rem;
}

.dashboard-page__kpi-card--expenses-period {
  flex: 1 1 360px;
  min-width: 320px;
}

.dashboard-page__kpi--secondary {
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.78) 0%, rgba(255, 255, 255, 0) 100%);
}

.dashboard-page__kpi--secondary .dashboard-page__kpi-card {
  background: #f8fafc;
  box-shadow: none;
  border-color: #cbd5e1;
}

.dashboard-page__kpi--secondary .dashboard-page__kpi-value {
  font-size: 1.35rem;
}

.dashboard-page__pnl-overview {
  padding: 1.55rem 2.25rem 1.85rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.dashboard-page__pnl-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-page__pnl-overview-title {
  margin-top: 0.25rem;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: 0;
}

.dashboard-page__pnl-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-page__pnl-period {
  min-width: 0;
  padding: 1.15rem;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-top-width: 3px;
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.dashboard-page__pnl-period--positive {
  border-top-color: #22c55e;
}

.dashboard-page__pnl-period--negative {
  border-top-color: #ef4444;
}

.dashboard-page__pnl-period--neutral {
  border-top-color: #94a3b8;
}

.dashboard-page__pnl-period:hover {
  border-color: #93c5fd;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.dashboard-page__pnl-period:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}

.dashboard-page__pnl-period-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.dashboard-page__pnl-period-head strong {
  color: #0f172a;
  font-size: 1rem;
}

.dashboard-page__pnl-period-head span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-page__pnl-status {
  flex: 0 0 auto;
  padding: 0.28rem 0.48rem;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
}

.dashboard-page__pnl-status--positive {
  color: #15803d;
  background: #dcfce7;
}

.dashboard-page__pnl-status--negative {
  color: #b91c1c;
  background: #fee2e2;
}

.dashboard-page__pnl-status--neutral {
  color: #475569;
  background: #e2e8f0;
}

.dashboard-page__pnl-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.dashboard-page__pnl-result-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.dashboard-page__pnl-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.dashboard-page__pnl-quick-item {
  min-width: 0;
  padding: 0.72rem 0.78rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #f8fafc;
}

.dashboard-page__pnl-metric {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #f8fafc;
}

.dashboard-page__pnl-metric--wide {
  grid-column: 1 / -1;
}

.dashboard-page__pnl-metric span,
.dashboard-page__pnl-quick-item span,
.dashboard-page__pnl-expenses-title {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-page__pnl-metric strong {
  display: block;
  margin-top: 0.22rem;
  color: #0f172a;
  font-size: 1.3rem;
  line-height: 1.15;
}

.dashboard-page__pnl-quick-item strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.2rem;
  line-height: 1.15;
}

.dashboard-page__pnl-metric--result strong {
  font-size: 1.42rem;
}

.dashboard-page__pnl-metric small,
.dashboard-page__pnl-quick-item small {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.25;
}

.dashboard-page__pnl-metric b {
  font-size: 0.76rem;
}

.dashboard-page__pnl-metric .is-positive,
.dashboard-page__pnl-quick-item .is-positive,
.dashboard-page__pnl-expenses .is-positive {
  color: #16a34a;
}

.dashboard-page__pnl-metric .is-negative,
.dashboard-page__pnl-quick-item .is-negative,
.dashboard-page__pnl-expenses .is-negative {
  color: #dc2626;
}

.dashboard-page__pnl-expenses {
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}

.dashboard-page__pnl-expenses-title {
  margin-bottom: 0.35rem;
}

/* Теги */
.dashboard-page__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--mpb-gray-100);
}

.dashboard-page__tags button {
  padding: 0.45rem 0.9rem;
  border-radius: var(--dashboard-radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-600);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.dashboard-page__tags button:hover {
  background: var(--mpb-gray-200);
  color: var(--mpb-gray-800);
}

.dashboard-page__tags button.is-active {
  background: var(--mpb-primary);
  color: var(--mpb-white);
}

/* График */
.dashboard-page__chart {
  margin: 0;
  border-bottom: 1px solid #e2e8f0;
}

.dashboard-page__chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 2.25rem 1.1rem;
  border-bottom: 1px solid #eef2f7;
}

.dashboard-page__chart-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--mpb-gray-900);
  margin: 0 0 0.35rem;
}

.dashboard-page__chart-desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #475569;
  margin: 0;
}

.dashboard-page__kpi-meta--chart {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
}

.dashboard-page__btn-secondary {
  padding: 0.62rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--mpb-white);
  color: var(--mpb-gray-700);
  border: 1px solid var(--mpb-gray-200);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.dashboard-page__btn-secondary:hover:not(:disabled) {
  background: var(--mpb-gray-50);
  border-color: var(--mpb-gray-300);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.dashboard-page__btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dashboard-page__chart-body {
  padding: 1.4rem 2.25rem 1.8rem;
  min-height: 200px;
}

.dashboard-page__chart-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: stretch;
}

.dashboard-page__chart-wrap {
  border-radius: 1rem;
  overflow: hidden;
}

.dashboard-page__btn-secondary--link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.dashboard-page__alert {
  padding: 0.875rem 1rem;
  border-radius: var(--dashboard-radius-sm);
  font-size: 0.875rem;
}

.dashboard-page__alert--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.dashboard-page__alert--empty {
  background: var(--mpb-gray-50);
  color: var(--mpb-gray-600);
  border: 1px solid var(--mpb-gray-200);
}

/* Блоки дополнительных графиков и гистограм */
.dashboard-page__charts-block {
  border-bottom: 1px solid var(--mpb-gray-100);
}

.dashboard-page__charts-header {
  padding: 1.25rem 2rem 0.75rem;
  border-bottom: 1px solid var(--mpb-gray-100);
}

.dashboard-page__charts-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mpb-gray-900);
  margin: 0 0 0.25rem;
}

.dashboard-page__charts-desc {
  font-size: 0.8125rem;
  color: var(--mpb-gray-500);
  margin: 0;
}

.dashboard-page__charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

@media (min-width: 900px) {
  .dashboard-page__charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dashboard-page__chart-cell {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--mpb-gray-100);
  border-right: 1px solid var(--mpb-gray-100);
}

.dashboard-page__chart-cell:nth-child(2n) {
  border-right: none;
}

.dashboard-page__chart-cell--wide {
  grid-column: 1 / -1;
  border-right: none;
}

.dashboard-page__chart-cell-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--mpb-gray-800);
  margin: 0 0 0.75rem;
}

.dashboard-chart-variant {
  border-radius: var(--dashboard-radius);
  overflow: hidden;
  min-height: 220px;
}

/* Быстрые ссылки */
.dashboard-page__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
}

.dashboard-page__quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--mpb-white);
  border: 1px solid var(--mpb-gray-200);
  border-radius: var(--dashboard-radius-sm);
  color: var(--mpb-gray-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.dashboard-page__quick-link:hover {
  background: var(--mpb-gray-50);
  border-color: var(--mpb-primary);
  color: var(--mpb-primary);
}

@media (max-width: 1200px) {
  .dashboard-page__hero {
    padding: 2.2rem 1.5rem;
  }

  .trial-status-banner {
    padding: 1.15rem 1.5rem;
  }

  .dashboard-page__kpi {
    gap: 1rem;
    padding: 1.5rem;
  }

  .dashboard-page__kpi--primary {
    flex-wrap: wrap;
  }

  .dashboard-page__chart-body {
    padding: 1.2rem 1.5rem 1.4rem;
  }

  .dashboard-page__pnl-overview {
    padding: 1.35rem 1.5rem 1.55rem;
  }

  .dashboard-page__pnl-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .trial-status-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .trial-status-banner__meter {
    grid-column: 1 / -1;
  }

  .trial-status-banner__meter span {
    justify-self: start;
  }

  .dashboard-page__hero-grid {
    flex-direction: column;
    gap: 1rem;
  }

  .dashboard-page__hero-main,
  .dashboard-page__hero-side {
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
  }

  .dashboard-page__hero-inner {
    max-width: none;
  }

  .dashboard-page__kpi-card,
  .dashboard-page__kpi-card--analytics-chart,
  .dashboard-page__kpi-card--summary-primary,
  .dashboard-page__kpi-card--pay-today,
  .dashboard-page__kpi-card--fcf,
  .dashboard-page__kpi-card--placement,
  .dashboard-page__kpi-card--expenses-period {
    min-width: 0;
    flex: 1 1 100%;
  }

  .dashboard-page__placement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* В primary-ряду был более специфичный flex: 1 1 0; на мобильном
     явно переопределяем, чтобы карточки не схлопывались в узкие колонки. */
  .dashboard-page__kpi--primary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .dashboard-page__kpi--primary .dashboard-page__kpi-card,
  .dashboard-page__kpi--primary .dashboard-page__kpi-card--summary-primary,
  .dashboard-page__kpi--primary .dashboard-page__kpi-card--pay-today {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .dashboard-page__planning-summary-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dashboard-page__kpi-label--fcf-today {
    width: auto;
  }

  .dashboard-page__nearest-supplies {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-page__nearest-supplies-table {
    min-width: 440px;
  }

  .dashboard-page__pnl-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mpb-space.dashboard-page {
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .dashboard-page__card {
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: none;
  }

  .dashboard-page__hero,
  .trial-status-banner,
  .dashboard-page__kpi,
  .dashboard-page__pnl-overview,
  .dashboard-page__chart-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .dashboard-page__pnl-overview-head {
    align-items: flex-start;
  }

  .dashboard-page__pnl-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-page__pnl-quick {
    grid-template-columns: 1fr;
  }

  .dashboard-page__pnl-result-row {
    grid-template-columns: 1fr;
  }

  .dashboard-page__pnl-metric--wide {
    grid-column: auto;
  }

  .dashboard-page__planning-summary-card {
    min-width: 0;
    padding: 1.1rem 0.9rem 1rem;
  }

  .dashboard-page__planning-summary-head {
    align-items: stretch;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .dashboard-page__planning-summary-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .dashboard-page__planning-summary-feature {
    padding: 0.58rem 0.62rem;
  }

  .dashboard-page__planning-summary-feature strong {
    font-size: 0.92rem;
  }

  .dashboard-page__planning-summary-table {
    gap: 0.55rem;
    overflow: visible;
  }

  .dashboard-page__planning-summary-row--head {
    display: none;
  }

  .dashboard-page__planning-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    min-width: 0;
    min-height: 0;
    padding: 0.72rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  }

  .dashboard-page__planning-summary-row--aggregate {
    padding: 0.72rem;
    background: #f8fafc;
  }

  .dashboard-page__planning-summary-name,
  .dashboard-page__planning-product {
    grid-column: 1 / -1;
  }

  .dashboard-page__planning-summary-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .dashboard-page__planning-cell {
    align-items: flex-start;
    gap: 0.24rem;
    min-height: 3rem;
    padding: 0.5rem 0.55rem;
    border-radius: 0.55rem;
    background: #f8fafc;
    text-align: left;
  }

  .dashboard-page__planning-cell::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .dashboard-page__planning-cell strong {
    max-width: 100%;
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dashboard-page__planning-progress {
    width: 100%;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-card {
    padding: 0.7rem 0.55rem 0.65rem;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-grid {
    gap: 0;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-column--totals {
    padding-right: 0;
    border-right: none;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-column--products {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    padding-left: 0;
    border-top: 1px solid #dbe3ee;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-title {
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-table {
    gap: 0;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-row--head {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.72fr) minmax(0, 0.72fr) minmax(0, 0.42fr);
    gap: 0.25rem;
    min-height: 1.1rem;
    padding: 0 0 0.18rem;
    font-size: 0.56rem;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #e2e8f0;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-head-label--full {
    display: none;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-head-label--short {
    display: inline;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-row {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.72fr) minmax(0, 0.72fr) minmax(0, 0.42fr);
    gap: 0.25rem;
    min-height: 0;
    padding: 0.24rem 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border-bottom: 1px solid #eef2f7;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-table--totals .dashboard-page__planning-summary-row:not(.dashboard-page__planning-summary-row--head) {
    min-height: 2.75rem;
    padding: 0.48rem 0;
    align-items: center;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-name,
  .dashboard-page__kpi--planning-row .dashboard-page__planning-product {
    grid-column: auto;
    min-width: 0;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-table--totals .dashboard-page__planning-summary-name {
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    text-overflow: ellipsis;
    align-self: center;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-cell {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    text-align: right;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-cell::before {
    content: none;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-cell strong {
    font-size: 0.66rem;
    line-height: 1.15;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-cell--completion {
    gap: 0.15rem;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-progress {
    display: none;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-product {
    gap: 0.22rem;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-table--products .dashboard-page__planning-summary-row,
  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-table--products .dashboard-page__planning-summary-row--head {
    grid-template-columns: minmax(0, 0.56fr) minmax(0, 0.74fr) minmax(0, 0.74fr) minmax(0, 0.4fr);
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-product .dashboard-page__abc-photo {
    width: 44px;
    height: 56px;
    border-radius: 0.5rem;
    flex-shrink: 0;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-product-name {
    display: none;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-product-text {
    display: none;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-row--aggregate {
    padding: 0.22rem 0.18rem;
    margin-top: 0.08rem;
    border-radius: 0.3rem;
    background: #f1f5f9;
    border-bottom: 0;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-empty {
    padding: 0.45rem 0;
    font-size: 0.72rem;
  }

  .trial-status-banner {
    gap: 0.82rem;
  }

  .trial-status-banner__icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.72rem;
  }

  .trial-status-banner h2 {
    font-size: 1rem;
  }

  .dashboard-page__hero-stat-head {
    gap: 0.65rem;
  }

  .dashboard-page__hero-stat-icon {
    width: 2.3rem;
    height: 2.3rem;
  }

  .dashboard-page__kpi-meta--chart {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
  }

  .dashboard-page__kpi-meta--chart span {
    margin-left: 0 !important;
  }

  .dashboard-page__nearest-supplies {
    margin-left: -0.2rem;
    margin-right: -0.2rem;
    padding: 0 0.2rem 0.15rem;
  }

  .dashboard-page__abc-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page__placement-head {
    flex-direction: column;
    gap: 0.45rem;
  }

  .dashboard-page__placement-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page__abc-item {
    align-items: flex-start;
  }

  .dashboard-page__abc-item-values {
    min-width: 6.3rem;
  }

  .dashboard-page__ads-kpi-summary {
    margin-bottom: 0.72rem;
  }
}

@media (max-width: 520px) {
  .dashboard-page__planning-summary-featured,
  .dashboard-page__planning-summary-row {
    grid-template-columns: 1fr;
  }

  .dashboard-page__planning-cell {
    min-height: 0;
  }

  .dashboard-page__planning-product-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-row,
  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-row--head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr) minmax(0, 0.62fr) minmax(0, 0.34fr);
    gap: 0.18rem;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-cell strong {
    font-size: 0.6rem;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-table--totals .dashboard-page__planning-summary-name {
    font-size: 0.76rem;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-table--totals .dashboard-page__planning-summary-row:not(.dashboard-page__planning-summary-row--head) {
    min-height: 2.55rem;
    padding: 0.42rem 0;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-row--head {
    font-size: 0.52rem;
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-table--products .dashboard-page__planning-summary-row,
  .dashboard-page__kpi--planning-row .dashboard-page__planning-summary-table--products .dashboard-page__planning-summary-row--head {
    grid-template-columns: minmax(0, 0.58fr) minmax(0, 0.72fr) minmax(0, 0.72fr) minmax(0, 0.36fr);
  }

  .dashboard-page__kpi--planning-row .dashboard-page__planning-product .dashboard-page__abc-photo {
    width: 40px;
    height: 50px;
  }
}

@media (max-width: 640px) {
  .dashboard-page__hero {
    padding: 1.25rem 1rem 1.1rem;
  }

  .dashboard-page__title {
    font-size: clamp(1.55rem, 7.8vw, 2rem);
    line-height: 1.12;
  }

  .dashboard-page__subtitle {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .dashboard-page__hero-stat-card {
    padding: 1rem;
    border-radius: 1rem;
  }

  .dashboard-page__hero-stat-value {
    font-size: 1.6rem;
  }

  .dashboard-page__hero-stat-meta {
    gap: 0.5rem;
    font-size: 0.75rem;
  }

  .dashboard-page__kpi {
    gap: 0.75rem;
    padding: 1rem;
  }

  .dashboard-page__kpi--secondary {
    padding-top: 0.8rem;
    padding-bottom: 1rem;
  }

  .dashboard-page__kpi-card {
    padding: 1rem;
    border-radius: 0.9rem;
  }

  .dashboard-page__kpi-value {
    font-size: 1.2rem;
  }

  .dashboard-page__kpi-value--compact {
    font-size: 1.08rem;
  }

  .dashboard-page__kpi-chart-subtitle {
    margin-bottom: 0.65rem;
  }

  .dashboard-page__chart-body {
    min-height: 0;
    padding: 0.95rem 1rem 1rem;
  }

  .dashboard-page__chart-row {
    gap: 0.75rem;
  }

  .dashboard-page__abc-period {
    padding: 0.65rem 0.7rem;
  }

  .dashboard-page__abc-item-main {
    gap: 0.35rem;
  }

  .dashboard-page__abc-item-name {
    font-size: 0.79rem;
  }

  .dashboard-page__abc-item-sku,
  .dashboard-page__abc-item-delta {
    font-size: 0.68rem;
  }

  .dashboard-page__abc-item-profit {
    font-size: 0.79rem;
  }

  .dashboard-page__ads-kpi-summary {
    gap: 0.55rem;
  }

  .dashboard-page__ads-kpi-side-label {
    font-size: 0.66rem;
  }

  .dashboard-page__ads-kpi-side-value {
    font-size: 1.02rem;
  }

  .dashboard-page__ads-orders-chart-wrap {
    min-height: 160px;
  }
}

/* Legacy dashboard classes (for other refs) */
.dashboard-page .dashboard-hero {
  padding: 2rem;
  border-radius: var(--mpb-radius-lg);
  background: linear-gradient(135deg, var(--mpb-primary) 0%, var(--mpb-primary-hover) 50%, #1d4ed8 100%);
  color: white;
  margin-bottom: 1.5rem;
}

.dashboard-page .dashboard-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.dashboard-page .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}

.dashboard-page .hero-desc {
  font-size: 0.9375rem;
  margin: 0 0 1rem;
  opacity: 0.95;
}

.dashboard-page .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.2);
  border-radius: var(--mpb-radius);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.15s;
}

.dashboard-page .hero-cta:hover {
  background: rgba(255,255,255,0.3);
}

.dashboard-kpi-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-page .dashboard-kpi-card {
  flex: 1 1 160px;
  min-width: 0;
  padding: 1.25rem 1.5rem;
  background: var(--mpb-white);
  border-radius: 0.75rem 0.75rem 0 0;
  border: 1px solid var(--mpb-gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dashboard-page .dashboard-kpi-card .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mpb-gray-500);
  margin-bottom: 0.35rem;
}

.dashboard-page .dashboard-kpi-card .value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mpb-gray-900);
}

.dashboard-page .dashboard-kpi-card.accent .value {
  color: var(--mpb-primary);
}

.dashboard-page .dashboard-kpi-card .icon-wrap {
  margin-top: 0.75rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-500);
}

.dashboard-page .dashboard-kpi-card.accent .icon-wrap {
  background: var(--mpb-primary-light);
  color: var(--mpb-primary);
}

.dashboard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.dashboard-tags button {
  padding: 0.4rem 0.75rem;
  border-radius: var(--mpb-radius);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-600);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dashboard-tags button.is-active {
  background: var(--mpb-primary);
  color: var(--mpb-white);
}

.dashboard-chart-card {
  margin-bottom: 1.5rem;
}

.dashboard-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--mpb-gray-200);
}

.dashboard-chart-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--mpb-gray-900);
}

.dashboard-chart-header .chart-desc {
  font-size: 0.8125rem;
  color: var(--mpb-gray-500);
  margin: 0;
}

.dashboard-chart-body {
  padding: 1rem 1.5rem;
  min-height: 200px;
}

.dashboard-chart-body.has-data {
  padding: 1rem 1.5rem;
}

.dashboard-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--mpb-radius);
  font-size: 0.875rem;
}

.dashboard-alert.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.dashboard-alert.empty {
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-600);
}

.dashboard-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-quick a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--mpb-white);
  border: 1px solid var(--mpb-gray-200);
  border-radius: var(--mpb-radius);
  color: var(--mpb-gray-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.15s, border-color 0.15s;
}

.dashboard-quick a:hover {
  background: var(--mpb-gray-50);
  border-color: var(--mpb-primary);
  color: var(--mpb-primary);
}

/* Chart */
.mpb-chart-modern {
  width: 100%;
}

.mpb-chart-tooltip {
  padding: 0.5rem 0.75rem;
  background: var(--mpb-white);
  border: 1px solid var(--mpb-gray-200);
  border-radius: var(--mpb-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-size: 0.8125rem;
}

.mpb-chart-tooltip-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--mpb-gray-900);
}

.mpb-chart-tooltip-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.mpb-chart-tooltip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Мини-графики в карточках (аналитика) */
.mpb-mini-bar-chart {
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.mpb-mini-bar-chart .recharts-cartesian-grid-horizontal line {
  stroke: var(--mpb-gray-100);
  stroke-width: 1;
}
.mpb-mini-bar-chart .recharts-xAxis .recharts-text {
  font-size: 0.6875rem;
  font-weight: 500;
  fill: var(--mpb-gray-500);
  letter-spacing: 0.02em;
}

/* Costs page — Затраты и доходы (профессиональный стиль) */
/* ========== Costs Page — Modern Redesign ========== */
.costs-page {
  --c-income: #059669;
  --c-income-soft: #ecfdf5;
  --c-expense: #dc2626;
  --c-expense-soft: #fef2f2;
  --c-surface: #ffffff;
  --c-surface-subtle: #f8fafc;
  --c-border: #e2e8f0;
  --c-border-strong: #cbd5e1;
  --c-text: #0f172a;
  --c-text-muted: #64748b;
  --c-radius: 0.75rem;
  --c-radius-sm: 0.8rem;
  --c-radius-xs: 0.55rem;
  --c-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.06);
  --c-fs-xs: 0.75rem;
  --c-fs-sm: 0.875rem;
  --c-fs-base: 0.9375rem;
  --c-fs-lg: 1.125rem;
  --c-transition: 0.18s cubic-bezier(.4,0,.2,1);
}

.costs-page__card {
  background: var(--c-surface);
  border-radius: var(--c-radius);
  box-shadow: none;
  border: none;
  overflow: hidden;
}

.costs-page__header {
  padding: 1.35rem 2.25rem 0.75rem 0;
  background: #fff;
  border-bottom: none;
  border-radius: var(--c-radius) var(--c-radius) 0 0;
  color: var(--c-text);
  position: relative;
  overflow: visible;
}

.costs-page__header::before {
  content: none;
}

.costs-page__header-grid {
  position: relative;
  display: block;
}

.costs-page__header-main {
  max-width: none;
}

.costs-page__crumbs {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.32rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: #94a3b8;
}

.costs-page__crumb-item {
  color: #94a3b8;
  text-decoration: none;
}

.costs-page__crumb-item--current {
  color: #94a3b8;
}

.costs-page__crumb-sep {
  color: #cbd5e1;
}

.costs-page__page-title {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 800;
  line-height: 1.25;
  color: #000000;
}

.costs-page__hero-desc {
  margin: 0.55rem 0 0;
  max-width: 88ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mpb-gray-500);
}

.costs-page__hero-desc code {
  font-size: 0.82em;
}

.costs-page__breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.88rem;
  min-width: 0;
  font-size: 1.84rem;
  font-weight: 600;
  line-height: 1.25;
  color: #64748b;
}

.costs-page__breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  white-space: nowrap;
}

.costs-page__breadcrumb-item--root {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #000000;
  font-weight: 800;
}

.costs-page__breadcrumb-item--root svg {
  width: 1.72rem;
  height: 1.72rem;
}

.costs-page__breadcrumb-sep {
  color: #94a3b8;
  font-weight: 700;
}

.costs-page__breadcrumb-item--current {
  color: #000000;
  font-weight: 700;
}

.costs-page__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  box-sizing: border-box;
  height: calc(clamp(1.55rem, 2.2vw, 2rem) * 1.15);
  padding: 0 0.5rem;
  margin-bottom: 0;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.costs-page__badge svg {
  width: 0.9em;
  height: 0.9em;
}

.costs-page__title {
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #475569;
}

.costs-page__subtitle {
  margin: 0.95rem 0 0;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.86);
}

.costs-page__header-actions {
  margin-top: 1rem;
}

.costs-page__header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.7rem;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22);
  transition: transform var(--c-transition), box-shadow var(--c-transition);
}

.costs-page__header-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.28);
}

.costs-page__hero-panel {
  padding: 1.15rem 1.2rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.08));
  backdrop-filter: blur(14px);
}

.costs-page__hero-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
}

.costs-page__hero-period {
  margin-top: 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}

.costs-page__hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.costs-page__hero-metric {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.costs-page__hero-metric span {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.72);
}

.costs-page__hero-metric strong {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.costs-page__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.5rem 2.25rem 0;
}

.costs-page__metric-card {
  position: relative;
  overflow: hidden;
  padding: 1.15rem 1.15rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid var(--c-border);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.costs-page__metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  background: #94a3b8;
}

.costs-page__metric-card[data-tone="positive"]::before {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.costs-page__metric-card[data-tone="negative"]::before {
  background: linear-gradient(180deg, #fb7185 0%, #dc2626 100%);
}

.costs-page__metric-card[data-tone="neutral"]::before {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.costs-page__metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.costs-page__metric-value {
  margin-top: 0.55rem;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--c-text);
  line-height: 1.1;
}

.costs-page__metric-meta {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--c-text-muted);
}

.costs-page__form {
  position: relative;
  margin: 1.1rem 2.25rem 1.15rem 0;
  padding: 1.65rem 1.5rem 1.65rem 0;
  background: #ffffff;
  border: none;
  border-radius: 1.2rem;
  box-shadow: none;
}

.costs-page__form::after {
  content: "";
  position: absolute;
  inset: 0.25rem 0.1rem 0.25rem -0.8rem;
  border-radius: 1.15rem;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 88% 72%, rgba(34, 197, 94, 0.22), transparent 18rem),
    linear-gradient(90deg, rgba(59, 130, 246, 0.12), transparent 44%);
  transform: scale(0.985);
  z-index: 0;
}

.costs-page__form.is-celebrating::after {
  animation: costsFormSuccessGlow 1.45s ease-out both;
}

.costs-page__form > * {
  position: relative;
  z-index: 1;
}

.costs-page__form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.costs-page__form-head-actions {
  display: inline-flex;
  align-items: flex-start;
}

.costs-page__form-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
}

.costs-page__form-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0.25rem 0 0;
  letter-spacing: -0.03em;
}

.costs-page__form-row {
  display: grid;
  gap: 1.15rem;
  align-items: end;
}

.costs-page__form-row + .costs-page__form-row {
  margin-top: 1.15rem;
}

.costs-page__form-row--primary {
  grid-template-columns: 10rem max-content minmax(12rem, 1fr);
  align-items: start;
}

.costs-page--transactions .costs-page__form-row--primary {
  grid-template-columns: 11.75rem max-content max-content max-content;
  justify-content: start;
}

.costs-page__form-row--secondary {
  grid-template-columns: 13.25rem minmax(13rem, 1.08fr) minmax(18rem, 1.55fr) 8.25rem auto;
}

.costs-page__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.costs-page__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
}

.costs-page__label--toolbar {
  margin-bottom: 0;
}

.costs-page__input,
.costs-page__select {
  min-width: 0;
  padding: 0.68rem 0.8rem;
  border: 1px solid var(--c-border);
  border-radius: 0.5rem;
  font-size: var(--c-fs-sm);
  background: #fff;
  color: var(--c-text);
  transition: border-color var(--c-transition), box-shadow var(--c-transition), transform var(--c-transition);
}

.costs-page__input:hover,
.costs-page__select:hover {
  border-color: var(--c-border-strong);
}

.costs-page__input:focus,
.costs-page__select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.costs-page__input--date,
.costs-page__input--amount,
.costs-page__input--sm,
.costs-page__select {
  width: 100%;
}

.costs-page__input--amount {
  appearance: textfield;
  -moz-appearance: textfield;
}

.costs-page__input--amount::-webkit-outer-spin-button,
.costs-page__input--amount::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.costs-page__smart-control {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 2.72rem;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 0.68rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%),
    #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color var(--c-transition), box-shadow var(--c-transition), background var(--c-transition);
}

.costs-page__smart-control:hover,
.costs-page__smart-control:focus-within {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.11), 0 10px 26px rgba(15, 23, 42, 0.08);
}

.costs-page__smart-icon {
  flex: 0 0 1.72rem;
  width: 1.72rem;
  height: 1.72rem;
  margin-left: 0.52rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
}

.costs-page__smart-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.costs-page__smart-control .costs-page__input {
  min-height: 2.62rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.56rem 0.68rem;
  font-weight: 700;
}

.costs-page__smart-control .costs-page__input:hover,
.costs-page__smart-control .costs-page__input:focus {
  border-color: transparent;
  box-shadow: none;
}

.costs-page__smart-control--date .costs-page__input--date {
  color: #0f172a;
}

.costs-page__smart-control--date .costs-page__input--date::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.62;
}

.costs-date-control {
  position: relative;
  width: 100%;
}

.costs-date-control__trigger {
  width: 100%;
  min-height: 3.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.72rem;
  padding: 0.42rem 0.9rem 0.42rem 0.52rem;
  border: 1px solid rgba(148, 163, 184, 0.46);
  border-radius: 0.95rem;
  background:
    radial-gradient(circle at 16% 50%, rgba(37, 99, 235, 0.11), transparent 4.2rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: border-color var(--c-transition), box-shadow var(--c-transition), transform var(--c-transition), background var(--c-transition);
}

.costs-date-control__trigger:hover,
.costs-date-control__trigger.is-open {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.11), 0 12px 28px rgba(15, 23, 42, 0.08);
}

.costs-date-control__trigger:focus-visible {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16), 0 12px 28px rgba(15, 23, 42, 0.08);
}

.costs-date-control__trigger .costs-page__smart-icon {
  margin-left: 0;
}

.costs-date-control__value {
  min-width: 0;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.costs-date-picker {
  position: fixed;
  z-index: 1200;
  padding: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 1.05rem;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.costs-date-picker__head {
  display: grid;
  grid-template-columns: 2.35rem 1fr 2.35rem;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.costs-date-picker__month {
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 850;
  text-align: center;
  text-transform: capitalize;
}

.costs-date-picker__nav {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.75rem;
  background: #fff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--c-transition), color var(--c-transition), background var(--c-transition), box-shadow var(--c-transition);
}

.costs-date-picker__nav:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.costs-date-picker__nav svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.costs-date-picker__weekdays,
.costs-date-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.28rem;
}

.costs-date-picker__weekdays {
  margin-bottom: 0.28rem;
}

.costs-date-picker__weekdays span {
  min-height: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.costs-date-picker__day {
  min-width: 0;
  height: 2.22rem;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  background: transparent;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--c-transition), color var(--c-transition), border-color var(--c-transition), box-shadow var(--c-transition);
}

.costs-date-picker__day:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.costs-date-picker__day.is-muted {
  color: #cbd5e1;
}

.costs-date-picker__day.is-today {
  border-color: #bfdbfe;
  color: #2563eb;
}

.costs-date-picker__day.is-selected {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.24);
}

.costs-date-picker__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.58rem;
  padding-top: 0.58rem;
  border-top: 1px solid #e2e8f0;
}

.costs-date-picker__footer button {
  min-height: 2.25rem;
  padding: 0 0.9rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.75rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
}

.costs-page__smart-control--amount {
  border-color: #bfdbfe;
  background:
    radial-gradient(circle at 12% 50%, rgba(37, 99, 235, 0.1), transparent 3.8rem),
    linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.costs-page__smart-control--amount .costs-page__input--amount {
  color: #0f172a;
  font-size: 1.02rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  padding-right: 0.9rem;
}

.costs-page__amount-suffix {
  flex: 0 0 auto;
  margin-right: 0.78rem;
  color: #2563eb;
  font-size: 0.9rem;
  font-weight: 850;
}

.costs-page__type-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  min-height: 2.72rem;
  padding: 0.34rem;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 0.72rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.costs-page__type-switch-option {
  min-width: 0;
  min-height: 2rem;
  padding: 0.34rem 0.66rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.44rem;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--c-transition), color var(--c-transition), box-shadow var(--c-transition), border-color var(--c-transition);
}

.costs-page__type-switch-option:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.costs-page__type-switch-option.is-active[data-type="expense"] {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.12);
}

.costs-page__type-switch-option.is-active[data-type="income"] {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.12);
}

.costs-page__type-switch-mark {
  flex: 0 0 1.36rem;
  width: 1.36rem;
  height: 1.36rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.costs-page__type-switch-option.is-active[data-type="expense"] .costs-page__type-switch-mark {
  background: #e11d48;
  color: #fff;
}

.costs-page__type-switch-option.is-active[data-type="income"] .costs-page__type-switch-mark {
  background: #059669;
  color: #fff;
}

.costs-page__field--category,
.costs-page__field--desc {
  min-width: 0;
}

.costs-category-menu {
  position: relative;
  width: 100%;
  min-width: 0;
}

.costs-category-menu__trigger {
  width: 100%;
  min-width: 0;
  min-height: 2.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0.62rem 0.62rem 0.78rem;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 0.68rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: border-color var(--c-transition), box-shadow var(--c-transition), background var(--c-transition);
}

.costs-category-menu__trigger:hover,
.costs-category-menu__trigger.is-open {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.11), 0 10px 26px rgba(15, 23, 42, 0.08);
}

.costs-category-menu__trigger.is-empty {
  color: #64748b;
}

.costs-category-menu__trigger-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--c-fs-sm);
  font-weight: 650;
  text-align: left;
}

.costs-category-menu__chevron {
  flex: 0 0 1.6rem;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
}

.costs-category-menu__chevron svg,
.costs-category-menu__add-icon svg,
.costs-category-menu__manage-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.costs-category-menu__trigger.is-open .costs-category-menu__chevron svg {
  transform: rotate(180deg);
}

.costs-category-menu__panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 0.45rem);
  left: 0;
  width: min(25rem, max(100%, 20rem));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
  backdrop-filter: blur(14px);
}

.costs-category-menu__panel--portal {
  position: fixed;
  top: auto;
  left: auto;
  z-index: 1400;
}

.costs-category-menu__scroll {
  max-height: 18.5rem;
  overflow-y: auto;
  padding: 0.45rem;
}

.costs-category-menu__panel--portal .costs-category-menu__scroll {
  max-height: min(18.5rem, calc(var(--category-menu-max-height, 24rem) - 6.25rem));
}

.costs-category-menu__group + .costs-category-menu__group {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid #edf2f7;
}

.costs-category-menu__group-label {
  padding: 0.32rem 0.48rem 0.28rem;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
}

.costs-category-menu__option,
.costs-category-menu__add,
.costs-category-menu__manage {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.58rem;
  text-align: left;
  cursor: pointer;
}

.costs-category-menu__option {
  padding: 0.56rem 0.5rem;
  border-radius: 0.64rem;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 600;
}

.costs-category-menu__option:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.costs-category-menu__option.is-selected {
  background: #eff6ff;
  color: #1d4ed8;
}

.costs-category-menu__option.is-empty {
  color: #64748b;
}

.costs-category-menu__option-mark {
  flex: 0 0 0.58rem;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.costs-category-menu__option.is-selected .costs-category-menu__option-mark {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.costs-category-menu__option-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.costs-category-menu__add {
  justify-content: center;
  padding: 0.72rem 0.85rem;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 800;
}

.costs-category-menu__add:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
}

.costs-category-menu__manage {
  justify-content: center;
  padding: 0.66rem 0.85rem 0.78rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
}

.costs-category-menu__manage:hover {
  background: #f8fafc;
  color: #0f172a;
}

.costs-category-menu__add-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.costs-category-menu__manage-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.costs-category-menu--compact .costs-category-menu__trigger {
  min-height: 2.15rem;
  padding: 0.38rem 0.45rem 0.38rem 0.58rem;
  border-radius: 0.62rem;
}

.costs-category-menu--compact .costs-category-menu__trigger-text {
  font-size: 0.775rem;
}

.costs-category-menu--compact .costs-category-menu__chevron {
  flex-basis: 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
}

.costs-page__plan-fact {
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.costs-page__pills {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.costs-page__pill {
  padding: 0.58rem 0.92rem;
  font-size: var(--c-fs-sm);
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all var(--c-transition);
}

.costs-page__pill:hover {
  border-color: #cbd5e1;
  color: #0f172a;
}

.costs-page__pill.is-active {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.costs-page__pill--sm {
  padding: 0.28rem 0.6rem;
  font-size: 0.6875rem;
}

.costs-page__form-actions {
  display: inline-flex;
  align-items: flex-end;
  align-self: end;
  min-width: 0;
  justify-self: end;
}

.costs-page__field--recurring {
  min-width: 0;
}

.costs-page__recurring-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
}

.costs-page__pills--recurring {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.costs-page__pill--recurring {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow: hidden;
  text-align: left;
}

.costs-page__pill-recurring-label {
  display: inline-block;
  line-height: 1.25;
}

.costs-page__recurring-config-link {
  border: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  align-self: center;
  width: fit-content;
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 3px;
}

.costs-page__recurring-config-link:hover {
  color: #64748b;
  text-decoration-color: #94a3b8;
}

.costs-page__btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.72rem 1.15rem;
  font-size: var(--c-fs-sm);
  font-weight: 700;
  color: #fff;
  background: #1d4ed8;
  border: none;
  border-radius: 0.8rem;
  cursor: pointer;
  transition: transform var(--c-transition), box-shadow var(--c-transition);
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.18);
}

.costs-page__btn-primary:hover {
  background: #1e40af;
}

.costs-page__add-button {
  position: relative;
  min-width: 8.4rem;
  gap: 0.48rem;
  overflow: visible;
  isolation: isolate;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.3), transparent 1.5rem),
    linear-gradient(135deg, #2563eb 0%, #1d4ed8 58%, #0f766e 100%);
  box-shadow: 0 11px 24px rgba(29, 78, 216, 0.24);
}

.costs-page__add-button:hover:not(:disabled) {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.36), transparent 1.55rem),
    linear-gradient(135deg, #1d4ed8 0%, #1e40af 58%, #0f766e 100%);
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(29, 78, 216, 0.28);
}

.costs-page__add-button:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.costs-page__add-button-shine {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.costs-page__add-button-shine::before {
  content: "";
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: -70%;
  width: 42%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  opacity: 0;
}

.costs-page__add-button-icon {
  width: 1.12rem;
  height: 1.12rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.costs-page__add-button-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.costs-page__add-button-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.costs-page__add-button-check {
  opacity: 0;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
}

.costs-page__add-button-burst {
  position: absolute;
  inset: -0.8rem;
  pointer-events: none;
  opacity: 0;
}

.costs-page__add-button-burst i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: #bfdbfe;
  box-shadow: 0 0 0 0.18rem rgba(191, 219, 254, 0.16);
}

.costs-page__add-button-burst i:nth-child(1) { --burst-x: -3.1rem; --burst-y: -1.7rem; background: #93c5fd; }
.costs-page__add-button-burst i:nth-child(2) { --burst-x: 0.1rem; --burst-y: -2.35rem; background: #86efac; }
.costs-page__add-button-burst i:nth-child(3) { --burst-x: 3.25rem; --burst-y: -1.15rem; background: #c4b5fd; }
.costs-page__add-button-burst i:nth-child(4) { --burst-x: 3.05rem; --burst-y: 1.45rem; background: #67e8f9; }
.costs-page__add-button-burst i:nth-child(5) { --burst-x: -0.35rem; --burst-y: 2.2rem; background: #fde68a; }
.costs-page__add-button-burst i:nth-child(6) { --burst-x: -3.35rem; --burst-y: 1.05rem; background: #fca5a5; }

.costs-page__add-button.is-celebrating {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.45), transparent 1.65rem),
    linear-gradient(135deg, #16a34a 0%, #059669 52%, #2563eb 100%);
  animation: costsAddButtonPop 0.72s cubic-bezier(0.2, 1.5, 0.35, 1) both;
  box-shadow: 0 16px 34px rgba(22, 163, 74, 0.26);
}

.costs-page__add-button.is-celebrating .costs-page__add-button-shine::before {
  animation: costsAddButtonShine 0.9s ease-out both;
}

.costs-page__add-button.is-celebrating .costs-page__add-button-plus {
  animation: costsAddPlusOut 0.24s ease-out both;
}

.costs-page__add-button.is-celebrating .costs-page__add-button-check {
  animation: costsAddCheckIn 0.42s 0.12s ease-out both;
}

.costs-page__add-button.is-celebrating .costs-page__add-button-burst {
  animation: costsAddBurst 0.82s ease-out both;
}

.costs-page__add-button.is-celebrating .costs-page__add-button-burst i {
  animation: costsAddParticle 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes costsFormSuccessGlow {
  0% {
    opacity: 0;
    transform: scale(0.985);
  }
  18% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.006);
  }
}

@keyframes costsAddButtonPop {
  0% {
    transform: scale(1);
  }
  34% {
    transform: scale(1.055);
  }
  64% {
    transform: scale(0.99);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes costsAddButtonShine {
  0% {
    opacity: 0;
    left: -70%;
  }
  22% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    left: 132%;
  }
}

@keyframes costsAddPlusOut {
  to {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
  }
}

@keyframes costsAddCheckIn {
  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes costsAddBurst {
  0%,
  8% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes costsAddParticle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y))) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .costs-page__form.is-celebrating::after,
  .costs-page__add-button.is-celebrating,
  .costs-page__add-button.is-celebrating .costs-page__add-button-shine::before,
  .costs-page__add-button.is-celebrating .costs-page__add-button-plus,
  .costs-page__add-button.is-celebrating .costs-page__add-button-check,
  .costs-page__add-button.is-celebrating .costs-page__add-button-burst,
  .costs-page__add-button.is-celebrating .costs-page__add-button-burst i {
    animation: none;
  }

  .costs-page__add-button.is-celebrating .costs-page__add-button-plus {
    opacity: 0;
  }

  .costs-page__add-button.is-celebrating .costs-page__add-button-check {
    opacity: 1;
    stroke-dashoffset: 0;
  }

  .costs-page__table tbody tr.is-newly-added,
  .costs-page__table tbody tr.is-newly-added td,
  .costs-page__table tbody tr.is-deleting,
  .costs-page__table tbody tr.is-deleting td {
    animation: none;
  }
}

.costs-page__list {
  border-top: none;
  background: #fff;
}

.costs-page__toolbar {
  position: sticky;
  top: 0.75rem;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 2.25rem 0 0;
  padding: 0.25rem 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.costs-page__toolbar-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.costs-page__toolbar-title {
  margin: 0 0.35rem 0 0;
}

.costs-page__toolbar-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.costs-page__toolbar-inline-stats {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-left: auto;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.8;
  text-align: right;
  white-space: nowrap;
}

.costs-page__toolbar-inline-stats span + span::before {
  content: "•";
  margin-right: 0.55rem;
  color: #cbd5e1;
}

.costs-page__toolbar-inline-stats strong {
  color: inherit;
  font-weight: inherit;
}

.costs-page__filter-toggle,
.costs-page__recurring-link,
.costs-page__stats-toggle,
.costs-page__today-toggle {
  --toolbar-expanded-width: 7rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 1.75rem;
  height: 1.75rem;
  overflow: hidden;
  border: none;
  background: transparent;
  color: #64748b;
  padding: 0.18rem 0.42rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: width var(--c-transition), color var(--c-transition), opacity var(--c-transition);
}

.costs-page__filter-toggle {
  --toolbar-expanded-width: 7rem;
  opacity: 0.8;
}

.costs-page__recurring-link {
  --toolbar-expanded-width: 13.4rem;
  opacity: 0.82;
}

.costs-page__stats-toggle {
  --toolbar-expanded-width: 7.4rem;
  opacity: 0.82;
}

.costs-page__today-toggle {
  --toolbar-expanded-width: 6.8rem;
  opacity: 0.82;
}

.costs-page__filter-toggle svg,
.costs-page__recurring-link svg,
.costs-page__stats-toggle svg,
.costs-page__today-toggle svg {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
}

.costs-page__recurring-link svg {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.costs-page__filter-toggle:hover,
.costs-page__filter-toggle:focus-visible {
  width: var(--toolbar-expanded-width);
  color: #475569;
  opacity: 1;
}

.costs-page__recurring-link:hover,
.costs-page__recurring-link:focus-visible,
.costs-page__stats-toggle:hover,
.costs-page__stats-toggle:focus-visible,
.costs-page__today-toggle:hover,
.costs-page__today-toggle:focus-visible {
  width: var(--toolbar-expanded-width);
  color: #334155;
  opacity: 1;
}

.costs-page__stats-toggle.is-active {
  color: #0f172a;
  opacity: 1;
}

.costs-page__filter-toggle.is-active {
  border: none;
  background: transparent;
  color: #0f172a;
  opacity: 1;
}

.costs-page__toolbar-action-label {
  display: inline-block;
  max-width: 0;
  margin-left: 0;
  opacity: 0;
  white-space: nowrap;
  color: inherit;
  transform: translateX(-6px);
  transition: max-width var(--c-transition), margin-left var(--c-transition), transform var(--c-transition), opacity var(--c-transition);
}

.costs-page__filter-toggle:hover .costs-page__toolbar-action-label,
.costs-page__filter-toggle:focus-visible .costs-page__toolbar-action-label,
.costs-page__recurring-link:hover .costs-page__toolbar-action-label,
.costs-page__recurring-link:focus-visible .costs-page__toolbar-action-label,
.costs-page__stats-toggle:hover .costs-page__toolbar-action-label,
.costs-page__stats-toggle:focus-visible .costs-page__toolbar-action-label,
.costs-page__today-toggle:hover .costs-page__toolbar-action-label,
.costs-page__today-toggle:focus-visible .costs-page__toolbar-action-label {
  max-width: 12rem;
  margin-left: 0.36rem;
  opacity: 1;
  transform: translateX(0);
}

.costs-page__toolbar-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.55rem;
  min-width: 0;
}

.costs-page__filters,
.costs-page__period,
.costs-page__category {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
  padding: 0.55rem 0.62rem;
  border-radius: 0.8rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.costs-page__period-inputs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.costs-page__period-sep {
  color: #cbd5e1;
  font-size: 0.82rem;
}

.costs-page__toolbar-actions {
  display: grid;
  grid-auto-flow: row;
  justify-items: end;
  gap: 0.32rem;
  min-width: max-content;
  margin-left: 0;
}

.costs-page__toolbar-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-radius: 0.95rem;
  border: 1px solid var(--c-border);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  font-size: 0.875rem;
  color: #64748b;
}

.costs-page__toolbar-summary strong {
  color: #0f172a;
  font-weight: 800;
}

.costs-page__links,
.costs-page__extras {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.36rem;
  align-items: center;
}

.costs-page__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.42rem 0.62rem;
  border-radius: 0.65rem;
  font-size: 0.775rem;
  font-weight: 700;
  background: #fff;
  color: #475569;
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: all var(--c-transition);
}

.costs-page__btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: var(--c-border-strong);
  color: #0f172a;
}

.costs-page__btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.costs-page__btn-clear {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.costs-page__btn-clear:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.costs-page__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.42rem 0.62rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
  color: #fff;
  text-decoration: none;
  font-size: 0.775rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.18);
  transition: transform var(--c-transition), box-shadow var(--c-transition);
}

.costs-page__period .costs-page__input--sm {
  width: 100%;
  min-width: 0;
  padding: 0.44rem 0.56rem;
  font-size: 0.775rem;
}

.costs-page__category .costs-page__input--sm {
  padding: 0.44rem 0.56rem;
  font-size: 0.775rem;
}

.costs-page__toolbar .costs-page__pill {
  padding: 0.34rem 0.56rem;
  font-size: 0.75rem;
}

.costs-page__toolbar .costs-page__label {
  font-size: 0.62rem;
  letter-spacing: 0.11em;
}

.costs-page__toolbar .costs-page__input,
.costs-page__toolbar .costs-page__select {
  padding: 0.44rem 0.56rem;
  border-radius: 0.62rem;
  font-size: 0.775rem;
}

.costs-import {
  display: inline-flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.32rem;
  position: relative;
  flex-wrap: wrap;
}

.costs-import__text-trigger {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.costs-import__text-trigger:hover {
  color: #475569;
}

.costs-import__help {
  position: relative;
}

.costs-import__help-trigger {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  padding: 0;
}

.costs-import__popover {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 30;
  width: 21rem;
  padding: 0.7rem 0.75rem;
  border-radius: 0.7rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.72rem;
  line-height: 1.35;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.costs-import__popover-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.costs-import__popover-subtitle {
  margin-top: 0.3rem;
}

.costs-import__popover-list {
  margin: 0.2rem 0 0;
  padding-left: 0.9rem;
}

.costs-import__popover-note {
  margin-top: 0.3rem;
  color: #475569;
}

.costs-import__status {
  margin: 0 0 0 0.1rem;
  font-size: 0.68rem;
  color: #334155;
  white-space: nowrap;
  flex-basis: 100%;
  text-align: right;
}

.costs-page__form-head .costs-import {
  align-items: center;
  gap: 0.45rem;
}

.costs-page__form-head .costs-import__text-trigger {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.costs-page__form-head .costs-import__text-trigger:hover {
  color: #475569;
}

.costs-page__form-head .costs-import__help-trigger {
  width: 1.2rem;
  height: 1.2rem;
  font-size: 0.68rem;
}

.costs-page__form-head .costs-import__status {
  flex-basis: auto;
  margin-left: 0.45rem;
  text-align: left;
}

.costs-page__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(30, 64, 175, 0.24);
}

.costs-page__table-wrap {
  margin: 0.9rem 0 1.6rem 0;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.costs-page__table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--c-fs-sm);
}

.costs-page__table th,
.costs-page__table td {
  padding: 0.72rem 0.62rem;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}

.costs-page__table th {
  background: rgba(248, 250, 252, 0.94);
  font-weight: 700;
  font-size: 0.6875rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.costs-page__th-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right !important;
  padding-right: 0.38rem !important;
}

.costs-page__th-date {
  width: 4.95rem;
  min-width: 4.95rem;
  max-width: 4.95rem;
}

.costs-page__th-payment-doc {
  width: 6.2rem;
  min-width: 6.2rem;
  max-width: 6.2rem;
}

.costs-page__table th:nth-child(2),
.costs-page__table td:nth-child(2) {
  width: 7rem;
}

.costs-page__table th:nth-child(3),
.costs-page__table td:nth-child(3) {
  width: 6.2rem;
}

.costs-page__table th:nth-child(4),
.costs-page__table td:nth-child(4) {
  width: 9.3rem;
}

.costs-page__table th:nth-child(5),
.costs-page__table td:nth-child(5) {
  width: 11.2rem;
  max-width: 11.2rem;
}

.costs-page__table td:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.costs-page__table th:nth-child(7),
.costs-page__table td:nth-child(7) {
  width: 6.7rem;
}

.costs-page__table th:nth-child(8),
.costs-page__table td:nth-child(8) {
  width: 4.7rem;
}

.costs-page__th-clear-btn {
  min-height: 1.85rem;
  padding: 0.3rem 0.58rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}

.costs-page__table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.costs-page__table tbody tr {
  transform-origin: center;
}

.costs-page__table tbody tr.is-newly-added {
  animation: costsRowNewPulse 1.5s ease-out both;
}

.costs-page__table tbody tr.is-newly-added td {
  animation: costsRowNewCell 1.5s ease-out both;
}

.costs-page__table tbody tr.is-deleting {
  pointer-events: none;
  animation: costsRowDelete 0.32s ease-in both;
}

.costs-page__table tbody tr.is-deleting td {
  animation: costsRowDeleteCell 0.32s ease-in both;
}

.costs-page__table tbody tr:hover td {
  background: #f3f7ff;
}

.costs-page__table td {
  color: #334155;
}

.costs-page__description-link {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  max-width: 100%;
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.costs-page__description-link-icon-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 0.36rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--c-transition), background var(--c-transition), color var(--c-transition);
}

.costs-page__description-link-icon-wrap:hover {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1e40af;
}

.costs-page__description-link-icon {
  flex: 0 0 auto;
  width: 0.72rem;
  height: 0.72rem;
  color: inherit;
}

.costs-page__description-link-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.36rem);
  transform: translateX(-50%) translateY(0.15rem);
  padding: 0.28rem 0.48rem;
  border-radius: 0.42rem;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 12;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0.14s;
}

.costs-page__description-link-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 0.42rem;
  height: 0.42rem;
  background: #0f172a;
  transform: translateX(-50%) rotate(45deg);
}

.costs-page__description-link-icon-wrap:hover .costs-page__description-link-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0s;
}

.costs-page__description-link-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.costs-page__description-link:hover {
  color: inherit;
  text-decoration: none;
}

.costs-page__row-linkable {
  cursor: pointer;
}

.costs-page__row-linkable:hover td {
  background: #eef5ff !important;
}

.costs-page__fixed-head {
  position: fixed;
  z-index: 70;
  display: none;
  overflow: hidden;
  pointer-events: auto;
  border: 1px solid var(--c-border);
  border-bottom: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.12);
}

.costs-page__table--fixed-head {
  margin: 0;
}

.costs-page__table--fixed-head th {
  position: relative;
  top: auto;
  z-index: 2;
}

.costs-page__cell-date {
  white-space: nowrap;
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.costs-page__type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.costs-page__type-badge[data-type="income"] {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.costs-page__type-badge[data-type="expense"] {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.costs-page__cell--income,
.costs-page__cell--expense {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.costs-page__field--amount {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.costs-page__field--amount .costs-page__input--amount {
  text-align: right;
}

.costs-page__field--form-doc {
  min-width: 0;
  width: fit-content;
  max-width: 22rem;
  justify-self: start;
}

.costs-page__form-doc {
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  max-width: 100%;
  min-height: 2.8rem;
  padding: 0.34rem;
  border: 1px solid #dbe5f2;
  border-radius: 0.72rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  transition: border-color var(--c-transition), background var(--c-transition), box-shadow var(--c-transition);
}

.costs-page__form-doc.is-filled {
  border-color: #bfdbfe;
  background: #eff6ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.costs-page__form-doc-main {
  min-width: 0;
  max-width: 15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.costs-page__form-doc-icon {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.55rem;
  border: 1px solid #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.costs-page__form-doc-icon svg {
  width: 1rem;
  height: 1rem;
}

.costs-page__form-doc-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
  line-height: 1.2;
}

.costs-page__form-doc-text strong {
  min-width: 0;
  max-width: 100%;
  color: #1e293b;
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.costs-page__form-doc-text span {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 600;
}

.costs-page__form-doc-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.costs-page__form-doc-action,
.costs-page__form-doc-clear {
  min-height: 2rem;
  border-radius: 0.62rem;
  border: 1px solid #bfdbfe;
  background: #fff;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.36rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--c-transition), border-color var(--c-transition), color var(--c-transition);
}

.costs-page__form-doc-action:hover,
.costs-page__form-doc-clear:hover:not(:disabled) {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.costs-page__form-doc-action svg {
  width: 0.92rem;
  height: 0.92rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.costs-page__form-doc-action input {
  display: none;
}

.costs-page__form-doc-clear {
  width: 2rem;
  padding: 0;
  color: #64748b;
  border-color: #e2e8f0;
}

.costs-page__field--date {
  min-width: 0;
}

.costs-page__field--type {
  min-width: 0;
}

.costs-page__plan-fact {
  min-width: 0;
}

.costs-page__cell--income {
  color: var(--c-income);
}

.costs-page__cell--expense {
  color: var(--c-expense);
}

.costs-page__payment-doc-cell {
  width: 6.2rem;
  min-width: 6.2rem;
  max-width: 6.2rem;
}

.costs-page__payment-doc-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.28rem;
  row-gap: 0.2rem;
  min-height: 1.85rem;
}

.costs-page__payment-doc-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.costs-page__payment-doc-status.is-has {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

.costs-page__payment-doc-status-btn {
  cursor: pointer;
  transition: border-color var(--c-transition), background var(--c-transition), color var(--c-transition);
}

.costs-page__payment-doc-status-btn:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #047857;
}

.costs-page__payment-doc-status.is-missing {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.costs-page__payment-doc-link {
  flex: 1 1 auto;
  min-width: 0;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.costs-page__payment-doc-link:hover {
  text-decoration: underline;
}

.costs-page__payment-doc-more {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
}

.costs-page__payment-doc-empty {
  flex: 1 1 auto;
  font-size: 0.74rem;
  color: #94a3b8;
}

.costs-page__payment-doc-muted {
  flex: 0 0 auto;
  font-size: 0.68rem;
  color: #94a3b8;
}

.costs-page__payment-doc-upload {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  min-height: 1.35rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.costs-page__payment-doc-upload:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.costs-page__payment-doc-upload-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.costs-page__payment-doc-upload-plus {
  width: 0.74rem;
  height: 0.74rem;
  display: block;
}

.costs-page__payment-doc-upload-plus path {
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.costs-docs-modal__dialog {
  width: min(32rem, calc(100vw - 2.5rem));
}

.costs-docs-modal__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.costs-docs-modal__tx {
  margin-bottom: 0.75rem;
  padding: 0.8rem 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.costs-docs-modal__tx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.costs-docs-modal__tx-head strong {
  color: #0f172a;
  font-size: 0.86rem;
}

.costs-docs-modal__tx-head span {
  color: #64748b;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.costs-docs-modal__tx-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
}

.costs-docs-modal__tx-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.costs-docs-modal__tx-field span {
  color: #94a3b8;
  font-size: 0.7rem;
}

.costs-docs-modal__tx-field b {
  color: #1e293b;
  font-size: 0.8rem;
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.costs-docs-modal__tx-desc {
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.costs-docs-modal__tx-desc span {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.7rem;
}

.costs-docs-modal__tx-desc p {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.costs-docs-modal__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  transition: border-color var(--c-transition), background var(--c-transition);
}

.costs-docs-modal__item:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.costs-docs-modal__item-link {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.costs-docs-modal__icon {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.55rem;
  border: 1px solid #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.costs-docs-modal__icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.costs-docs-modal__name {
  flex: 1 1 auto;
  min-width: 0;
  color: #1e293b;
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.costs-docs-modal__item-delete {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.55rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--c-transition), border-color var(--c-transition), color var(--c-transition);
}

.costs-docs-modal__item-delete:hover:not(:disabled) {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #b91c1c;
}

.costs-docs-modal__item-delete:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.costs-docs-modal__item-delete svg {
  width: 0.9rem;
  height: 0.9rem;
}

.costs-docs-modal__empty {
  padding: 0.95rem 1rem;
  border-radius: 0.85rem;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  font-size: 0.86rem;
}

.costs-page__plan-fact-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.costs-page__actions {
  position: relative;
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
}

.costs-page__btn-edit,
.costs-page__btn-delete {
  border: 1px solid transparent;
  border-radius: 0.55rem;
  cursor: pointer;
  transition: all var(--c-transition);
}

.costs-page__btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.82rem;
  height: 1.82rem;
  padding: 0;
  min-width: 1.82rem;
}

.costs-page__btn-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.costs-page__btn-edit {
  background: #eff6ff;
  color: #3b82f6;
  border-color: #bfdbfe;
}

.costs-page__btn-edit:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.costs-page__btn-delete {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

.costs-page__btn-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.costs-page__btn-delete.is-confirming {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.costs-page__btn-icon:disabled {
  cursor: default;
  opacity: 0.55;
}

.costs-page__delete-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 0.48rem);
  z-index: 30;
  width: min(18rem, calc(100vw - 2rem));
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.72rem;
  padding: 0.8rem;
  border: 1px solid #fecaca;
  border-radius: 0.92rem;
  background:
    radial-gradient(circle at 14% 12%, rgba(254, 226, 226, 0.88), transparent 6.5rem),
    linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
  box-shadow: 0 20px 44px rgba(127, 29, 29, 0.15), 0 4px 12px rgba(15, 23, 42, 0.08);
  animation: costsDeletePopoverIn 0.18s ease-out both;
}

.costs-page__delete-popover::before {
  content: "";
  position: absolute;
  right: 0.55rem;
  top: -0.38rem;
  width: 0.72rem;
  height: 0.72rem;
  transform: rotate(45deg);
  border-left: 1px solid #fecaca;
  border-top: 1px solid #fecaca;
  background: #ffffff;
}

.costs-page__delete-popover-mark {
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.72rem;
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.costs-page__delete-popover-mark svg {
  width: 1rem;
  height: 1rem;
}

.costs-page__delete-popover-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding-top: 0.04rem;
  text-align: left;
}

.costs-page__delete-popover-body strong {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.2;
}

.costs-page__delete-popover-body span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.35;
}

.costs-page__delete-popover-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.38rem;
}

.costs-page__delete-popover-cancel,
.costs-page__delete-popover-confirm {
  min-height: 2rem;
  padding: 0.42rem 0.66rem;
  border-radius: 0.62rem;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--c-transition), border-color var(--c-transition), color var(--c-transition), transform var(--c-transition);
}

.costs-page__delete-popover-cancel {
  background: #ffffff;
  color: #475569;
  border-color: #e2e8f0;
}

.costs-page__delete-popover-cancel:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.costs-page__delete-popover-confirm {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.18);
}

.costs-page__delete-popover-confirm:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  transform: translateY(-1px);
}

@keyframes costsDeletePopoverIn {
  0% {
    opacity: 0;
    transform: translateY(-0.25rem) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes costsRowNewPulse {
  0% {
    transform: translateY(-5px) scale(0.995);
  }
  28% {
    transform: translateY(0) scale(1.004);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes costsRowNewCell {
  0% {
    background: #dcfce7;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.18);
  }
  45% {
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
  }
  100% {
    background: inherit;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0);
  }
}

@keyframes costsRowDelete {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(16px) scale(0.985);
  }
}

@keyframes costsRowDeleteCell {
  0% {
    background: #ffffff;
  }
  45% {
    background: #fef2f2;
  }
  100% {
    background: #fee2e2;
  }
}

.costs-page__empty-row td {
  padding: 3.4rem 1rem;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
}

.costs-page__empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  max-width: 26rem;
  margin: 0 auto;
}

.costs-page__empty-icon {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(59,130,246,0.16), rgba(59,130,246,0.04)),
    #fff;
  border: 1px solid rgba(59,130,246,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  position: relative;
}

.costs-page__empty-icon::before,
.costs-page__empty-icon::after {
  content: "";
  position: absolute;
  bottom: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.costs-page__empty-icon::before {
  left: 1rem;
  width: 0.45rem;
  height: 1rem;
}

.costs-page__empty-icon::after {
  left: 1.8rem;
  width: 0.45rem;
  height: 1.55rem;
  box-shadow: 0 0 0 0.55rem rgba(96, 165, 250, 0.14);
}

.costs-page__empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #334155;
}

.costs-page__empty-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

@media (max-width: 1200px) {
  .costs-page__form-row--primary,
  .costs-page__form-row--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .costs-page__field--form-doc {
    grid-column: 1 / -1;
  }

  .costs-page__form-actions {
    justify-self: stretch;
  }

  .costs-page__form-actions .costs-page__btn-primary {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .costs-page__header-grid,
  .costs-page__metrics {
    grid-template-columns: 1fr;
  }

  .costs-page__toolbar-actions {
    width: auto;
    justify-content: flex-end;
  }

  .costs-recurring-modal__grid {
    grid-template-columns: 1fr;
  }

  .cost-groups-page__opiu-head {
    grid-template-columns: 1fr;
  }

  .cost-groups-page__blocks {
    grid-template-columns: 1fr;
  }

  .cost-groups-page__statement-row,
  .cost-groups-page__blocks--statement {
    grid-template-columns: 1fr;
  }

  .cost-groups-page__opiu-builder {
    grid-template-columns: 1fr;
  }

  .cost-groups-page__details {
    position: static;
  }
}

@media (max-width: 768px) {
  .dashboard-page__hero-stat-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page__hero-stat-chart {
    flex-direction: column;
  }

  .costs-page__header {
    padding: 1.35rem 1rem 0.9rem;
  }

  .costs-page__breadcrumb {
    font-size: 1.64rem;
  }

  .costs-page__metrics,
  .costs-page__form,
  .costs-page__table-wrap {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .costs-page__toolbar {
    margin-left: 1rem;
    margin-right: 1rem;
    padding-left: 0;
    padding-right: 0;
  }

  .costs-page__metrics {
    padding: 1rem 1rem 0;
  }

  .costs-page__form {
    margin-top: 0.85rem;
    padding: 1.6rem 1.2rem 1.5rem;
    box-shadow: none;
  }

  .costs-page__form {
    padding: 1rem;
  }

  .costs-page__form::before,
  .costs-page__form::after {
    display: none;
  }

  .costs-page__form-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .costs-page__form-row {
    grid-template-columns: 1fr;
  }

  .cost-groups-page__tabs {
    display: grid;
    grid-template-columns: 1fr;
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .cost-groups-page__body {
    padding-right: 1rem;
  }

  .cost-groups-page__add-group,
  .cost-groups-page__add-subgroup,
  .cost-groups-page__block-head {
    grid-template-columns: 1fr;
  }

  .cost-groups-page__opiu-tools .cost-groups-page__add-group,
  .cost-groups-page__add-group--inner {
    grid-template-columns: 1fr !important;
  }

  .cost-groups-page__block-badge,
  .cost-groups-page__block-count {
    justify-self: start;
  }

  .cost-groups-page__formula-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .cost-groups-page__formula-row p {
    grid-column: 2;
  }

  .cost-groups-page__skeleton-fixed div,
  .cost-groups-page__skeleton-row,
  .cost-groups-page__section-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .cost-groups-page__skeleton-row .cost-groups-page__drag-handle,
  .cost-groups-page__skeleton-row small {
    display: none;
  }

  .cost-groups-page__skeleton-row select,
  .cost-groups-page__skeleton-row button,
  .cost-groups-page__skeleton-count {
    grid-column: auto;
  }

  .cost-groups-page__details-head {
    grid-template-columns: 1fr;
  }

  .cost-groups-page__section-row select,
  .cost-groups-page__section-row em {
    grid-column: 2 / -1;
  }

  /* costs (/costs): compact mobile form */
  .costs-page--transactions .costs-page__form {
    margin-top: 0.62rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "head head"
      "date type"
      "plan plan"
      "category category"
      "description description"
      "document document"
      "amount amount"
      "actions actions";
    column-gap: 0.58rem;
    row-gap: 0.62rem;
    padding: 0.86rem;
    border: 1px solid #dbe5f2;
    border-radius: 1.08rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  }

  .costs-page--transactions .costs-page__form-head {
    grid-area: head;
    margin-bottom: 0.08rem;
    align-items: flex-start;
    text-align: left;
  }

  .costs-page--transactions .costs-page__form-head-actions,
  .costs-page--transactions .costs-page__form-head .costs-import {
    display: none;
  }

  .costs-page--transactions .costs-page__form-title {
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
  }

  .costs-page--transactions .costs-page__form-row {
    display: contents;
  }

  .costs-page--transactions .costs-page__form-row + .costs-page__form-row {
    margin-top: 0;
  }

  .costs-page--transactions .costs-page__form-row--primary {
    grid-template-columns: none;
  }

  .costs-page--transactions .costs-page__field--date {
    grid-area: date;
  }

  .costs-page--transactions .costs-page__plan-fact {
    grid-area: plan;
  }

  .costs-page--transactions .costs-page__field--recurring {
    grid-area: recurring;
    display: none;
  }

  .costs-page--transactions .costs-page__form-row--secondary {
    grid-template-columns: none;
  }

  .costs-page--transactions .costs-page__field--type {
    grid-area: type;
    align-self: start;
  }

  .costs-page--transactions .costs-page__field--amount {
    grid-area: amount;
    align-self: start;
    justify-self: stretch;
    margin-top: 0.08rem;
  }

  .costs-page--transactions .costs-page__field--category {
    grid-area: category;
  }

  .costs-page--transactions .costs-page__field--desc {
    grid-area: description;
  }

  .costs-page--transactions .costs-page__field--form-doc {
    grid-area: document;
    width: 100%;
    max-width: none;
  }

  .costs-page--transactions .costs-page__form-actions {
    grid-area: actions;
    margin-top: -0.1rem;
  }

  .costs-page--transactions .costs-page__label {
    font-size: 0.61rem;
    letter-spacing: 0.05em;
  }

  .costs-page--transactions .costs-page__input,
  .costs-page--transactions .costs-page__select {
    min-height: 2.72rem;
    padding: 0.68rem 0.76rem;
    border-radius: 0.78rem;
    font-size: 0.92rem;
    background: #fff;
  }

  .costs-page--transactions .costs-page__field--amount .costs-page__input--amount {
    text-align: left;
    min-height: 3.05rem;
    border-color: #bfdbfe;
    background: #eff6ff;
    font-size: 1.08rem;
    font-weight: 800;
    color: #0f172a;
  }

  .costs-page--transactions .costs-page__smart-control {
    min-height: 2.72rem;
    border-radius: 0.78rem;
  }

  .costs-page--transactions .costs-page__smart-control .costs-page__input {
    min-height: 2.62rem;
    padding: 0.56rem 0.62rem;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .costs-page--transactions .costs-page__smart-control--amount .costs-page__input--amount {
    text-align: right;
    min-height: 2.62rem;
    border: none;
    background: transparent;
    font-size: 1.08rem;
  }

  .costs-page--transactions .costs-page__type-switch {
    min-height: 2.72rem;
    border-radius: 0.78rem;
  }

  .costs-page--transactions .costs-page__type-switch-option {
    padding: 0.32rem 0.42rem;
    gap: 0.32rem;
    font-size: 0.8rem;
  }

  .costs-page--transactions .costs-page__type-switch-mark {
    flex-basis: 1.12rem;
    width: 1.12rem;
    height: 1.12rem;
    font-size: 0.76rem;
  }

  .costs-page--transactions .costs-date-control__trigger {
    min-height: 2.72rem;
    gap: 0.44rem;
    padding-right: 0.58rem;
  }

  .costs-page--transactions .costs-date-control__value {
    font-size: 0.82rem;
    letter-spacing: 0;
  }

  .costs-page--transactions .costs-page__form-doc {
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    gap: 0.52rem;
    padding: 0.54rem;
    border-radius: 0.82rem;
  }

  .costs-page--transactions .costs-page__form-doc-main {
    align-items: center;
    max-width: none;
  }

  .costs-page--transactions .costs-page__form-doc-actions {
    display: inline-grid;
    grid-template-columns: 1fr auto;
    width: auto;
  }

  .costs-page--transactions .costs-page__form-doc-action,
  .costs-page--transactions .costs-page__form-doc-clear {
    min-height: 2.28rem;
  }

  .costs-page--transactions .costs-page__form-doc-clear {
    width: 2.25rem;
  }

  .costs-page--transactions .costs-page__pills {
    gap: 0.28rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .costs-page--transactions .costs-page__pill {
    min-height: 2.72rem;
    padding: 0.52rem 0.58rem;
    border-radius: 0.78rem;
    font-size: 0.78rem;
    justify-content: center;
  }

  .costs-page--transactions .costs-page__recurring-controls {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.34rem;
  }

  .costs-page--transactions .costs-page__pill--recurring {
    width: 100%;
    justify-content: center;
    min-height: 2.72rem;
  }

  .costs-page--transactions .costs-page__recurring-config-link {
    justify-self: center;
    font-size: 0.72rem;
    line-height: 1.1;
  }

  .costs-page--transactions .costs-page__form-actions {
    justify-self: stretch;
    align-self: stretch;
  }

  .costs-page--transactions .costs-page__form-actions .costs-page__btn-primary {
    width: 100%;
    min-height: 3rem;
    padding: 0.72rem 0.9rem;
    border-radius: 0.86rem;
    font-size: 0.96rem;
  }

  .costs-page__toolbar-main,
  .costs-page__toolbar-actions {
    width: auto;
  }

  .costs-page__toolbar-inline-stats {
    white-space: normal;
    flex-wrap: wrap;
    row-gap: 0.2rem;
  }

  .costs-page__filters,
  .costs-page__period,
  .costs-page__category {
    width: auto;
  }

  .costs-page__period-inputs {
    flex-direction: row;
    align-items: center;
  }

  .costs-page__period-sep {
    display: inline;
  }

  /* costs mobile: redesigned transaction cards */
  .costs-page__fixed-head {
    display: none !important;
  }

  .costs-page__table-wrap {
    overflow: visible;
  }

  .costs-page__table {
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  .costs-page__table thead {
    display: none;
  }

  .costs-page__table tbody {
    display: block;
  }

  .costs-page__table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date amount"
      "planfact type"
      "category category"
      "description description"
      "doc actions";
    gap: 0.48rem 0.72rem;
    margin: 0 0 0.7rem;
    padding: 0.72rem 0.78rem;
    border: 1px solid #dbe5f2;
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    overflow: hidden;
  }

  .costs-page__table tbody tr td {
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent !important;
  }

  .costs-page__m-date {
    grid-area: date;
    align-self: center;
    font-size: 0.83rem;
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
  }

  .costs-page__m-amount {
    grid-area: amount;
    align-self: center;
    justify-self: end;
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .costs-page__m-planfact {
    grid-area: planfact;
    align-self: center;
  }

  .costs-page__m-type {
    grid-area: type;
    align-self: center;
    justify-self: end;
  }

  .costs-page__m-category {
    grid-area: category;
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    color: #334155;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .costs-page__m-category::before {
    content: "Категория";
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #94a3b8;
  }

  .costs-page__m-description {
    grid-area: description;
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    color: #1e293b;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .costs-page__m-description::before {
    content: "Описание";
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #94a3b8;
  }

  .costs-page__m-doc {
    grid-area: doc;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
  }

  .costs-page__m-doc::before {
    content: "Документ";
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #94a3b8;
  }

  .costs-page__m-actions {
    grid-area: actions;
    align-self: end;
    justify-self: end;
  }

  .costs-page__m-actions::before {
    display: none;
    content: none;
  }

  .costs-page__payment-doc-cell,
  .costs-page__th-payment-doc {
    min-width: 0;
  }

  .costs-page__payment-doc-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.34rem;
    min-height: auto;
    flex-wrap: wrap;
  }

  .costs-page__actions {
    justify-content: flex-end;
  }

  .costs-page__table .costs-page__empty-row {
    display: block;
    border: none;
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .costs-page__table .costs-page__empty-row td {
    display: block;
    border: none;
    padding: 2rem 0.2rem;
    background: transparent !important;
  }

  .costs-page__table .costs-page__empty-row td::before {
    display: none;
    content: none;
  }

  .costs-page__table .costs-page__empty-row td::after {
    display: none;
    content: none;
  }

  /* costs: transaction edit modal mobile redesign */
  .costs-edit-transaction-modal .summary-modal__body {
    padding-bottom: calc(6.9rem + env(safe-area-inset-bottom));
  }

  .costs-edit-transaction-modal .costs-edit-modal__card {
    margin: 0;
    padding: 0.72rem;
    border-radius: 0.95rem;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  }

  .costs-edit-transaction-modal .costs-edit-modal__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "amount amount"
      "date date"
      "type plan"
      "category category"
      "description description";
    column-gap: 0.55rem;
    row-gap: 0.55rem;
    align-items: stretch;
  }

  .costs-edit-transaction-modal .costs-edit-modal__field--amount { grid-area: amount; }
  .costs-edit-transaction-modal .costs-edit-modal__field--date { grid-area: date; }
  .costs-edit-transaction-modal .costs-edit-modal__field--type { grid-area: type; }
  .costs-edit-transaction-modal .costs-edit-modal__field--plan { grid-area: plan; }
  .costs-edit-transaction-modal .costs-edit-modal__field--category { grid-area: category; }
  .costs-edit-transaction-modal .costs-edit-modal__field--description { grid-area: description; }

  .costs-edit-transaction-modal .summary-modal__new-row label {
    gap: 0.34rem;
    font-size: 0.62rem;
    letter-spacing: 0.03em;
  }

  .costs-edit-transaction-modal .summary-modal__new-row input,
  .costs-edit-transaction-modal .summary-modal__new-row select {
    min-height: 2.4rem;
    padding: 0.62rem 0.72rem;
    border-radius: 0.72rem;
    font-size: 0.9rem;
  }

  .costs-edit-transaction-modal .costs-edit-modal__field--type select {
    width: 100%;
    min-width: 0;
  }

  .costs-edit-transaction-modal .costs-edit-modal__field--amount input {
    min-height: 2.62rem;
    font-size: 1.02rem;
    border-color: #bfdbfe;
    background: #eff6ff;
  }

  .costs-edit-transaction-modal .costs-edit-modal__field--description input {
    min-height: 2.62rem;
  }

  .costs-edit-transaction-modal .costs-edit-modal__error {
    margin-top: 0.6rem;
    font-size: 0.8rem;
  }

  .costs-edit-transaction-modal__footer {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: calc(env(safe-area-inset-bottom) + 0.75rem);
    z-index: 12;
    margin: 0;
    padding: 0.62rem;
    border: 1px solid #dbe5f2;
    border-radius: 0.92rem;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(8px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .costs-edit-transaction-modal__footer .costs-edit-modal__btn {
    width: 100%;
    min-width: 0;
    height: 2.5rem;
    border-radius: 0.72rem;
    font-size: 0.87rem;
  }

  .costs-page__hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Legacy classes kept for other pages using costs-page + mpb-card */
.costs-page .costs-header { padding: 1.25rem 1.75rem; border-bottom: 1px solid var(--mpb-gray-200); }
.costs-page .costs-header h1 { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.25rem; color: var(--mpb-gray-900); }
.costs-page .costs-header p { font-size: 0.875rem; color: var(--mpb-gray-500); margin: 0; }
.costs-page .costs-form-card { margin: 1.25rem 1.75rem; padding: 1.5rem; background: var(--mpb-gray-50); border: 1px solid var(--mpb-gray-200); border-radius: 0.75rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border-left: 4px solid var(--mpb-primary); }
.costs-page .costs-form-card h3 { font-size: 1rem; font-weight: 600; margin: 0 0 1rem; color: var(--mpb-gray-900); }
.costs-page .costs-form-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.costs-page .costs-form-row label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.8125rem; font-weight: 500; color: var(--mpb-gray-700); }
.costs-page .costs-form-row input[type="date"], .costs-page .costs-form-row input[type="number"], .costs-page .costs-form-row input[type="text"], .costs-page .costs-form-row select { padding: 0.5rem 0.75rem; border: 1px solid var(--mpb-gray-200); border-radius: 0.5rem; font-size: 0.8125rem; background: var(--mpb-white); min-width: 0; }
.costs-page .costs-form-row .input-date { width: 10rem; } .costs-page .costs-form-row .input-amount { width: 7rem; } .costs-page .costs-form-row .input-type { width: 8rem; } .costs-page .costs-form-row .input-category { min-width: 260px; flex: 1 1 200px; } .costs-page .costs-form-row .input-desc { flex: 1 1 200px; min-width: 0; }
.costs-page .costs-form-actions { display: flex; gap: 0.5rem; align-items: center; }
.costs-page .costs-form-plan-fact { display: flex; flex-direction: column; gap: 0.25rem; }
.costs-page .costs-form-plan-fact .costs-form-label { font-size: 0.8125rem; font-weight: 500; color: var(--mpb-gray-600); }
.costs-page .costs-form-toggle { display: inline-flex; border: 1px solid var(--mpb-gray-200); border-radius: var(--mpb-radius); overflow: hidden; }
.costs-page .costs-form-toggle button { padding: 0.4rem 0.75rem; font-size: 0.875rem; font-weight: 500; border: none; background: var(--mpb-white); color: var(--mpb-gray-600); cursor: pointer; }
.costs-page .costs-form-toggle button:hover { background: var(--mpb-gray-100); } .costs-page .costs-form-toggle button.is-active { background: var(--mpb-gray-600); color: var(--mpb-white); }
.costs-list-section { border-top: 2px solid var(--mpb-gray-200); background: var(--mpb-white); }
.costs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem 1.75rem; border-bottom: 1px solid var(--mpb-gray-100); }
.costs-filter-toggle { display: flex; gap: 0.25rem; }
.costs-filter-toggle button { padding: 0.4rem 0.75rem; border-radius: var(--mpb-radius); font-size: 0.8125rem; font-weight: 500; background: var(--mpb-gray-100); color: var(--mpb-gray-600); border: none; cursor: pointer; }
.costs-filter-toggle button.is-active { background: var(--mpb-primary); color: var(--mpb-white); }
.costs-toolbar .field { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--mpb-gray-600); }
.costs-toolbar .field input { padding: 0.4rem 0.5rem; border: 1px solid var(--mpb-gray-200); border-radius: 0.375rem; font-size: 0.8125rem; }
.link-group { display: flex; gap: 0.5rem; margin-left: auto; }
.costs-page .link-btn { font-size: 0.8125rem; }
.costs-kpi { display: flex; flex-wrap: wrap; gap: 1rem; padding: 1rem 1.75rem; background: var(--mpb-gray-50); border-bottom: 1px solid var(--mpb-gray-100); }
.costs-kpi-card { padding: 0.75rem 1rem; border-radius: var(--mpb-radius); background: var(--mpb-white); border: 1px solid var(--mpb-gray-200); min-width: 120px; }
.costs-kpi-card .label { font-size: 0.75rem; font-weight: 600; color: var(--mpb-gray-500); margin-bottom: 0.25rem; }
.costs-kpi-card .value { font-size: 1.125rem; font-weight: 700; }
.costs-kpi-card.income .value { color: #059669; } .costs-kpi-card.expense .value { color: #dc2626; } .costs-kpi-card.balance .value { color: var(--mpb-primary); } .costs-kpi-card.balance.negative .value { color: #dc2626; }
.costs-page .costs-table-plan-fact { display: inline-flex; border: 1px solid var(--mpb-gray-200); border-radius: var(--mpb-radius); overflow: hidden; }
.costs-page .costs-table-plan-fact button { padding: 0.25rem 0.5rem; font-size: 0.75rem; font-weight: 500; border: none; background: var(--mpb-white); color: var(--mpb-gray-600); cursor: pointer; }
.costs-page .costs-table-plan-fact button:hover { background: var(--mpb-gray-100); } .costs-page .costs-table-plan-fact button.is-active { background: var(--mpb-gray-600); color: var(--mpb-white); }
.costs-page .costs-table-wrap { margin: 0 1.75rem 1.75rem; overflow: auto; border: 1px solid var(--mpb-gray-200); border-radius: 0.75rem; background: var(--mpb-white); }
.costs-page .mpb-table { font-size: 0.875rem; }

/* Taxes -> Realization */
.taxes-realization-page__metrics {
  margin: 1rem 1.75rem 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.taxes-realization-page__metric {
  border: 1px solid #dbe5f0;
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.taxes-realization-page__metric span {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.taxes-realization-page__metric strong {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
}

.taxes-realization-page__table-wrap {
  margin-top: 0.95rem;
}

.taxes-realization-page__actions {
  margin: 0.75rem 1.75rem 0;
  display: flex;
  justify-content: flex-start;
}

.taxes-realization-page__table th,
.taxes-realization-page__table td {
  white-space: nowrap;
}

.taxes-realization-page__th-amount,
.taxes-realization-page__td-amount {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

/* Taxes -> Calendar */
.taxes-calendar-page__top {
  margin: 0.9rem 2.25rem 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: stretch;
}

.taxes-calendar-page__period-range {
  position: relative;
  border: 1px solid #dbe5f0;
  border-radius: 1rem;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(56, 189, 248, 0.14) 0%, rgba(56, 189, 248, 0) 60%),
    linear-gradient(145deg, #ffffff 0%, #f4f8ff 100%);
  padding: 0.96rem 1rem;
  display: grid;
  gap: 0.44rem;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.taxes-calendar-page__period-range::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.taxes-calendar-page__period-range-head {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.taxes-calendar-page__period-range span {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.taxes-calendar-page__period-range strong {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.taxes-calendar-page__period-range p {
  margin: 0;
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.35;
}

.taxes-calendar-page__icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
}

.taxes-calendar-page__icon-chip.is-reporting {
  background: #e2e8f0;
  color: #334155;
}

.taxes-calendar-page__icon-chip.is-payment {
  background: #dcfce7;
  color: #166534;
}

.taxes-calendar-page__focus-list {
  margin-top: 0.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
}

.taxes-calendar-page__focus-item {
  padding: 0.52rem 0.58rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.78rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px);
  display: grid;
  gap: 0.18rem;
}

.taxes-calendar-page__focus-type {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.36rem;
  border-radius: 999px;
}

.taxes-calendar-page__focus-type--reporting {
  background: #e2e8f0;
  color: #334155;
}

.taxes-calendar-page__focus-type--payment {
  background: #dcfce7;
  color: #166534;
}

.taxes-calendar-page__focus-title {
  font-size: 0.79rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.taxes-calendar-page__focus-meta {
  font-size: 0.7rem;
  color: #475569;
}

.taxes-calendar-page__nearest-focus {
  align-content: start;
  gap: 0.42rem;
}

.taxes-calendar-page__nearest-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.32;
}

.taxes-calendar-page__nearest-meta {
  font-size: 0.73rem;
  color: #475569;
}

.taxes-calendar-page__period-strip {
  margin: 1rem 2.25rem 0 0;
  border: 1px solid #dbe5f0;
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.taxes-calendar-page__period-strip-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.taxes-calendar-page__period-strip-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
}

.taxes-calendar-page__period-strip-table th,
.taxes-calendar-page__period-strip-table td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.taxes-calendar-page__period-strip-table thead th {
  min-width: 12.5rem;
  padding: 0.62rem 0.72rem;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  position: relative;
}

.taxes-calendar-page__period-strip-table thead th:first-child {
  min-width: 8.2rem;
  width: 8.2rem;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 3;
}

.taxes-calendar-page__period-strip-table tbody th {
  min-width: 8.2rem;
  width: 8.2rem;
  padding: 0.62rem 0.72rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 2;
}

.taxes-calendar-page__period-strip-table td {
  min-width: 12.5rem;
  padding: 0.56rem 0.65rem;
  background: #fcfdff;
  position: relative;
}

.taxes-calendar-page__date-head {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
}

.taxes-calendar-page__date-head strong {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2563eb;
}

.taxes-calendar-page__row-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.taxes-calendar-page__period-strip-table th.is-today::before,
.taxes-calendar-page__period-strip-table td.is-today::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%);
  border-radius: 999px;
  z-index: 4;
}

.taxes-calendar-page__period-items {
  display: grid;
  gap: 0.34rem;
}

.taxes-calendar-page__period-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.42rem 0.46rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.56rem;
  background: #fff;
  color: #334155;
  font-size: 0.72rem;
  line-height: 1.28;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.taxes-calendar-page__period-item strong {
  font-size: 0.71rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.taxes-calendar-page__period-empty {
  color: #94a3b8;
  font-size: 0.8rem;
}

.taxes-calendar-page__table-wrap {
  margin-top: 0.95rem;
}

.taxes-calendar-page__table th,
.taxes-calendar-page__table td {
  vertical-align: top;
}

.taxes-calendar-page__table tbody tr.is-today td {
  background: #f8fbff;
}

.taxes-calendar-page__cell-date {
  white-space: nowrap;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  position: relative;
}

.taxes-calendar-page__table tbody tr.is-today .taxes-calendar-page__cell-date::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  border-radius: 999px;
  background: #3b82f6;
}

.taxes-calendar-page__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border-radius: 0.55rem;
  padding: 0.24rem 0.48rem;
  font-size: 0.69rem;
  line-height: 1.1;
  font-weight: 700;
  white-space: nowrap;
}

.taxes-calendar-page__tag--reporting {
  background: #e2e8f0;
  color: #334155;
}

.taxes-calendar-page__tag--payment {
  background: #dcfce7;
  color: #166534;
}

.taxes-calendar-page__tag--object {
  background: #eff6ff;
  color: #1e40af;
}

.taxes-calendar-page__footnote {
  margin: 0.95rem 2.25rem 1.3rem 0;
  padding: 0.72rem 0.86rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #64748b;
}

:is(.taxes-realization-page, .taxes-kudir-page, .taxes-calendar-page) .costs-header {
  position: relative;
}

.taxes-page__dev-badge {
  position: absolute;
  top: 1.35rem;
  right: 2.25rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 119, 6, 0.28);
  background: rgba(254, 243, 199, 0.95);
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.kudir-month-row td {
  background: #f8fbff;
  font-weight: 700;
  border-top: 1px solid #dbe5f0;
}

.kudir-filters {
  margin: 0.9rem 1.75rem 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #d9e3f0;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.kudir-filters-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.kudir-filters-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.kudir-filters-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kudir-filters-meta {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kudir-filter-trigger {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.38rem 0.52rem;
  cursor: pointer;
  text-align: left;
}

.kudir-filter-trigger-caret {
  color: #64748b;
  font-size: 0.88rem;
}

.kudir-filters-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.kudir-filters-panel {
  margin-top: 0.5rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e5edf7;
  max-height: 15rem;
  overflow: auto;
  display: grid;
  gap: 0.45rem;
}

.kudir-filters-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.15rem;
}

.kudir-filters-panel-meta {
  font-size: 0.76rem;
  color: #64748b;
}

.kudir-year-group {
  border: 1px solid #e1e9f4;
  border-radius: 0.75rem;
  padding: 0.42rem 0.55rem 0.5rem;
  background: #fbfdff;
}

.kudir-year-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  color: #1e293b;
}

.kudir-year-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #1e293b;
  font: inherit;
}

.kudir-year-head strong {
  font-size: 0.82rem;
}

.kudir-year-meta {
  font-size: 0.74rem;
  color: #64748b;
}

.kudir-year-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.kudir-year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.1rem, 1fr));
  gap: 0.32rem;
}

.kudir-month-option {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.3rem 0.44rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.5rem;
  background: #fff;
  color: #334155;
  font-size: 0.78rem;
  cursor: pointer;
  user-select: none;
}

.kudir-month-option input {
  margin: 0;
  accent-color: #2563eb;
}

.kudir-month-option.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e40af;
}

@media (max-width: 900px) {
  .kudir-filters-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .kudir-filter-trigger {
    width: 100%;
  }

  .kudir-filters-actions {
    width: 100%;
  }

  .kudir-filters-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.kudir-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.kudir-toggle-btn--inner {
  font-weight: 600;
}

.kudir-toggle-btn--normal {
  font-weight: 400;
}

.kudir-toggle-caret {
  width: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.kudir-child-row td {
  background: #ffffff;
}

.kudir-child-label {
  padding-left: 1rem !important;
  font-weight: 600;
  color: #0f172a;
}

.kudir-subgroup-row td {
  background: #fcfdff;
}

.kudir-subgroup-label {
  padding-left: 2rem !important;
  color: #334155;
}

.kudir-subgroup-action {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 0.15rem;
}

.kudir-subgroup-action:hover {
  color: #0f172a;
}

.kudir-amount-action {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #0f172a;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 0.15rem;
}

.kudir-amount-action:hover {
  color: #1d4ed8;
}

.kudir-amount-action.is-emphasis {
  font-weight: 700;
}

.kudir-tax-details-row td {
  background: #f8fbff;
}

.kudir-tax-details-cell {
  padding-left: 2rem !important;
}

.kudir-tax-details-box {
  display: grid;
  gap: 0.22rem;
  font-size: 0.82rem;
  color: #334155;
}

@media (max-width: 780px) {
  .taxes-realization-page__metrics {
    grid-template-columns: 1fr;
  }

  .taxes-calendar-page__top {
    margin: 0.85rem 1rem 0;
  }

  .taxes-calendar-page__period-strip {
    margin: 0.9rem 1rem 0;
  }

  .taxes-calendar-page__period-strip-table thead th,
  .taxes-calendar-page__period-strip-table td {
    min-width: 11rem;
  }

  .taxes-calendar-page__footnote {
    margin: 0.85rem 1rem 1.1rem;
  }
}

/* ── Purchases page ── */
.purchases-page__card {
  border-radius: 1rem;
  border: 1px solid #dbe5f0;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.purchases-page__hero {
  padding: 2rem 1.75rem 1.5rem;
  background: var(--mpb-inventory-hero-bg);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.purchases-page__hero-main {
  max-width: 50rem;
}

.purchases-page__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.14);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.purchases-page__title {
  margin: 0.72rem 0 0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.purchases-page__subtitle {
  margin: 0.58rem 0 0;
  max-width: 44rem;
  font-size: 0.92rem;
  line-height: 1.58;
  color: rgba(255,255,255,0.88);
}

.purchases-page__hero-actions {
  display: flex;
  align-items: center;
}

.purchases-page__create-btn {
  min-height: 2.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.72rem;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.purchases-page__create-btn:hover {
  background: rgba(255,255,255,0.24);
  transform: translateY(-1px);
}

.purchases-page__toolbar {
  margin: 1rem 2.25rem 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.purchases-page__filters {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
}

.purchases-page__filters-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #94a3b8;
  white-space: nowrap;
}

.purchases-page__status-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
}

.purchases-page__status-toggle button {
  min-height: 1.95rem;
  padding: 0.36rem 0.62rem;
  border-radius: 0.62rem;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.purchases-page__status-toggle button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.purchases-page__status-toggle button.is-active {
  border: none;
  background: #eef2ff;
  color: #1d4ed8;
}

.purchases-page__toolbar .mpb-btn-primary {
  background: #047857;
  border-color: #047857;
}

.purchases-page__toolbar .mpb-btn-primary:hover {
  background: #065f46;
  border-color: #065f46;
}

.purchases-page__toolbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.purchases-page__toolbar-meta span {
  display: inline-flex;
  align-items: center;
  height: 1.9rem;
  padding: 0 0.62rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.purchases-page__alert {
  margin: 1rem 1.75rem 0;
}

.purchases-page__loading {
  padding: 1rem 1.75rem;
}

.purchases-page__table-wrap {
  margin: 1rem 0 1.1rem 0;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.purchases-page__table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.72rem;
}

.purchases-page__th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.46rem 0.42rem !important;
  border-bottom: 1px solid #dbe5f0;
  border-right: 1px solid #edf2f7;
  background: #f8fbff;
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-align: left;
  white-space: nowrap;
}

.purchases-page__th--id {
  width: 4.8%;
}

.purchases-page__th--photos {
  width: 7.2rem;
  min-width: 7.2rem;
  max-width: 7.2rem;
}

.purchases-page__th--note {
  width: 14%;
  min-width: 0;
}

.purchases-page__th--actions {
  width: 3.8rem;
  min-width: 3.8rem;
  max-width: 3.8rem;
  text-align: center;
}

.purchases-page__add-head-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.95rem;
  height: 1.95rem;
  min-width: 1.95rem;
  min-height: 1.95rem;
  padding: 0;
  border: 1px solid #bfdbfe;
  border-radius: 0.52rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  margin: 0 auto;
}

.purchases-page__add-head-btn:hover {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1e40af;
}

.purchases-page__row {
  cursor: pointer;
}

.purchases-page__row td {
  padding: 0.4rem 0.42rem !important;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f8fafc;
  vertical-align: middle;
  color: #334155;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchases-page__row--alt {
  background: #fbfdff;
}

.purchases-page__row:hover td {
  background: #f5f9ff;
}

.purchases-page__status {
  display: inline-flex;
  align-items: center;
  min-height: 1.62rem;
  padding: 0.28rem 0.46rem;
  border-radius: 0.62rem;
  border: none;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.purchases-page__status--draft {
  background: #f1f5f9;
  color: #475569;
}

.purchases-page__status--ordered,
.purchases-page__status--in_transit {
  background: #eff6ff;
  color: #1d4ed8;
}

.purchases-page__status--received {
  background: #ecfdf5;
  color: #047857;
}

.purchases-page__status--paid {
  background: #fef9c3;
  color: #854d0e;
}

.purchases-page__status--cancelled,
.purchases-page__status--written_off {
  background: #ffe4e6;
  color: #be123c;
}

.purchases-page__photos-cell {
  min-width: 0;
}

.purchases-page__photos {
  display: flex;
  gap: 0.24rem;
  flex-wrap: nowrap;
  align-items: center;
}

.purchases-page__photo {
  width: 1.82rem;
  height: 2.46rem;
  object-fit: cover;
  border: 1px solid #d7e3f4;
  border-radius: 0.62rem;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  flex-shrink: 0;
}

.purchases-page__photos-more {
  font-size: 0.66rem;
  font-weight: 700;
  color: #64748b;
}

.purchases-page__docs {
  font-size: 0.75rem;
  color: #64748b;
}

.purchases-page__dash {
  font-size: 0.75rem;
  color: #94a3b8;
}

.purchases-page__note {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.purchases-row-actions {
  display: flex;
  gap: 0.32rem;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.purchases-page__action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0.18rem 0.42rem;
  border-radius: 0.55rem;
  border: 1px solid #d0dbe8;
  background: #fff;
  color: #334155;
  font-size: 0.69rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
}

.purchases-page__action-link:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.purchases-page__action-delete {
  width: 1.8rem;
  height: 1.8rem;
  min-width: 1.8rem;
  min-height: 1.8rem;
  padding: 0;
  border-radius: 0.5rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.purchases-page__action-delete svg {
  width: 0.9rem;
  height: 0.9rem;
}

.purchases-page__table th:nth-child(2),
.purchases-page__table td:nth-child(2) { width: 7%; }

.purchases-page__table th:nth-child(3),
.purchases-page__table td:nth-child(3) { width: 9%; }

.purchases-page__table th:nth-child(4),
.purchases-page__table td:nth-child(4) { width: 8%; }

.purchases-page__table th:nth-child(6),
.purchases-page__table td:nth-child(6) { width: 14%; }

.purchases-page__table th:nth-child(7),
.purchases-page__table td:nth-child(7) { width: 6%; }

.purchases-page__table th:nth-child(8),
.purchases-page__table td:nth-child(8) { width: 7%; }

.purchases-page__table th:nth-child(9),
.purchases-page__table td:nth-child(9) { width: 7%; }

.purchases-page__table th:nth-child(10),
.purchases-page__table td:nth-child(10) { width: 8%; }

.purchases-page__table th:nth-child(11),
.purchases-page__table td:nth-child(11) { width: 3.8rem; }

.purchases-page__table td:nth-child(6) {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.purchases-page__action-delete:hover {
  background: #fee2e2;
}

.purchases-page__footer {
  margin: 0 1.75rem 1.2rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.purchases-page__fixed-head {
  position: fixed;
  z-index: 70;
  display: none;
  overflow: hidden;
  pointer-events: none;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.purchases-page__table--fixed-head {
  margin: 0;
}

.purchases-page__table--fixed-head .purchases-page__th {
  position: relative;
  top: auto;
  z-index: 2;
  background: #f8fbff;
}

@media (max-width: 980px) {
  .purchases-page__hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .purchases-page__hero-actions {
    width: 100%;
  }

  .purchases-page__create-btn {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .purchases-page__fixed-head {
    display: none !important;
  }

  .purchases-page__table-wrap {
    overflow: visible;
  }

  .purchases-page__table {
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  .purchases-page__table thead {
    display: none;
  }

  .purchases-page__table tbody {
    display: block;
  }

  .purchases-page__table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "id status"
      "date amount"
      "received amount"
      "supplier supplier"
      "photos photos"
      "qty written"
      "remaining remaining"
      "actions actions";
    gap: 0.48rem 0.72rem;
    margin: 0 0 0.7rem;
    padding: 0.72rem 0.78rem;
    border: 1px solid #dbe5f2;
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    overflow: hidden;
  }

  .purchases-page__table tbody tr td {
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent !important;
  }

  .purchases-page__m-id {
    grid-area: id;
    align-self: center;
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
  }

  .purchases-page__m-date {
    grid-area: date;
    align-self: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    font-variant-numeric: tabular-nums;
  }

  .purchases-page__m-status {
    grid-area: status;
    align-self: center;
    justify-self: end;
  }

  .purchases-page__m-received-date {
    grid-area: received;
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    align-self: center;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  .purchases-page__m-amount {
    grid-area: amount;
    align-self: center;
    justify-self: end;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .purchases-page__m-supplier {
    grid-area: supplier;
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    color: #334155;
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .purchases-page__m-supplier::before,
  .purchases-page__m-received-date::before,
  .purchases-page__m-photos::before,
  .purchases-page__m-qty::before,
  .purchases-page__m-written::before,
  .purchases-page__m-remaining::before {
    content: attr(data-label);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #94a3b8;
  }

  .purchases-page__m-photos {
    grid-area: photos;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
  }

  .purchases-page__m-qty {
    grid-area: qty;
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    color: #1e293b;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
  }

  .purchases-page__m-written {
    grid-area: written;
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    align-items: flex-end;
    justify-self: end;
    color: #1e293b;
    font-size: 0.8rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .purchases-page__m-remaining {
    grid-area: remaining;
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    color: #1e293b;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
  }

  .purchases-page__m-actions {
    grid-area: actions;
    justify-self: end;
    align-self: end;
  }

  .purchases-page__m-actions::before {
    display: none;
    content: none;
  }

  .purchases-page__table .costs-empty-row {
    display: block;
    border: none;
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .purchases-page__table .costs-empty-row td {
    display: block;
    border: none;
    padding: 2rem 0.2rem;
    background: transparent !important;
  }
}

@media (max-width: 768px) {
  .purchases-page__hero,
  .purchases-page__toolbar,
  .purchases-page__alert,
  .purchases-page__table-wrap,
  .purchases-page__footer,
  .purchases-page__loading {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .purchases-page__hero {
    padding: 1.5rem 1rem 1.2rem;
  }

  .purchases-page__toolbar {
    padding: 0.82rem;
  }
}

.purchases-turnover-page .purchases-page__table-wrap {
  overflow-x: hidden;
}

.purchases-turnover-page__toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 1.5rem 1rem;
  padding: 0.28rem;
  border: 1px solid #dbe5f0;
  border-radius: 999px;
  background: #f8fafc;
}

.purchases-turnover-page__mode-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.55rem 0.95rem;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.purchases-turnover-page__mode-btn--active {
  background: #ffffff;
  color: #1f4ed8;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.purchases-turnover-page__table {
  table-layout: fixed;
  width: 100%;
}

.purchases-turnover-page__table .purchases-page__th,
.purchases-turnover-page__table td {
  padding: 0.46rem 0.4rem;
  font-size: 0.8rem;
}

.purchases-turnover-page__table .purchases-page__th {
  white-space: normal;
  line-height: 1.2;
}

.purchases-turnover-page__table th:nth-child(4),
.purchases-turnover-page__table td:nth-child(4) {
  width: 7%;
  white-space: nowrap;
}

.purchases-turnover-page__table th:nth-child(8),
.purchases-turnover-page__table td:nth-child(8) {
  white-space: nowrap;
}

.purchases-turnover-page__products-table th:nth-child(5),
.purchases-turnover-page__products-table td:nth-child(5),
.purchases-turnover-page__products-table th:nth-child(6),
.purchases-turnover-page__products-table td:nth-child(6),
.purchases-turnover-page__products-table th:nth-child(7),
.purchases-turnover-page__products-table td:nth-child(7) {
  white-space: nowrap;
}

.purchases-turnover-page__product-detail-table .purchases-page__th,
.purchases-turnover-page__product-detail-table td {
  padding-left: 0.34rem;
  padding-right: 0.34rem;
  font-size: 0.78rem;
}

.purchases-turnover-page__product-detail-table th:nth-child(4),
.purchases-turnover-page__product-detail-table td:nth-child(4),
.purchases-turnover-page__product-detail-table th:nth-child(5),
.purchases-turnover-page__product-detail-table td:nth-child(5),
.purchases-turnover-page__product-detail-table th:nth-child(6),
.purchases-turnover-page__product-detail-table td:nth-child(6),
.purchases-turnover-page__product-detail-table th:nth-child(7),
.purchases-turnover-page__product-detail-table td:nth-child(7),
.purchases-turnover-page__product-detail-table th:nth-child(8),
.purchases-turnover-page__product-detail-table td:nth-child(8) {
  white-space: nowrap;
}

.purchases-turnover-page__product-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.5rem;
}

.purchases-turnover-page__product-photo {
  flex: 0 0 auto;
  width: 34px;
  height: 46px;
  border-radius: 0.55rem;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.purchases-turnover-page__product-photo--empty {
  display: grid;
  place-items: center;
  color: #94a3b8;
}

.purchases-turnover-page__product-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.22rem;
}

.purchases-turnover-page__product-text strong {
  color: #172033;
  font-size: 0.8rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchases-turnover-page__product-text span {
  color: #667085;
  font-size: 0.7rem;
  line-height: 1.2;
}

.purchases-turnover-page__product-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.purchases-turnover-page__product-hero-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.7rem;
}

.purchases-turnover-page__product-hero-photo {
  flex: 0 0 auto;
  width: 70px;
  height: 92px;
  border-radius: 0.8rem;
  object-fit: cover;
  border: 1px solid #dbe5f0;
  background: #f8fafc;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.purchases-turnover-page__identity-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-width: 100%;
}

.purchases-turnover-page__identity-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  max-width: 100%;
  border-radius: 0.55rem;
  border: 1px solid #dbe5f0;
  background: #f8fafc;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.38rem 0.62rem;
  overflow-wrap: anywhere;
}

.purchases-turnover-page__summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0 1.35rem 1.15rem;
}

.purchases-turnover-page__summary-card {
  min-width: 0;
  min-height: 96px;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0.78rem 0.82rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.purchases-turnover-page__summary-card--strong {
  border-color: rgba(37, 99, 235, 0.28);
  background: #f7fbff;
}

.purchases-turnover-page__summary-card--stock {
  border-color: rgba(20, 184, 166, 0.25);
  background: #f3fffb;
}

.purchases-turnover-page__summary-card--synthetic {
  border-color: rgba(168, 85, 247, 0.24);
  background: #fbf7ff;
}

.purchases-turnover-page__summary-card--turnover {
  border-color: rgba(245, 158, 11, 0.3);
  background: #fffbeb;
}

.purchases-turnover-page__summary-label,
.purchases-turnover-page__summary-hint {
  display: block;
  color: #667085;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.purchases-turnover-page__summary-value {
  display: block;
  color: #172033;
  font-size: 1.1rem;
  line-height: 1.15;
  margin-top: 0.42rem;
  overflow-wrap: anywhere;
}

.purchases-turnover-page__summary-hint {
  color: #94a3b8;
  font-size: 0.68rem;
  margin-top: 0.38rem;
}

@media (max-width: 768px) {
  .purchases-turnover-page__toolbar {
    margin-left: 1rem;
    margin-right: 1rem;
    width: calc(100% - 2rem);
  }

  .purchases-turnover-page__mode-btn {
    flex: 1 1 0;
  }

  .purchases-turnover-page .purchases-page__table-wrap {
    overflow-x: auto;
  }

  .purchases-turnover-page__table {
    min-width: 940px;
  }

  .purchases-turnover-page__product-hero {
    align-items: flex-start;
  }

  .purchases-turnover-page__product-hero-photo {
    width: 56px;
    height: 74px;
  }

  .purchases-turnover-page__summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 1rem 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1180px) {
  .purchases-turnover-page__summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── Supplies Availability page ── */
.supplies-availability-page .mpb-card {
  border-radius: 1rem;
  border: 1px solid #dbe5f0;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.supplies-availability-page .avail-hero {
  position: relative;
  padding: 2rem 1.75rem 1.35rem;
  background: var(--mpb-inventory-hero-bg);
  color: #fff;
}

.supplies-availability-page .avail-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.14);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.supplies-availability-page .avail-hero__title {
  margin: 0.7rem 0 0;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.supplies-availability-page .avail-hero__subtitle {
  margin: 0.6rem 0 0;
  max-width: 56rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.88);
}

.supplies-availability-page .avail-hero__backlink {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0.42rem 0.85rem;
  border-radius: 0.68rem;
  border: 1px solid rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.supplies-availability-page .avail-hero__backlink:hover {
  background: rgba(255,255,255,0.24);
  transform: translateY(-1px);
}

.supplies-availability-page .avail-alert {
  margin: 1rem 1.75rem 0;
}

.supplies-availability-page .avail-toolbar-head {
  margin: 1.1rem 0 0;
  display: flex;
  justify-content: flex-start;
}

.supplies-availability-page .avail-toolbar__filter-toggle {
  --toolbar-expanded-width: 7.6rem;
}

.supplies-availability-page .avail-toolbar {
  display: grid;
  grid-template-columns: auto auto minmax(14rem, 1fr);
  gap: 0.55rem;
  margin: 1.1rem 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  align-items: start;
  justify-content: start;
}

.avail-toolbar__group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  min-width: 0;
}

.avail-toolbar__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
  width: auto;
}

.supplies-availability-page .avail-toolbar__group:nth-child(3) {
  min-width: 14rem;
}

.supplies-availability-page .avail-toolbar__group:nth-child(3) .avail-toolbar__controls {
  width: 100%;
}

.avail-toolbar__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.avail-toolbar__input {
  min-width: 0;
  height: 2.2rem;
  padding: 0.45rem 0.68rem;
  border: 1px solid #d0dbe8;
  border-radius: 0.62rem;
  background: #fff;
  font-size: 0.84rem;
  color: #0f172a;
}

.avail-toolbar__input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.avail-toolbar__input--search {
  min-width: 0;
  width: 100%;
}

.avail-toolbar__sep {
  color: #94a3b8;
  font-size: 0.9rem;
}

.avail-toolbar__btn-group {
  display: inline-flex;
  border: 1px solid #d0dbe8;
  border-radius: 0.62rem;
  overflow: hidden;
  background: #fff;
}

.avail-toolbar__btn {
  min-height: 2.2rem;
  padding: 0.45rem 0.82rem;
  font-size: 0.79rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.avail-toolbar__btn:hover {
  background: #f1f5f9;
}

.avail-toolbar__btn--active {
  background: #047857;
  color: #fff;
}

.avail-toolbar__btn--active:hover {
  background: #065f46;
}

.avail-table-wrap {
  margin: 1rem 0 1.15rem;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.avail-table {
  --avail-photo-col-w: 72px;
  --avail-name-col-w: 260px;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}

.avail-table-fixed-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  z-index: 260;
  display: none;
  pointer-events: none;
}

.avail-table-fixed-head__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border: none;
  box-shadow: none;
  scrollbar-width: none;
}

.avail-table-fixed-head__viewport::-webkit-scrollbar {
  display: none;
}

.avail-table--fixed-head {
  min-width: 100%;
}

.avail-table thead th,
.avail-table--fixed-head thead th {
  border-radius: 0 !important;
}

.avail-table__th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.62rem 0.75rem;
  text-align: left;
  font-weight: 700;
  color: #64748b;
  background: #f8fbff;
  border-bottom: 1px solid #dbe5f0;
  border-right: 1px solid #edf2f7;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.66rem;
}

.avail-table--fixed-head thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

.avail-table--fixed-head thead .avail-table__th--photo {
  z-index: 7;
}

.avail-table--fixed-head thead .avail-table__th--name {
  z-index: 8;
}

.avail-table__th--photo {
  width: var(--avail-photo-col-w);
  min-width: var(--avail-photo-col-w);
  max-width: var(--avail-photo-col-w);
  text-align: center;
  position: sticky;
  left: 0;
  z-index: 7;
  background: #f8fbff;
}

.avail-table__th--name {
  width: var(--avail-name-col-w);
  min-width: var(--avail-name-col-w);
  max-width: var(--avail-name-col-w);
  position: sticky;
  left: var(--avail-photo-col-w);
  z-index: 8;
  background: #f8fbff;
  box-shadow: 10px 0 14px -12px rgba(15, 23, 42, 0.28);
}

.avail-table__th--date {
  min-width: 96px;
  text-align: center;
}

.avail-table__tr:hover td {
  background: #f7faff;
}

.avail-table__td {
  padding: 0.52rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f8fafc;
  vertical-align: middle;
  background: #fff;
}

.avail-table__td--photo {
  text-align: center;
  width: var(--avail-photo-col-w);
  min-width: var(--avail-photo-col-w);
  max-width: var(--avail-photo-col-w);
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
}

.avail-table__td--name {
  font-weight: 600;
  color: #0f172a;
  width: var(--avail-name-col-w);
  min-width: var(--avail-name-col-w);
  max-width: var(--avail-name-col-w);
  position: sticky;
  left: var(--avail-photo-col-w);
  z-index: 6;
  background: #fff;
  box-shadow: 10px 0 14px -12px rgba(15, 23, 42, 0.18);
}

.avail-table__tr:hover .avail-table__td--photo,
.avail-table__tr:hover .avail-table__td--name {
  background: #f7faff;
}

.avail-table__sku {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
  max-width: 22rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avail-table__td--value {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.avail-table__td--value-link {
  cursor: pointer;
}

.avail-table__td--value-link:hover {
  background: #f8fafc;
}

.avail-table__td--value.is-empty {
  color: #94a3b8;
  font-weight: 500;
}

.avail-table__td--value.is-high {
  color: #047857;
}

.avail-table__td--value.is-mid {
  color: #b45309;
}

.avail-table__td--value.is-low {
  color: #dc2626;
}

.avail-table__photo {
  width: 2.08rem;
  height: 2.82rem;
  object-fit: cover;
  border-radius: 0.62rem;
  border: 1px solid #d7e3f4;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.avail-table__photo-placeholder {
  width: 2.08rem;
  height: 2.82rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #94a3b8;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  border: 1px solid #d7e3f4;
  border-radius: 0.62rem;
}

/* ── Dashboard: Nearest supplies block ── */
.dashboard-page__nearest-supplies {
  margin-top: 0.75rem;
}
.dashboard-page__nearest-supplies-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.875rem;
}
.dashboard-page__nearest-supplies-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--mpb-gray-600);
  padding: 0.25rem 0;
}
.dashboard-page__nearest-supplies-table tbody tr + tr td {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}
.dashboard-page__nearest-supplies-table td {
  padding: 0.35rem 0;
  vertical-align: middle;
  color: var(--mpb-gray-800);
}
.dashboard-page__nearest-supplies-table th:nth-child(1),
.dashboard-page__nearest-supplies-table td:nth-child(1) {
  width: 21%;
}
.dashboard-page__nearest-supplies-table th:nth-child(2),
.dashboard-page__nearest-supplies-table td:nth-child(2) {
  width: 59%;
}
.dashboard-page__nearest-supplies-table th:nth-child(3),
.dashboard-page__nearest-supplies-table td:nth-child(3) {
  width: 20%;
}
.dashboard-page__nearest-supplies-city {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.dashboard-page__nearest-supplies-city-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  flex-shrink: 0;
}
.dashboard-page__nearest-supplies-city-text {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page__top-availability {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.6rem;
}
.dashboard-page__top-availability-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.dashboard-page__top-availability--drr .dashboard-page__top-availability-item {
  gap: 0.95rem;
}

.dashboard-page__top-availability--drr .dashboard-page__top-availability-photo {
  width: 2.58rem;
  height: 3.5rem;
  border-radius: 0.72rem;
}

.dashboard-page__top-availability-photo {
  width: 2.35rem;
  height: 3.15rem;
  border-radius: 0.7rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  border: 1px solid #d7e3f4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dashboard-page__top-availability-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dashboard-page__top-availability-fallback {
  font-size: 0.64rem;
  color: var(--mpb-gray-400);
}
.dashboard-page__top-availability-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.dashboard-page__top-availability-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--mpb-gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-page__top-availability-value {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--mpb-gray-600);
}

.dashboard-page__soon-depleted {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.9rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.dashboard-page__soon-depleted-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.12rem 0;
}

.dashboard-page__soon-depleted-photo {
  width: 2.08rem;
  height: 2.82rem;
  border-radius: 0.62rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  border: 1px solid #d7e3f4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.dashboard-page__soon-depleted-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-page__soon-depleted-photo-fallback {
  color: var(--mpb-gray-400);
  font-size: 0.72rem;
}

.dashboard-page__soon-depleted-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--mpb-gray-800);
}

.dashboard-page__soon-depleted-days {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  padding: 0 0.42rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: 0.1rem;
}

.dashboard-page__kpi--ops-row {
  align-items: stretch;
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
  background: #fff;
}

.dashboard-page__kpi--ops-row-under {
  padding-top: 0;
}

.dashboard-page__ops-card {
  min-width: 0;
}

.dashboard-page__ops-card--wide {
  flex: 2.1 1 620px;
}

.dashboard-page__ops-card--side {
  flex: 1 1 340px;
}

.dashboard-page__ops-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}

.dashboard-page__ops-title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.dashboard-page__ops-empty {
  min-height: 2.35rem;
  display: flex;
  align-items: center;
  padding: 0.72rem 0.8rem;
  border-radius: 0.72rem;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.dashboard-page__cluster-stock-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.dashboard-page__cluster-stock-matrix {
  margin-top: 0.75rem;
  padding: 0.62rem;
  border: 1px solid #dbe6f4;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dashboard-page__cluster-stock-matrix-head,
.dashboard-page__cluster-stock-matrix-row {
  display: grid;
  grid-template-columns: minmax(5rem, 0.95fr) repeat(5, minmax(5.7rem, 1fr)) minmax(5.8rem, 0.85fr);
  align-items: center;
  column-gap: 0.38rem;
}

.dashboard-page__cluster-stock-matrix-head {
  padding: 0 0.1rem 0.32rem;
  background: transparent;
}

.dashboard-page__cluster-stock-matrix-head strong,
.dashboard-page__cluster-stock-matrix-head span {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 850;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0;
  border: 0;
}

.dashboard-page__cluster-stock-matrix-head strong {
  justify-content: flex-start;
}

.dashboard-page__cluster-stock-matrix-row {
  min-height: 5.25rem;
  margin-top: 0.42rem;
  border: 1px solid #e4ebf5;
  border-radius: 0.92rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
  transition: border-color var(--c-transition), box-shadow var(--c-transition), transform var(--c-transition);
}

.dashboard-page__cluster-stock-matrix-row:hover {
  border-color: #bfdbfe;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.09);
  transform: translateY(-1px);
}

.dashboard-page__cluster-stock-product {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.58rem 0.55rem;
}

.dashboard-page__cluster-stock-rank {
  min-width: 1.55rem;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.dashboard-page__cluster-stock-product-photo {
  width: 2.75rem;
  height: 3.45rem;
  border-radius: 0.78rem;
  overflow: hidden;
  border: 1px solid #d7e3f4;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.dashboard-page__cluster-stock-product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-page__cluster-stock-product-meta {
  min-width: 0;
}

.dashboard-page__cluster-stock-product-meta span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 650;
}

.dashboard-page__cluster-stock-cell {
  position: relative;
  min-height: 3.85rem;
  margin: 0.34rem 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0.78rem;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.5rem;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.dashboard-page__cluster-stock-cell::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: var(--stock-level, 0%);
  opacity: 0.78;
  transition: height var(--c-transition), opacity var(--c-transition);
}

.dashboard-page__cluster-stock-cell span {
  position: relative;
  z-index: 1;
}

.dashboard-page__cluster-stock-cell.is-empty {
  color: #94a3b8;
  background: #f8fafc;
}

.dashboard-page__cluster-stock-cell.is-empty::before {
  opacity: 0;
}

.dashboard-page__cluster-stock-cell.is-low::before {
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.35) 0%, rgba(248, 113, 113, 0.32) 100%);
}

.dashboard-page__cluster-stock-cell.is-mid::before {
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.4) 0%, rgba(251, 191, 36, 0.34) 100%);
}

.dashboard-page__cluster-stock-cell.is-high::before {
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.42) 0%, rgba(34, 197, 94, 0.34) 100%);
}

.dashboard-page__cluster-stock-cell--total {
  color: #1d4ed8;
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
}

.dashboard-page__cluster-stock-cell--total::before {
  opacity: 0;
}

.dashboard-page__cluster-stock-column {
  min-width: 0;
  padding: 0.68rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-page__cluster-stock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.58rem;
}

.dashboard-page__cluster-stock-head strong {
  min-width: 0;
  color: #0f172a;
  font-size: 0.86rem;
  line-height: 1.2;
}

.dashboard-page__cluster-stock-head span {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-page__cluster-stock-list {
  display: grid;
  gap: 0.42rem;
}

.dashboard-page__stock-mini-row,
.dashboard-page__warehouse-stock-item {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  min-width: 0;
}

.dashboard-page__stock-mini-photo,
.dashboard-page__warehouse-stock-photo {
  flex: 0 0 auto;
  width: 2rem;
  height: 2.45rem;
  border-radius: 0.55rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  border: 1px solid #d7e3f4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.72rem;
}

.dashboard-page__stock-mini-photo img,
.dashboard-page__warehouse-stock-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-page__stock-mini-meta,
.dashboard-page__warehouse-stock-meta {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.dashboard-page__stock-mini-meta span,
.dashboard-page__warehouse-stock-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
  font-size: 0.76rem;
  line-height: 1.2;
}

.dashboard-page__stock-mini-meta strong,
.dashboard-page__warehouse-stock-meta strong {
  color: #0f172a;
  font-size: 0.78rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.dashboard-page__warehouse-stock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem 1rem;
}

.dashboard-page__warehouse-stock-item {
  padding: 0.58rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.78rem;
  background: #f8fafc;
}

.dashboard-page__warehouse-stock-photo {
  width: 2.32rem;
  height: 3rem;
}

.dashboard-page__warehouse-stock-meta span {
  font-size: 0.82rem;
}

.dashboard-page__warehouse-stock-meta strong {
  font-size: 0.88rem;
}

.dashboard-page__recommendation-tiles {
  display: grid;
  gap: 0.62rem;
  margin-top: 0.76rem;
}

.dashboard-page__recommendation-tile {
  min-width: 0;
  padding: 0.72rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.78rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-page__recommendation-tile-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}

.dashboard-page__recommendation-tile-top span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.dashboard-page__recommendation-tile-top strong {
  min-width: 0;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dashboard-page__recommendation-place {
  min-width: 0;
  margin-top: 0.35rem;
  display: grid;
  gap: 0.08rem;
}

.dashboard-page__recommendation-place span,
.dashboard-page__recommendation-place small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page__recommendation-place span {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-page__recommendation-place small {
  color: #64748b;
  font-size: 0.72rem;
}

.dashboard-page__recommendation-products {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.dashboard-page__recommendation-product,
.dashboard-page__recommendation-more {
  position: relative;
  width: 2.05rem;
  height: 2.55rem;
  border-radius: 0.55rem;
  border: 1px solid #d7e3f4;
  background: #eef4fb;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.dashboard-page__recommendation-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-page__recommendation-product i {
  font-style: normal;
}

.dashboard-page__recommendation-product b {
  position: absolute;
  right: 0.18rem;
  bottom: 0.18rem;
  min-width: 1.1rem;
  padding: 0.08rem 0.22rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 0.58rem;
  line-height: 1.2;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.dashboard-page__recommendation-more {
  background: #f8fafc;
}

@media (max-width: 900px) {
  .dashboard-page__top-availability {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .dashboard-page__soon-depleted {
    max-height: none;
  }

  .dashboard-page__cluster-stock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-page__cluster-stock-matrix-head,
  .dashboard-page__cluster-stock-matrix-row {
    grid-template-columns: minmax(5.2rem, 0.9fr) repeat(5, minmax(5.2rem, 1fr)) minmax(5.4rem, 0.85fr);
  }

  .dashboard-page__cluster-stock-matrix {
    overflow-x: auto;
  }

  .dashboard-page__warehouse-stock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .dashboard-page__top-availability {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 0.85rem;
  }

  .dashboard-page__ops-card--wide,
  .dashboard-page__ops-card--side {
    flex-basis: 100%;
  }
}

@media (max-width: 640px) {
  .dashboard-page__cluster-stock-grid,
  .dashboard-page__warehouse-stock-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page__cluster-stock-matrix-head,
  .dashboard-page__cluster-stock-matrix-row {
    min-width: 45rem;
  }

  .dashboard-page__nearest-supplies-table {
    min-width: 360px;
    font-size: 0.78rem;
  }

  .dashboard-page__nearest-supplies-table thead th {
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .dashboard-page__nearest-supplies-table td {
    white-space: nowrap;
  }
}

.avail-empty {
  margin: 1.8rem;
  font-size: 0.9rem;
  color: #64748b;
  text-align: center;
}
.avail-footer {
  margin: 0 1.75rem 1.4rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .supplies-availability-page .avail-toolbar {
    grid-template-columns: 1fr;
  }

  .avail-toolbar__group {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .supplies-availability-page .avail-hero {
    padding: 1.5rem 1rem 1.15rem;
  }

  .supplies-availability-page .avail-alert,
  .avail-table-wrap,
  .avail-footer {
    margin-left: 0;
    margin-right: 0;
  }

  .supplies-availability-page .avail-toolbar-head,
  .supplies-availability-page .avail-toolbar {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .avail-table__th--name,
  .avail-table__td--name {
    display: none;
  }
}

.mpb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.mpb-table th,
.mpb-table td {
  padding: 0.625rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--mpb-gray-100);
}

.mpb-table th {
  font-weight: 600;
  color: var(--mpb-gray-700);
  background: var(--mpb-gray-50);
}

/* Inventory movement section: unified table header height */
.purchases-page__th,
.sup-page__th,
.avail-table__th,
.ibc-page__table thead th,
.soc-page__th,
.warehouse-page__table thead th,
.suppliers-page .mpb-table th,
.suppliers-detail-page .mpb-table th,
.supplies-bundles-page .mpb-table th,
.supplies-details-page .mpb-table th,
.purchase-detail-page .mpb-table th {
  height: 56px;
  vertical-align: middle;
}

/* Unit Economics page — modern redesign */

/* ── Supply Order Card Page ── */
.soc-page { --soc-r: 0.875rem; --soc-r-sm: 0.5rem; }
.soc-page__back {
  font-size: 0.8125rem;
  color: #6b7280;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s;
}
.soc-page__back:hover { color: #374151; }
.soc-page__alert {
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: var(--soc-r-sm);
  font-size: 0.875rem;
}
.soc-page__loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 2rem;
  justify-content: center;
  color: #6b7280;
  font-size: 0.875rem;
}
.soc-page__spinner {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid #e5e7eb;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: soc-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.soc-page__spinner--lg { width: 1.75rem; height: 1.75rem; border-width: 3px; }
@keyframes soc-spin { to { transform: rotate(360deg); } }

/* Header card */
.soc-page__header-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--soc-r);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.soc-page__header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.soc-page__order-number {
  font-size: 1.375rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}
.soc-page__order-id {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.15rem;
  font-family: monospace;
}
.soc-page__state-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.soc-page__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}
.soc-page__meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.soc-page__meta-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}
.soc-page__meta-value {
  font-size: 0.875rem;
  color: #374151;
  font-weight: 500;
}
.soc-page__meta-value--accent { color: #111827; font-weight: 700; }

/* Section */
.soc-page__section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--soc-r);
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.soc-page__section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}
.soc-page__section-count {
  font-size: 0.75rem;
  font-weight: 500;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}
.soc-page__section-hint {
  font-size: 0.775rem;
  font-weight: 400;
  color: #9ca3af;
}
.soc-page__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 2rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--soc-r);
}

/* Table */
.soc-page__table-wrap {
  overflow: auto;
  background: #fff;
}
.soc-page__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.soc-page__th {
  background: #f8fafc;
  padding: 0.55rem 0.875rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}
.soc-page__th--name { min-width: 220px; }
.soc-page__td {
  padding: 0.6rem 0.875rem;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
  vertical-align: middle;
}
.soc-page__td--photo {
  width: 2.75rem;
  min-width: 2.75rem;
  text-align: center;
  vertical-align: middle;
}
.soc-page__td--name { font-weight: 500; color: #111827; max-width: 280px; }
.soc-page__td--num { text-align: right; font-variant-numeric: tabular-nums; }
.soc-page__row:hover .soc-page__td { background: #f9fafb; }
/* Вертикальное превью как в закупках / остатках по кластерам (не квадрат) */
.soc-page__product-img {
  width: 2.08rem;
  height: 2.82rem;
  object-fit: cover;
  border: 1px solid #d7e3f4;
  border-radius: 0.62rem;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.soc-page__product-placeholder {
  width: 2.08rem;
  height: 2.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  border: 1px solid #d7e3f4;
  border-radius: 0.62rem;
  font-size: 0.95rem;
  margin: 0 auto;
}
.soc-page__qty-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8125rem;
}
.soc-page__select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: var(--soc-r-sm);
  font-size: 0.8125rem;
  background: #fff;
  color: #374151;
  min-width: 220px;
  transition: border-color 0.15s;
}
.soc-page__select:focus { outline: none; border-color: #4f46e5; }
.soc-page__qty-input {
  width: 5rem;
  padding: 0.4rem 0.5rem;
  text-align: right;
  border: 1px solid #e5e7eb;
  border-radius: var(--soc-r-sm);
  font-size: 0.8125rem;
  transition: border-color 0.15s;
}
.soc-page__qty-input:focus { outline: none; border-color: #4f46e5; }

/* Modal */
.soc-page__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.soc-page__modal {
  background: #fff;
  border-radius: var(--soc-r);
  max-width: 900px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.soc-page__modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}
.soc-page__modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}
.soc-page__modal-close {
  background: transparent;
  border: none;
  font-size: 1rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.soc-page__modal-close:hover { color: #374151; background: #f3f4f6; }
.soc-page__modal-body {
  overflow: auto;
  flex: 1;
  padding: 0 1.5rem 1.5rem;
}
.soc-page__pick-btn {
  padding: 0.3rem 0.7rem;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: var(--soc-r-sm);
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.soc-page__pick-btn:hover:not(:disabled) { background: #4338ca; }
.soc-page__pick-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.soc-page__pick-btn--unlink {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.soc-page__pick-btn--unlink:hover:not(:disabled) {
  background: #eef2f7;
  color: #334155;
}

/* ── Supply order detail (/supplies/order) — без серой «коробки» в .mpb-content ── */
.mpb-content:has(.soc-order-page) {
  padding: 0;
  background: #ffffff;
}

.soc-order-page.costs-page .costs-page__card {
  border: none;
  box-shadow: none;
  background: transparent;
}

.soc-order-page.costs-page .costs-page__header {
  padding: 1.35rem clamp(1rem, 8vw, 11rem) 0.75rem;
}

.soc-order-page__main {
  padding: 0 clamp(1rem, 8vw, 11rem) 2.25rem;
}
@media (max-width: 768px) {
  .soc-order-page__main {
    padding: 0 1rem 1.5rem;
  }
}
.soc-order-page__back-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}
.soc-order-page__back-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--mpb-primary, #3b82f6);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s;
}
.soc-order-page__back-link:hover {
  color: var(--mpb-primary-hover, #2563eb);
}
.soc-order-page__hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}
.soc-order-page__titles {
  min-width: 0;
}
.soc-order-page__title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #0f172a;
}
.soc-order-page__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  word-break: break-all;
}
.soc-order-page__state-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.soc-order-page__stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}
.soc-order-page__stat-tile {
  background: #ffffff;
  border: none;
  border-radius: 0.65rem;
  padding: 0.5rem 0.72rem;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.soc-order-page__stat-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}
.soc-order-page__stat-value {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}
.soc-order-page__stat-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}
.soc-order-page__stat-line {
  display: block;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}
.soc-order-page__stat-block {
  margin-top: 1rem;
}
.soc-order-page__stat-grid--dates {
  margin-top: 0;
}
.soc-order-page__stat-locations {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.soc-order-page__stat-grid--dates + .soc-order-page__stat-locations {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
}
.soc-order-page__stat-location-block {
  background: #ffffff;
  border-radius: 0.65rem;
  padding: 0.5rem 0.72rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.soc-order-page__section {
  margin-top: 1.35rem;
  border: none;
  border-radius: 0.75rem;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}
.soc-order-page__section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  background: #ffffff;
  border-bottom: none;
}
.soc-order-page__section-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.soc-order-page__section-head .soc-order-page__section-title {
  line-height: 1.25;
}
.soc-order-page__section-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}
.soc-order-page__section-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding-top: 0.12rem;
}
.soc-order-page__hint {
  font-size: 0.72rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.soc-order-page__hint-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #fef08a;
  border: 1px solid #fde047;
  flex-shrink: 0;
}
.soc-order-page__save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.48rem 1rem;
  border-radius: 0.62rem;
  border: none;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--mpb-primary, #3b82f6) 0%, #4f46e5 100%);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.15s;
}
.soc-order-page__save-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}
.soc-order-page__save-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.soc-order-page .soc-page__table-wrap {
  border: none;
  border-radius: 0;
}
.soc-order-page .soc-page__th {
  background: #ffffff;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.soc-order-page .soc-page__composition-table .soc-page__th,
.soc-order-page .soc-page__composition-table .soc-page__td {
  vertical-align: top;
}
.soc-order-page .soc-page__composition-table .soc-page__td--num {
  padding-top: 0.7rem;
}
.soc-order-page .soc-page__composition-table .soc-order-page__wo-cell {
  padding-top: 0.65rem;
}
.soc-order-page .soc-page__composition-table .soc-page__td--photo {
  vertical-align: top;
}

/* Карточка поставки: мобильный состав — каждая позиция отдельной карточкой */
@media (max-width: 767px) {
  .soc-order-page.costs-page .costs-page__header {
    padding: 0.85rem 0.75rem 0.5rem;
  }
  .soc-order-page__title {
    font-size: 1.2rem;
    line-height: 1.25;
  }
  .soc-order-page__back-row {
    gap: 0.5rem;
  }
  .soc-order-page__stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .soc-order-page__section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.65rem 0 0.85rem;
  }
  .soc-order-page__section-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-top: 0;
    gap: 0.5rem;
  }
  .soc-order-page__hint {
    order: -1;
  }
  .soc-order-page__save-btn {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 1rem;
  }
  .soc-order-page__composition-wrap {
    overflow-x: visible;
    margin: 0 -0.25rem;
  }
  .soc-order-page .soc-page__composition-table {
    border-collapse: separate;
    border-spacing: 0 0.7rem;
    width: 100%;
  }
  .soc-order-page .soc-page__composition-table thead {
    display: none;
  }
  .soc-order-page .soc-page__composition-table tbody tr.soc-page__row {
    display: grid;
    grid-template-columns: 4.25rem minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 0.85rem;
    row-gap: 0.45rem;
    padding: 0.95rem 0.85rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }
  .soc-order-page .soc-page__composition-table tbody tr.soc-page__row > td {
    border-bottom: none;
    padding: 0;
  }
  .soc-order-page .soc-page__composition-table .soc-page__td--photo {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    text-align: center;
    width: 4.25rem;
  }
  .soc-order-page .soc-page__composition-table .soc-page__td--photo .soc-page__product-img {
    width: 100%;
    max-width: 4.25rem;
    height: auto;
    aspect-ratio: 208 / 282;
    max-height: 6rem;
    margin: 0 auto;
    display: block;
    object-fit: cover;
  }
  .soc-order-page .soc-page__composition-table .soc-page__td--photo .soc-page__product-placeholder {
    width: 100%;
    max-width: 4.25rem;
    aspect-ratio: 208 / 282;
    max-height: 6rem;
    margin: 0 auto;
    height: auto;
    min-height: 4.5rem;
  }
  .soc-order-page .soc-page__composition-table tbody tr.soc-page__row > td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
  .soc-order-page .soc-page__composition-table tbody tr.soc-page__row > td:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
  }
  .soc-order-page .soc-page__composition-table tbody tr.soc-page__row > td:nth-child(3)::before {
    content: "Кол-во";
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    margin-bottom: 0.28rem;
  }
  .soc-order-page .soc-page__composition-table tbody tr.soc-page__row > td:nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 3;
    min-width: 0 !important;
    max-width: none !important;
    padding-top: 0.75rem !important;
    margin-top: 0.35rem;
    border-top: 1px solid #f1f5f9;
  }
  .soc-order-page .soc-page__composition-table tbody tr.soc-page__row > td:nth-child(4)::before {
    content: "Списание с закупок";
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 0.45rem;
  }
  .soc-order-page .soc-page__composition-table .soc-page__select {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
  }
  .soc-order-page .soc-page__composition-table .soc-page__qty-input {
    width: 100% !important;
    max-width: 7.5rem;
  }
  .soc-order-page .soc-page__composition-table tr .soc-order-page__wo-confirmed {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }
  .soc-order-page .soc-page__composition-table tr .soc-order-page__icon-btn {
    align-self: flex-start;
  }
  .soc-order-page .soc-page__composition-table .soc-order-page__wo-entry-row {
    flex-wrap: wrap;
    align-items: stretch;
  }
  .soc-order-page .soc-page__composition-table .soc-order-page__wo-entry-row .soc-page__select {
    flex: 1 1 100%;
    min-width: 0;
  }
  .soc-order-page .soc-page__composition-table tbody tr.soc-page__row:hover > td {
    background: transparent;
  }
}
.soc-order-page .soc-page__empty {
  border: none;
  background: transparent;
}
.soc-order-page__product-name {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.35;
}
.soc-order-page__product-meta {
  margin-top: 0.28rem;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.45;
  word-break: break-word;
}
.soc-order-page__wo-cell {
  min-width: 220px;
  max-width: 420px;
}
.soc-order-page__wo-confirmed {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}
.soc-order-page__icon-btn {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.soc-order-page__icon-btn:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #f8fafc;
}
.soc-order-page .soc-page__overlay {
  backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.42);
}
.soc-order-page .soc-page__modal {
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}
.soc-order-page .soc-page__modal-header {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

/* ── Supplies Page ── */
.sup-page { --sup-r: 0.875rem; --sup-r-sm: 0.5rem; }
.sup-page__card {
  background: #fff;
  border-radius: var(--sup-r);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.sup-page__hero {
  padding: 2rem 2.25rem 1.75rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  border-radius: var(--sup-r) var(--sup-r) 0 0;
  color: #fff;
}
.sup-page__hero-inner { max-width: 44rem; }
.sup-page__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 99px;
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  margin-bottom: 0.85rem;
}
.sup-page__title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  color: #fff;
}
.sup-page__subtitle {
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
  color: rgba(255,255,255,0.8);
}
.sup-page__hero-inner::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
  margin-top: 1rem;
}
.sup-page__toolbar {
  margin: 1rem 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}
.sup-page__field { display: flex; flex-direction: column; gap: 0.35rem; }

.sup-page__field--product {
  min-width: min(320px, 100%);
  flex: 0 1 360px;
}
.sup-page__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}
.sup-page__select {
  padding: 0.5rem 0.875rem;
  min-width: 230px;
  border: 1px solid #e5e7eb;
  border-radius: var(--sup-r-sm);
  font-size: 0.875rem;
  background: #fff;
  color: #111827;
  transition: border-color 0.18s, box-shadow 0.18s;
  cursor: pointer;
}
.sup-page__select:hover { border-color: #d1d5db; }
.sup-page__select:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }

.sup-page__product-filter {
  width: 100%;
  height: 2.15rem;
  padding: 0 0.72rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.62rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.82rem;
}

.sup-page__product-filter:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.sup-page__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--sup-r-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.18s, opacity 0.18s;
  align-self: flex-end;
}
.sup-page__btn--primary { background: #4f46e5; color: #fff; }
.sup-page__btn--primary:hover:not(:disabled) { background: #4338ca; }
.sup-page__btn--ghost {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: #374151;
}
.sup-page__btn--ghost:hover:not(:disabled) { background: #f9fafb; border-color: #d1d5db; }
.sup-page__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sup-page__spinner {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sup-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.sup-page__spinner--lg { width: 2rem; height: 2rem; border-width: 3px; border-color: #e5e7eb; border-top-color: #4f46e5; }
@keyframes sup-spin { to { transform: rotate(360deg); } }
.sup-page__summary {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: #6b7280;
  margin-left: auto;
}
.sup-page__filters {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
}

.sup-page__filters-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #94a3b8;
  white-space: nowrap;
}

.sup-page__status-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
}

.sup-page__status-toggle button {
  min-height: 1.95rem;
  padding: 0.36rem 0.62rem;
  border-radius: 0.62rem;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sup-page__status-toggle button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.sup-page__status-toggle button.is-active {
  border: none;
  background: #eef2ff;
  color: #1d4ed8;
}

.sup-page__clear-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.sup-page__clear-btn:hover { color: #374151; background: #f3f4f6; }
.sup-page__alert {
  margin: 1rem 2.25rem;
  padding: 0.875rem 1rem;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: var(--sup-r-sm);
  font-size: 0.875rem;
}
.sup-page__state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3.5rem 2rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  background: linear-gradient(180deg, #fafafa 0%, #f8fafc 100%);
}
.sup-page__table-wrap {
  margin: 1rem 0 0;
  overflow: auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
.sup-page__table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}
.sup-page__fixed-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  z-index: 260;
  display: none;
  pointer-events: none;
}
.sup-page__fixed-head-viewport {
  overflow: hidden;
  background: #fff;
  border: none;
  box-shadow: none;
}
.sup-page__table--fixed-head {
  min-width: 100%;
  will-change: transform;
}
.sup-page__table thead th,
.sup-page__table--fixed-head thead th {
  border-radius: 0 !important;
}
.sup-page__th {
  background: #f8fafc;
  padding: 0.55rem 0.6rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
  box-shadow: 0 1px 0 #dbe5f0;
}
.sup-page__table--fixed-head thead th {
  position: relative;
  z-index: 3;
}
.sup-page__td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sup-page__td--wrap {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}
.sup-page__row:hover .sup-page__td { background: #f9fafb; }
.sup-page__state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.95rem;
  padding: 0.36rem 0.62rem;
  border-radius: 0.62rem;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: normal;
  line-height: 1.2;
  max-width: 90px;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Небольшой визуальный зазор перед колонкой "Склад хранения" */
.sup-page__table th:nth-child(5),
.sup-page__table td:nth-child(5),
.sup-page__table--fixed-head th:nth-child(5) {
  padding-left: 0.95rem;
}

.sup-page__link { color: #4f46e5; text-decoration: none; font-weight: 500; }
.sup-page__link:hover { text-decoration: underline; }
.sup-page__footer {
  padding: 0.875rem 2.25rem 1.25rem;
  font-size: 0.8125rem;
  color: #9ca3af;
  border-top: 1px solid #f1f5f9;
}

.sup-page__delivery-card {
  margin: 1rem 0 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
  overflow: hidden;
}

.sup-page__delivery-head {
  padding: 0.85rem 0.95rem 0.75rem;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.sup-page__delivery-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.sup-page__delivery-subtitle {
  margin: 0.28rem 0 0;
  font-size: 0.74rem;
  line-height: 1.4;
  color: #64748b;
}

.sup-page__delivery-empty {
  padding: 0.9rem 0.95rem;
  color: #94a3b8;
  font-size: 0.78rem;
}

.sup-page__delivery-mode {
  margin-top: 0.7rem;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.18rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.62rem;
  background: #f8fafc;
}

.sup-page__delivery-mode-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.34rem 0.62rem;
  cursor: pointer;
}

.sup-page__delivery-mode-btn.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.sup-page__delivery-table-wrap {
  overflow: auto;
}

.sup-page__delivery-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
}

.sup-page__delivery-table th,
.sup-page__delivery-table td {
  padding: 0.52rem 0.7rem;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}

.sup-page__delivery-table th {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  text-align: left;
}

.sup-page__delivery-days {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.sup-page__delivery-days-btn {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  padding: 0;
}

.sup-page__delivery-days-btn:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.sup-page__delivery-calc-summary {
  display: grid;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.45;
}

.sup-page__delivery-cell-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.sup-page__delivery-expand-btn {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 0.45rem;
  border: 1px solid #d4deeb;
  background: #fff;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 1.3rem;
}

.sup-page__delivery-expand-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.sup-page__delivery-details-cell {
  padding: 0 !important;
  background: #f8fafc;
}

.sup-page__delivery-details-wrap {
  padding: 0.4rem 0.5rem 0.5rem;
}

.sup-page__delivery-details-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.62rem;
  overflow: hidden;
}

.sup-page__delivery-details-table th,
.sup-page__delivery-details-table td {
  padding: 0.44rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.sup-page__delivery-details-table th {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.63rem;
  color: #64748b;
  background: #f8fafc;
}

.sup-page__delivery-details-table tr:last-child td {
  border-bottom: none;
}
.sup-page__td--photos {
  vertical-align: top;
  text-align: left;
}
.sup-page__photo-strip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  width: 100%;
  min-width: 0;
  margin: 0;
}
/* До 12 превью: два ряда по 6, слева */
.sup-page__photo-rows {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 0.28rem;
  max-width: calc(6 * 1.04rem + 5 * 0.28rem);
}
.sup-page__photo-thumb {
  width: 1.04rem;
  height: 1.41rem;
  object-fit: cover;
  border: 1px solid #d7e3f4;
  border-radius: 0.31rem;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  flex-shrink: 0;
}
.sup-page__photo-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  min-height: 1.15rem;
  padding: 0.08rem 0.28rem;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  font-size: 0.58rem;
  font-weight: 700;
  color: #1d4ed8;
  line-height: 1;
  flex-shrink: 0;
}
.sup-page__no-photos {
  color: #9ca3af;
  font-size: 0.75rem;
}

.sup-page__copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.1rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #3730a3;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sup-page__copy-btn:hover {
  border-color: #a5b4fc;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #312e81;
}

.sup-page__copy-btn.is-copied {
  border-color: #86efac;
  background: linear-gradient(135deg, #ecfdf5 0%, #dcfce7 100%);
  color: #166534;
}

/* ── UE Page ── */
/* ── Unit Economics v2 ── */
.ue2 { display: flex; flex-direction: column; gap: 1.25rem; }

/* Hero */
.ue2-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%);
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ue2-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 0%, rgba(99,102,241,0.35) 0%, transparent 60%);
  pointer-events: none;
}
.ue2-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 99px;
  padding: 0.25rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.75rem;
}
.ue2-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
  color: #fff;
  line-height: 1.15;
}
.ue2-subtitle {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.5;
}
.ue2-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 0.5rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.25rem;
}

/* Spinner */
.ue2-spin {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ue2-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.ue2-spin--lg {
  width: 2rem;
  height: 2rem;
  border-color: #e5e7eb;
  border-top-color: #3b82f6;
  border-width: 3px;
}
@keyframes ue2-spin { to { transform: rotate(360deg); } }

/* KPI row */
.ue2-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.ue2-kpi {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ue2-kpi--best { border-left: 3px solid #10b981; }
.ue2-kpi--worst { border-left: 3px solid #f59e0b; }
.ue2-kpi__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 0.35rem;
}
.ue2-kpi__val {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
  line-height: 1.2;
}
.ue2-kpi__val--pos { color: #059669; }
.ue2-kpi__val--neg { color: #dc2626; }
.ue2-kpi__name {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.35rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22ch;
}

/* Toolbar */
.ue2-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: 0.875rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ue2-search-wrap {
  position: relative;
  flex: 1;
  max-width: 380px;
  display: flex;
  align-items: center;
}
.ue2-search-icon {
  position: absolute;
  left: 0.75rem;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  flex-shrink: 0;
}
.ue2-search {
  width: 100%;
  padding: 0.55rem 2.25rem 0.55rem 2.375rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: #111827;
  background: #f9fafb;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.ue2-search:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.ue2-search-clear {
  position: absolute;
  right: 0.625rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 0.75rem;
  padding: 0.25rem;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.15s;
}
.ue2-search-clear:hover { color: #374151; }
.ue2-count {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-left: auto;
  white-space: nowrap;
}

/* Alert */
.ue2-alert {
  padding: 0.875rem 1.25rem;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  font-size: 0.875rem;
}

/* State */
.ue2-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 4rem 2rem;
  text-align: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  color: #6b7280;
}
.ue2-state__icon { font-size: 2.25rem; }
.ue2-state__title { font-size: 1rem; font-weight: 600; color: #374151; margin: 0; }
.ue2-state__sub { font-size: 0.8125rem; margin: 0; }

/* Table wrapper */
.ue2-table-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  overflow: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Table */
.ue2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

/* Headers */
.ue2-th {
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  background: #f8fafc;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
  text-align: right;
}
.ue2-th--product {
  text-align: left;
  min-width: 130px;
  width: 130px;
  max-width: 130px;
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 2px 0 6px -2px rgba(0,0,0,0.06);
}
.ue2-th--num { min-width: 90px; }
.ue2-th--cost { color: #c2410c; }
.ue2-th--profit { color: #047857; min-width: 110px; }
.ue2-th--margin {
  min-width: 126px;
  width: 126px;
  max-width: 126px;
  text-align: left;
}

/* Rows */
.ue2-tr { transition: background 0.12s; cursor: pointer; }
.ue2-tr:hover td { background: #f9fafb; }
.ue2-tr:hover .ue2-td--product { background: #f1f5f9 !important; }
.ue2-tr:not(:last-child) td { border-bottom: 1px solid #f3f4f6; }
.ue2-tr--selected td { background: #eaf2ff; }
.ue2-tr--selected .ue2-td--product { background: #dbeafe !important; }

/* Cells */
.ue2-td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  color: #374151;
}
.ue2-td--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
}
.ue2-td--product {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 2px 0 6px -2px rgba(0,0,0,0.06);
  min-width: 130px;
  width: 130px;
  max-width: 130px;
  padding: 0.625rem 0.65rem;
}
.ue2-td--price {
  font-weight: 700;
  font-size: 0.9rem;
  color: #111827;
}
.ue2-td--cost { color: #78350f; }
.ue2-td--profit {
  font-weight: 800;
  font-size: 0.9375rem;
  color: #065f46;
}
.ue2-td--loss { color: #dc2626 !important; }
.ue2-td--drr {
  text-align: center;
  min-width: 90px;
}
.ue2-td--margin {
  min-width: 126px;
  width: 126px;
  max-width: 126px;
}

/* Sub value (%) */
.ue2-sub {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 0.15rem;
}

/* Profit value */
.ue2-profit-val { font-variant-numeric: tabular-nums; }

/* DRR input */
.ue2-drr-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.ue2-drr-input {
  width: 3.75rem;
  padding: 0.35rem 0.5rem;
  text-align: right;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: #374151;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ue2-drr-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.ue2-drr-suffix {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Product cell */
.ue2-product {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ue2-product__img {
  width: 2.08rem;
  height: 2.82rem;
  object-fit: cover;
  border: 1px solid #d7e3f4;
  border-radius: 0.62rem;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  flex-shrink: 0;
}
.ue2-product__img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
}
.ue2-product__info { min-width: 0; }
.ue2-product__name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12ch;
}
.ue2-product__sku {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 0.15rem;
}
.ue2-product-dup {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.2rem;
  padding: 0.04rem 0.4rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Margin bar */
.ue2-margin {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0 0.25rem;
}
.ue2-margin__label {
  display: flex;
  justify-content: flex-end;
}
.ue2-margin__pct--pos {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #059669;
  font-variant-numeric: tabular-nums;
}
.ue2-margin__pct--neg {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #dc2626;
  font-variant-numeric: tabular-nums;
}
.ue2-margin__track {
  height: 5px;
  background: #f3f4f6;
  border-radius: 99px;
  overflow: hidden;
}
.ue2-margin__bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}
.ue2-margin__bar--pos { background: linear-gradient(90deg, #34d399, #059669); }
.ue2-margin__bar--neg { background: linear-gradient(90deg, #f87171, #dc2626); }
.ue2-nd { font-size: 0.75rem; color: #d1d5db; }

/* ── Layout toggle ── */
.ue2-layout-toggle {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 0.5rem;
  padding: 0.25rem;
  gap: 0.2rem;
  flex-shrink: 0;
}
.ue2-layout-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: #6b7280;
  background: transparent;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.ue2-layout-btn:hover { color: #374151; background: #e9eef5; }
.ue2-layout-btn--active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}

/* ── Horizontal layout specific ── */
.ue2-th--metric-label {
  text-align: left;
  min-width: 200px;
  width: 200px;
  max-width: 200px;
  position: sticky;
  left: 0;
  z-index: 4;
  box-shadow: 2px 0 8px -2px rgba(0,0,0,0.08);
  background: #f8fafc;
}
.ue2-th--product-col {
  min-width: 130px;
  text-align: center;
  vertical-align: bottom;
  padding-bottom: 0 !important;
}

/* Product column header */
.ue2-col-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem 0.75rem;
}
.ue2-col-header__img {
  width: 2.08rem;
  height: 2.82rem;
  object-fit: cover;
  border: 1px solid #d7e3f4;
  border-radius: 0.62rem;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  flex-shrink: 0;
}
.ue2-col-header__img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
}
.ue2-col-header__name {
  font-size: 0.73rem;
  font-weight: 600;
  color: #374151;
  text-align: center;
  line-height: 1.3;
  max-width: 110px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ue2-col-header__sku {
  font-size: 0.67rem;
  color: #9ca3af;
}
.ue2-th--selected {
  background: #eff6ff !important;
}

.ue2-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.8rem;
  background: #f8fbff;
}
.ue2-row-actions__label {
  font-size: 0.78rem;
  color: #475569;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ue2-row-actions__buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.ue2-row-action-btn {
  border: 1px solid #cdd9e8;
  border-radius: 0.62rem;
  background: #fff;
  color: #334155;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.32rem 0.56rem;
  cursor: pointer;
}
.ue2-row-action-btn:hover { background: #f8fafc; }
.ue2-row-action-btn--ghost { color: #475569; }
.ue2-row-action-btn--danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff7f7;
}

.ue2-inline-edit {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  margin: 0;
  padding: 0.05rem 0.18rem;
  border-radius: 0.35rem;
  cursor: pointer;
}
.ue2-inline-edit:hover {
  background: #eef2ff;
}
.ue2-inline-edit--manual {
  color: #1d4ed8;
  font-weight: 700;
}
.ue2-inline-input {
  width: 100%;
  min-width: 4.2rem;
  border: 1px solid #93c5fd;
  border-radius: 0.42rem;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  line-height: inherit;
  padding: 0.1rem 0.3rem;
  text-align: inherit;
}
.ue2-inline-input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.ue2-tax-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(2px);
}

.ue2-tax-modal__dialog {
  width: min(38rem, 100%);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border: 1px solid #dbe5f0;
  border-radius: 1rem;
  box-shadow: 0 28px 68px rgba(15, 23, 42, 0.24);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.ue2-tax-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ue2-tax-modal__eyebrow {
  margin: 0 0 0.2rem;
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ue2-tax-modal__title {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.25;
}

.ue2-tax-modal__sku {
  margin: 0.22rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
}

.ue2-tax-modal__close {
  border: 1px solid #dbe5f0;
  background: #f8fafc;
  color: #334155;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.ue2-tax-modal__field {
  display: grid;
  gap: 0.4rem;
}

.ue2-tax-modal__field span {
  color: #475569;
  font-size: 0.79rem;
  font-weight: 600;
}

.ue2-tax-modal__field select {
  min-height: 2.35rem;
  border: 1px solid #d0dbe8;
  border-radius: 0.62rem;
  padding: 0.4rem 0.65rem;
  color: #0f172a;
  background: #fff;
  font-size: 0.88rem;
}

.ue2-tax-modal__field select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.ue2-tax-modal__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.72rem;
  background: #f8fbff;
  padding: 0.58rem 0.65rem;
}

.ue2-tax-modal__checkbox input {
  margin-top: 0.05rem;
}

.ue2-tax-modal__checkbox span {
  color: #334155;
  font-size: 0.81rem;
  line-height: 1.35;
}

.ue2-tax-modal__checkbox.is-disabled {
  opacity: 0.62;
}

.ue2-tax-modal__hint {
  margin: 0;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.35;
}

.ue2-tax-modal__doc-status {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
  font-weight: 600;
}

.ue2-tax-modal__doc-status--has {
  color: #166534;
}

.ue2-tax-modal__doc-status--missing {
  color: #b91c1c;
}

.ue2-tax-modal__doc-status--unknown {
  color: #475569;
}

.ue2-tax-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 0.2rem;
}

.ue2-tax-modal__actions-right {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.ue2-tax-modal__save-btn {
  border-color: #c7d2fe;
  color: #1d4ed8;
  background: #eef2ff;
}

/* Horizontal table rows */
.ue2-htr { transition: background 0.12s; }
.ue2-htr:hover .ue2-htd:not(.ue2-htd--section-label) { background: #f9fafb; }
.ue2-htr:hover .ue2-htd--label { background: #f1f5f9 !important; }

.ue2-htr--section td { border-bottom: none !important; }
.ue2-htr--profit-section { margin-top: 0.25rem; }
.ue2-htr--profit-row .ue2-htd { background: #f9fffe !important; }
.ue2-htr--profit-row:hover .ue2-htd { background: #ecfdf5 !important; }
.ue2-htr--profit-row:hover .ue2-htd--label { background: #d1fae5 !important; }
.ue2-htr--margin-row .ue2-htd { background: #f8fafc !important; }
.ue2-htr--margin-row:hover .ue2-htd { background: #f1f5f9 !important; }
.ue2-htr--margin-row:hover .ue2-htd--label { background: #e2e8f0 !important; }

/* Horizontal table cells */
.ue2-htd {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  text-align: right;
  vertical-align: middle;
}
.ue2-htd--stack {
  text-align: center;
  min-width: 112px;
}
.ue2-htd__main {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
}
.ue2-htd__sub {
  margin-top: 0.28rem;
  font-size: 0.74rem;
  line-height: 1.15;
  color: #6b7280;
}
.ue2-htd__sub--input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ue2-htd--section-label {
  padding: 0.4rem 1.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6b7280;
  background: #f8fafc;
  border-bottom: none !important;
  border-top: 1px solid #e5e7eb;
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 200px;
  width: 200px;
  max-width: 200px;
  box-shadow: 2px 0 8px -2px rgba(0,0,0,0.08);
}
.ue2-htd--section-spacer {
  padding: 0.4rem 0.75rem;
  min-width: 1px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  vertical-align: middle;
}
.ue2-htd--profit-label {
  color: #047857;
  background: #f0fdf4 !important;
}
.ue2-htd--label {
  text-align: left;
  font-weight: 500;
  color: #374151;
  min-width: 200px;
  width: 200px;
  max-width: 200px;
  padding-left: 1.25rem !important;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 2px 0 8px -2px rgba(0,0,0,0.08);
}
.ue2-unit {
  font-size: 0.68rem;
  font-weight: 600;
  color: #9ca3af;
  margin-left: 0.25rem;
}
.ue2-htd--price { font-weight: 700; color: #111827; }
.ue2-htd--cost { color: #78350f; }
.ue2-htd--pct { color: #6b7280; font-size: 0.775rem; }
.ue2-htd--input { text-align: center; }
.ue2-htd--profit-val { font-weight: 800; color: #065f46; font-size: 0.9rem; }
.ue2-htd--margin-val { font-weight: 700; color: #065f46; font-size: 0.86rem; }
.ue2-htd--loss { color: #dc2626 !important; }
.ue2-htd--margin-cell { min-width: 110px; }

/* UE2 visual refresh */
.ue2 {
  position: relative;
  gap: 1.5rem;
}
.ue2::before {
  content: "";
  position: absolute;
  inset: -1rem 0 auto;
  height: 18rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.12), transparent 42%),
    radial-gradient(circle at 100% 10%, rgba(14, 165, 233, 0.14), transparent 34%);
  pointer-events: none;
  filter: blur(12px);
}
.ue2-hero {
  align-items: stretch;
  gap: 1.5rem;
  min-height: 15rem;
  border: 1px solid rgba(191, 219, 254, 0.28);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow:
    0 18px 50px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.ue2-hero::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.ue2-hero__content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}
.ue2-hero__eyebrow {
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.01em;
}
.ue2-badge {
  margin-bottom: 0.9rem;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.ue2-title {
  font-size: clamp(2rem, 3vw, 2.65rem);
  margin-bottom: 0.6rem;
}
.ue2-subtitle {
  max-width: 40rem;
  font-size: 0.97rem;
  color: rgba(255, 255, 255, 0.78);
}
.ue2-hint {
  border-radius: 999px;
  backdrop-filter: blur(14px);
}
.ue2-hero-panel {
  position: relative;
  z-index: 1;
  width: min(25rem, 100%);
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.25rem;
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.18);
}
.ue2-hero-panel__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.ue2-hero-panel__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.35rem;
}
.ue2-hero-panel__title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.ue2-hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.ue2-hero-stat {
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ue2-hero-stat__label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.66);
  margin-bottom: 0.25rem;
}
.ue2-hero-stat__value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.ue2-hero-stat__value--pos { color: #86efac; }
.ue2-hero-stat__value--neg { color: #fdba74; }
.ue2-hero-panel__foot {
  font-size: 0.76rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}
.ue2-kpi-row {
  gap: 1rem;
}
.ue2-kpi {
  position: relative;
  overflow: hidden;
  border-radius: 1.15rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 1.2rem 1.3rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 24px rgba(15, 23, 42, 0.05);
}
.ue2-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(59,130,246,0.08), rgba(37,99,235,0.55), rgba(14,165,233,0.16));
}
.ue2-kpi__label {
  margin-bottom: 0.5rem;
  color: #94a3b8;
}
.ue2-kpi__val {
  font-size: clamp(1.7rem, 2vw, 2rem);
}
.ue2-kpi__name {
  margin-top: 0.5rem;
  max-width: none;
}
.ue2-toolbar {
  position: sticky;
  top: 0.75rem;
  z-index: 6;
  gap: 1rem;
  border-radius: 1.15rem;
  padding: 0.95rem 1.1rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.ue2-search-wrap {
  max-width: 28rem;
}
.ue2-search {
  height: 2.9rem;
  border-radius: 0.9rem;
  background: rgba(248, 250, 252, 0.9);
}
.ue2-count {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}
.ue2-toolbar-actions-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.ue2-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0 0.25rem;
}
.ue2-toolbar-note {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #475569;
}
.ue2-toolbar-note--muted {
  color: #64748b;
}
.ue2-toolbar-note__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  flex-shrink: 0;
}
.ue2-toolbar-note__code {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0 0.55rem;
  border-radius: 0.55rem;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
}
.ue2-alert,
.ue2-state,
.ue2-table-wrap {
  border-radius: 1.2rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 14px 32px rgba(15, 23, 42, 0.06);
}
.ue2-state {
  min-height: 18rem;
  gap: 0.85rem;
  background:
    linear-gradient(180deg, rgba(248,250,252,0.92), rgba(255,255,255,1)),
    #fff;
}
.ue2-state__symbol {
  width: 4rem;
  height: 4rem;
  border-radius: 1.2rem;
  border: 1px solid #dbeafe;
  background:
    radial-gradient(circle at 30% 30%, rgba(96, 165, 250, 0.24), transparent 38%),
    linear-gradient(180deg, #f8fbff, #eff6ff);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.ue2-state__symbol::before,
.ue2-state__symbol::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.ue2-state__symbol--box::before {
  width: 1.65rem;
  height: 1.2rem;
  border: 1.6px solid #60a5fa;
  border-radius: 0.4rem;
  background: rgba(255,255,255,0.7);
}
.ue2-state__symbol--box::after {
  width: 1.05rem;
  height: 1.6px;
  background: #60a5fa;
  margin-top: -0.3rem;
}
.ue2-state__symbol--search::before {
  width: 1.25rem;
  height: 1.25rem;
  border: 1.8px solid #60a5fa;
  border-radius: 999px;
  margin-left: -0.2rem;
  margin-top: -0.15rem;
}
.ue2-state__symbol--search::after {
  width: 0.75rem;
  height: 1.8px;
  background: #60a5fa;
  border-radius: 999px;
  transform: translate(25%, 120%) rotate(45deg);
}
.ue2-table-wrap {
  position: relative;
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.95);
}
.ue2-table-wrap::before {
  content: "";
  position: sticky;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 0;
  box-shadow: 0 1px 0 rgba(226, 232, 240, 0.8);
  z-index: 5;
}
.ue2-fixed-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  z-index: 260;
  display: none;
  pointer-events: none;
}
.ue2-fixed-head__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border-left: 1px solid rgba(226, 232, 240, 0.95);
  border-right: 1px solid rgba(226, 232, 240, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 18px -14px rgba(15, 23, 42, 0.45);
  scrollbar-width: none;
}
.ue2-fixed-head__viewport::-webkit-scrollbar {
  display: none;
}
.ue2-table {
  min-width: max(100%, 72rem);
  font-size: 0.84rem;
}
.ue2-table--fixed-head {
  min-width: 100%;
}
.ue2-th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.9rem 1rem;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(10px);
  color: #64748b;
}
.ue2-th--product {
  min-width: 100px;
  width: 100px;
  max-width: 100px;
}
.ue2-th--margin {
  min-width: 126px;
  width: 126px;
  max-width: 126px;
}
.ue2-th--product,
.ue2-th--metric-label {
  z-index: 4;
  background: rgba(248, 250, 252, 0.98);
}
.ue2-table--fixed-head .ue2-th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.ue2-table--fixed-head .ue2-th--product,
.ue2-table--fixed-head .ue2-th--metric-label {
  z-index: 6;
}
.ue2-tr:nth-child(2n) .ue2-td {
  background: rgba(248, 250, 252, 0.55);
}
.ue2-tr:nth-child(2n) .ue2-td--product {
  background: rgba(255, 255, 255, 0.98);
}
.ue2-tr:hover td {
  background: #f8fbff;
}
.ue2-td {
  padding: 0.9rem 1rem;
}
.ue2-td--product {
  padding: 0.75rem 1rem;
  min-width: 100px;
  width: 100px;
  max-width: 100px;
}
.ue2-td--margin {
  min-width: 126px;
  width: 126px;
  max-width: 126px;
}
.ue2-td--price {
  color: #0f172a;
}
.ue2-td--cost,
.ue2-htd--cost {
  color: #9a3412;
}
.ue2-td--profit,
.ue2-htd--profit-val {
  color: #047857;
}
.ue2-sub {
  margin-top: 0.24rem;
  font-size: 0.75rem;
  color: #94a3b8;
}
.ue2-drr-wrap {
  gap: 0.35rem;
}
.ue2-drr-input {
  width: 4.4rem;
  height: 2.35rem;
  border-radius: 0.8rem;
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #fff, #f8fafc);
  font-weight: 600;
}
.ue2-drr-input::placeholder {
  color: #cbd5e1;
}
.ue2-product {
  gap: 0.85rem;
}
.ue2-product__img,
.ue2-col-header__img {
  width: 2.56rem;
  height: 3.46rem;
  object-fit: cover;
  border-radius: 0.62rem;
  border: 1px solid #d7e3f4;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.ue2-product__img {
  width: 2.08rem;
  height: 2.82rem;
}
.ue2-product__name {
  max-width: 30ch;
  font-size: 0.86rem;
}
.ue2-product__sku,
.ue2-col-header__sku {
  color: #94a3b8;
}
.ue2-margin {
  gap: 0.42rem;
}
.ue2-margin__track {
  height: 0.42rem;
  background: #e5edf7;
}
.ue2-margin__pct--pos,
.ue2-margin__pct--neg {
  font-size: 0.84rem;
}
.ue2-layout-toggle {
  padding: 0.3rem;
  border-radius: 0.85rem;
  background: #eef2ff;
}
.ue2-layout-btn {
  min-height: 2.35rem;
  border-radius: 0.7rem;
}
.ue2-th--product-col {
  min-width: 112px;
  width: 112px;
  max-width: 112px;
}
.ue2-col-header {
  gap: 0.45rem;
}
.ue2-col-header__name {
  color: #0f172a;
  max-width: 84px;
}
.ue2-htr:hover .ue2-htd:not(.ue2-htd--section-label) {
  background: #f8fbff;
}
.ue2-htd {
  padding: 0.68rem 0.72rem;
}
.ue2-htd--stack {
  min-width: 90px;
}
.ue2-htd--section-label {
  background: #f8fafc;
  color: #64748b;
}
.ue2-htd--label {
  color: #334155;
}

@media (min-width: 901px) {
  .ue2-td--product .ue2-product__name,
  .ue2-td--product .ue2-product__sku {
    display: none;
  }
}

@media (max-width: 1200px) {
  .ue2-hero {
    flex-direction: column;
  }
  .ue2-hero-panel {
    width: 100%;
    margin-left: 0;
  }
  .ue2-toolbar {
    flex-wrap: wrap;
  }
  .ue2-count {
    margin-left: 0;
  }
  .ue2-row-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .ue2 {
    gap: 1.1rem;
  }
  .ue2-hero {
    padding: 1.4rem;
    border-radius: 1.2rem;
  }
  .ue2-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ue2-toolbar-meta {
    padding: 0;
  }
  .ue2-toolbar-note {
    font-size: 0.8rem;
  }
  .ue2-row-actions {
    padding: 0.6rem 0.7rem;
  }
  .ue2-row-actions__label {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .ue2-kpi-row {
    grid-template-columns: 1fr;
  }
  .ue2-title {
    font-size: 1.7rem;
  }
  .ue2-subtitle {
    font-size: 0.9rem;
  }
  .ue2-hero-stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ue2-toolbar {
    top: 0.5rem;
    padding: 0.8rem;
  }
  .ue2-search-wrap {
    max-width: none;
    width: 100%;
  }
  .ue2-toolbar-actions-label {
    display: none;
  }
  .ue2-layout-toggle {
    width: 100%;
    justify-content: space-between;
  }
  .ue2-layout-btn {
    flex: 1;
    justify-content: center;
  }
  .ue2-row-actions__buttons {
    width: 100%;
  }
  .ue2-row-action-btn {
    flex: 1;
    text-align: center;
  }
  .ue2-tax-modal {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(3px);
  }
  .ue2-tax-modal__dialog {
    width: 100%;
    max-width: none;
    max-height: min(92dvh, 100dvh);
    border-radius: 1rem 1rem 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 0.9rem 0.9rem calc(0.9rem + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.26);
    gap: 0.72rem;
  }
  .ue2-tax-modal__header {
    position: sticky;
    top: 0;
    z-index: 3;
    margin: -0.9rem -0.9rem 0;
    padding: 0.86rem 0.9rem 0.62rem;
    border-bottom: 1px solid #e5edf7;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
  }
  .ue2-tax-modal__title {
    font-size: 0.96rem;
    line-height: 1.28;
  }
  .ue2-tax-modal__eyebrow {
    font-size: 0.69rem;
  }
  .ue2-tax-modal__sku {
    font-size: 0.75rem;
  }
  .ue2-tax-modal__close {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1.22rem;
  }
  .ue2-tax-modal__field {
    gap: 0.3rem;
  }
  .ue2-tax-modal__field span {
    font-size: 0.76rem;
  }
  .ue2-tax-modal__field select {
    min-height: 2.7rem;
    padding: 0.48rem 0.66rem;
    font-size: 0.9rem;
  }
  .ue2-tax-modal__checkbox {
    padding: 0.65rem 0.68rem;
    gap: 0.62rem;
  }
  .ue2-tax-modal__checkbox input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.14rem;
    flex-shrink: 0;
  }
  .ue2-tax-modal__checkbox span {
    font-size: 0.8rem;
    line-height: 1.33;
  }
  .ue2-tax-modal__hint {
    font-size: 0.75rem;
  }
  .ue2-tax-modal__doc-status {
    font-size: 0.75rem;
  }
  .ue2-tax-modal__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding-top: 0.32rem;
  }
  .ue2-tax-modal__actions > .ue2-row-action-btn {
    width: 100%;
  }
  .ue2-tax-modal__actions-right {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .ue2-tax-modal__actions .ue2-row-action-btn,
  .ue2-tax-modal__actions-right .ue2-row-action-btn {
    flex: initial;
    min-height: 2.6rem;
    font-size: 0.82rem;
    border-radius: 0.72rem;
    padding: 0.36rem 0.6rem;
  }
}

@media (max-width: 380px) {
  .ue2-tax-modal__dialog {
    padding: 0.82rem 0.78rem calc(0.82rem + env(safe-area-inset-bottom));
  }
  .ue2-tax-modal__header {
    margin: -0.82rem -0.78rem 0;
    padding: 0.74rem 0.78rem 0.56rem;
  }
  .ue2-tax-modal__actions-right {
    grid-template-columns: 1fr;
  }
}

/* Keep old ue-page classes to avoid breaking anything else */
.ue-page {
  --ue-r: 0.875rem;
  --ue-r-sm: 0.5rem;
}

.ue-page__card {
  background: #fff;
  border-radius: var(--ue-r);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

/* Hero */
.ue-page__hero {
  padding: 2rem 2.25rem 1.75rem;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
  border-radius: var(--ue-r) var(--ue-r) 0 0;
  color: #fff;
}
.ue-page__hero-inner { max-width: 44rem; }
.ue-page__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 99px;
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  margin-bottom: 0.85rem;
}
.ue-page__title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  color: #fff;
}
.ue-page__subtitle {
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
  color: rgba(255,255,255,0.82);
}
.ue-page__hero-inner::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
  margin-top: 1rem;
}

/* Toolbar */
.ue-page__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  padding: 1.25rem 2.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
.ue-page__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ue-page__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}
.ue-page__select {
  padding: 0.5rem 0.875rem;
  min-width: 230px;
  border: 1px solid #e5e7eb;
  border-radius: var(--ue-r-sm);
  font-size: 0.875rem;
  background: #fff;
  color: #111827;
  transition: border-color 0.18s, box-shadow 0.18s;
  cursor: pointer;
}
.ue-page__select:hover { border-color: #d1d5db; }
.ue-page__select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.ue-page__loading-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
}
.ue-page__meta {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}
.ue-page__meta-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}
.ue-page__meta-label {
  font-size: 0.8125rem;
  color: #6b7280;
}

/* Spinner */
.ue-page__spinner {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: ue-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.ue-page__spinner--lg {
  width: 2rem;
  height: 2rem;
  border-width: 3px;
}
@keyframes ue-spin { to { transform: rotate(360deg); } }

/* Alert */
.ue-page__alert {
  margin: 1rem 2.25rem;
  padding: 0.875rem 1rem;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: var(--ue-r-sm);
  font-size: 0.875rem;
}

/* State (loading/empty) */
.ue-page__state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  background: linear-gradient(180deg, #fafafa 0%, #f8fafc 100%);
  border-bottom: 1px solid #f1f5f9;
}

/* Table wrapper */
.ue-page__table-wrap {
  margin: 1.5rem 2.25rem 2rem;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: var(--ue-r);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  background: #fff;
}

/* Table */
.ue-page__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.ue-page__table td,
.ue-page__table th {
  padding: 0;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

/* Product header */
.ue-page__product-th {
  min-width: 130px;
  vertical-align: bottom;
  text-align: center;
  padding: 0.75rem 0.75rem 0 !important;
  background: #f8fafc;
  border-bottom: 2px solid #e5e7eb !important;
}
.ue-page__product-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.75rem;
}
.ue-page__product-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.ue-page__product-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  font-size: 1.5rem;
}
.ue-page__product-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.3;
  text-align: center;
  max-width: 120px;
  word-break: break-word;
}
.ue-page__product-sku {
  font-size: 0.7rem;
  color: #9ca3af;
  text-align: center;
}

/* Label col (sticky) */
.ue-page__label-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 2px 0 6px -2px rgba(0,0,0,0.06);
}

/* Group rows */
.ue-page__group-row td {
  padding: 0.45rem 1.25rem !important;
  border-bottom: none !important;
}
.ue-page__group-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.ue-page__group-row--revenue td { background: #eff6ff; color: #1d4ed8; }
.ue-page__group-row--cost td { background: #fff7ed; color: #c2410c; }
.ue-page__group-row--profit td { background: #f0fdf4; color: #15803d; }
.ue-page__group-row--neutral td { background: #f8fafc; color: #6b7280; }

/* Group row label col inherits group color */
.ue-page__group-row--revenue .ue-page__label-col { background: #eff6ff; }
.ue-page__group-row--cost .ue-page__label-col { background: #fff7ed; }
.ue-page__group-row--profit .ue-page__label-col { background: #f0fdf4; }
.ue-page__group-row--neutral .ue-page__label-col { background: #f8fafc; }

/* Metric rows */
.ue-page__metric-row td { padding: 0.5rem 0.75rem !important; }
.ue-page__metric-row:last-child td { border-bottom: 2px solid #e5e7eb !important; }
.ue-page__metric-row--revenue { background: #fafcff; }
.ue-page__metric-row--cost { background: #fff; }
.ue-page__metric-row--profit { background: #f9fffe; }
.ue-page__metric-row:hover td { background: #f8fafc !important; }
.ue-page__metric-row:hover .ue-page__label-col { background: #f1f5f9 !important; }

.ue-page__metric-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 180px;
  padding: 0.5rem 1.25rem !important;
}
.ue-page__metric-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
}
.ue-page__metric-unit {
  font-size: 0.7rem;
  font-weight: 600;
  color: #9ca3af;
  margin-left: auto;
  flex-shrink: 0;
}

/* Cells */
.ue-page__cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  padding: 0.5rem 1rem !important;
  color: #374151;
}
.ue-page__cell--pct { color: #6b7280; font-size: 0.775rem; }
.ue-page__cell--neutral { color: #374151; }
.ue-page__cell--cost { color: #6b7280; }
.ue-page__cell--positive {
  font-weight: 700;
  font-size: 0.875rem;
  color: #059669;
}
.ue-page__cell--negative {
  font-weight: 700;
  font-size: 0.875rem;
  color: #dc2626;
}
/* Revenue price row */
.ue-page__metric-row--revenue .ue-page__cell--neutral {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #111827;
}

/* DRR input */
.ue-page__cell--input { text-align: center; }
.ue-page__drr-input {
  width: 4.5rem;
  padding: 0.3rem 0.5rem;
  text-align: right;
  border: 1px solid #e5e7eb;
  border-radius: 0.4rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: #374151;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ue-page__drr-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* ── Inventory by Clusters page ── */
.ibc-page {
  --ibc-r: 0.875rem;
  --ibc-r-sm: 0.5rem;
  --ibc-content-x: 2.25rem;
}

.ibc-page__card {
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  border: none;
  overflow: hidden;
}

/* Hero */
.ibc-page__hero {
  padding: 2rem 2.25rem 1.75rem;
  background: var(--mpb-inventory-hero-bg);
  border-radius: 0;
  color: #fff;
}
.ibc-page__hero-inner { max-width: 44rem; }
.ibc-page__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 99px;
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  margin-bottom: 0.85rem;
}
.ibc-page__title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  color: #fff;
}
.ibc-page__subtitle {
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
  color: rgba(255,255,255,0.8);
}
.ibc-page__hero-inner::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
  margin-top: 1rem;
}

/* Toolbar */
.ibc-page__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  padding: 1.25rem 2.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
.ibc-page__filters {
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
  min-width: 0;
}
.ibc-page__filters-title {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7c8da5;
}
.ibc-page__section-title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.ibc-page__section-title-icon {
  width: 1.28rem;
  height: 1.28rem;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  border-radius: 0.36rem;
}
.ibc-page__section-title-icon svg {
  width: 0.76rem;
  height: 0.76rem;
}
.ibc-page__layout-btn-icon {
  width: 1rem;
  height: 1rem;
  border: 1px solid #dbeafe;
  border-radius: 0.28rem;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.ibc-page__layout-btn-icon svg {
  width: 0.62rem;
  height: 0.62rem;
}
.ibc-page__filters-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
  overflow: visible;
  padding-bottom: 0;
  scrollbar-width: none;
}
.ibc-page__filters-list::-webkit-scrollbar {
  display: none;
}
.ibc-page__filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.58rem;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #f7fbff;
  color: #8aa0bc;
  min-height: 1.92rem;
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.ibc-page__filter-btn:hover {
  background: #f7fbff;
  border-color: #dbeafe;
  color: #8aa0bc;
}
.ibc-page__filter-btn.is-active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
  box-shadow: none;
}
.ibc-page__field { display: flex; flex-direction: column; gap: 0.35rem; }
.ibc-page__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}
.ibc-page__select {
  padding: 0.5rem 0.875rem;
  min-width: 230px;
  border: 1px solid #e5e7eb;
  border-radius: var(--ibc-r-sm);
  font-size: 0.875rem;
  background: #fff;
  color: #111827;
  transition: border-color 0.18s, box-shadow 0.18s;
  cursor: pointer;
}
.ibc-page__select:hover { border-color: #d1d5db; }
.ibc-page__select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.ibc-page__cluster-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
  min-height: 2.125rem;
}
.ibc-page__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  font-size: 0.775rem;
  font-weight: 500;
}
.ibc-page__chip--ok { background: #dcfce7; color: #15803d; }
.ibc-page__chip--warn { background: #fef3c7; color: #92400e; }
.ibc-page__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--ibc-r-sm);
  background: #047857;
  color: #fff;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, opacity 0.18s;
  align-self: flex-end;
}
.ibc-page__btn:hover:not(:disabled) { background: #065f46; }
.ibc-page__btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ibc-page__summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.22rem;
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 500;
  margin-left: auto;
}
.ibc-page__summary-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.ibc-page__summary-sub {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}
.ibc-page__summary .ibc-page__fetched-at {
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
}
.ibc-page__summary strong {
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
}
.ibc-page__table-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem var(--ibc-content-x) 0;
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
  line-height: 1.35;
}
.ibc-page__table-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0.72rem;
  margin: 0.56rem 0 0;
  padding-inline: 0;
}
.ibc-page__table-head-controls {
  order: 2;
  min-width: 0;
  display: grid;
  gap: 0.54rem;
  align-content: start;
  margin-inline: 0;
  padding: 0.68rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.ibc-page__table-head-controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(14rem, 1fr);
  gap: 0.62rem;
  align-items: start;
}
.ibc-page__section-title-icon--toggle {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.ibc-page__section-title-icon-caret {
  position: absolute;
  right: -0.2rem;
  bottom: -0.22rem;
  width: 0.64rem;
  height: 0.64rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ibc-page__section-title-icon-caret svg {
  width: 0.44rem;
  height: 0.44rem;
}
.ibc-page__table-layout-group {
  display: grid;
  align-content: start;
  justify-items: start;
  align-items: flex-start;
  gap: 0.38rem;
  flex-wrap: nowrap;
}
.ibc-page__table-layout-group .ue2-toolbar-actions-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7c8da5;
}
.ibc-page__recommended {
  order: 1;
  margin-inline: 0;
  margin-top: 0;
  min-width: 0;
  padding: 0.68rem 1.45rem 1.45rem;
  border: none;
  border-radius: 1.5rem;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}
.ibc-page__recommended::after {
  display: none;
}
.ibc-page__recommended-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-inline: 0;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
}
.ibc-page__recommended-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.ibc-page__recommended-icon {
  width: 1.28rem;
  height: 1.28rem;
  border-radius: 0.36rem;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}
.ibc-page__recommended-icon svg {
  width: 0.76rem;
  height: 0.76rem;
}
.ibc-page__recommended-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0.25rem 0 0;
  letter-spacing: -0.03em;
  white-space: nowrap;
  line-height: 1;
}
.ibc-page__recommended-create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.72rem 1.15rem;
  border: none;
  border-radius: 0.5rem;
  color: #2563eb;
  font-size: var(--c-fs-sm);
  font-weight: 700;
  background: #eff6ff;
  box-shadow: none;
  transition: transform var(--c-transition), box-shadow var(--c-transition), background var(--c-transition);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.ibc-page__recommended-create-btn:hover {
  background: #dbeafe;
}
.ibc-page__recommended-more-btn {
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.ibc-page__recommended-list {
  display: flex;
  gap: 0.95rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.22rem;
  scrollbar-width: thin;
  position: relative;
  z-index: 1;
}
.ibc-page__recommended-card {
  flex: 0 0 calc((100% - 2.85rem) / 4);
  min-width: calc((100% - 2.85rem) / 4);
  border: none;
  border-radius: 1rem;
  background: #fff;
  padding: 0.8rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.ibc-page__recommended-card-btn {
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
}
.ibc-page__recommended-card-btn:hover {
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
}
.ibc-page__recommended-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 2.4em auto;
  gap: 0.34rem 0.8rem;
  margin-bottom: 0.72rem;
  align-items: start;
}
.ibc-page__recommended-head strong {
  font-size: 1.22rem;
  line-height: 1.1;
  color: #0f172a;
  grid-column: 1;
  grid-row: 1;
}
.ibc-page__recommended-head .ibc-page__recommended-place {
  font-size: 0.82rem;
  line-height: 1.2;
  color: #64748b;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  column-gap: 0.44rem;
  row-gap: 0.04rem;
  min-height: 2.4em;
  max-height: 2.4em;
}
.ibc-page__recommended-head .ibc-page__recommended-place-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 1.2rem;
  height: 2.4em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}
.ibc-page__recommended-head .ibc-page__recommended-place-icon svg {
  width: 1.04rem;
  height: 1.04rem;
}
.ibc-page__recommended-head .ibc-page__recommended-place-cluster,
.ibc-page__recommended-head .ibc-page__recommended-place-warehouse {
  grid-column: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.ibc-page__recommended-head .ibc-page__recommended-place-cluster {
  grid-row: 1;
}
.ibc-page__recommended-head .ibc-page__recommended-place-warehouse {
  grid-row: 2;
}
.ibc-page__recommended-head .ibc-page__recommended-turnover {
  font-size: 0.74rem;
  line-height: 1.2;
  color: #1e3a8a;
  font-weight: 700;
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  align-items: center;
  column-gap: 0.44rem;
}
.ibc-page__recommended-head .ibc-page__recommended-turnover-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1e3a8a;
  flex: 0 0 auto;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1;
}
.ibc-page__recommended-head .ibc-page__recommended-turnover-icon svg {
  width: 0.82rem;
  height: 0.82rem;
}
.ibc-page__recommended-head .ibc-page__recommended-open-chip {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  border: none;
  border-radius: 0.5rem;
  color: #2563eb !important;
  font-size: 0.72rem !important;
  font-weight: 600;
  background: #eff6ff;
  padding: 0.14rem 0.52rem;
  line-height: 1.1;
  margin: 0;
}
.ibc-page__recommended-divider {
  height: 1px;
  background: #e5edf7;
  margin: 0.42rem 0 0.68rem;
}
.ibc-page__recommended-products {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.46rem;
}
.ibc-page__recommended-product {
  display: inline-grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.28rem;
  background: transparent;
  border: none;
  border-radius: 0.9rem;
  padding: 0.4rem 0.46rem;
}
.ibc-page__recommended-product--ghost {
  visibility: hidden;
}
.ibc-page__recommended-product--more {
  justify-items: center;
  align-content: center;
  gap: 0.16rem;
  background: transparent;
  border: none;
}
.ibc-page__recommended-more-label {
  font-size: 0.58rem;
  line-height: 1;
  color: #64748b;
  min-width: 0;
}
.ibc-page__recommended-product--more strong {
  font-size: 0.74rem;
  line-height: 1;
  color: #1e3a8a;
  font-weight: 800;
}
.ibc-page__recommended-photo {
  width: 1.74rem;
  height: 2.28rem;
  border-radius: 0.3rem;
  object-fit: cover;
  border: 1px solid #d7e3f4;
  background: #f8fbff;
}
.ibc-page__recommended-photo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.56rem;
  color: #94a3b8;
}
.ibc-page__recommended-product span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  color: #0f1d40;
  text-align: center;
  white-space: nowrap;
}
.ibc-page__recommended-empty {
  font-size: 0.72rem;
  color: #94a3b8;
  padding: 0.4rem 0.2rem;
}
.ibc-page__recommended-modal .summary-modal__dialog {
  max-width: none;
  width: calc(100vw - 0.5rem);
  max-height: calc(100dvh - 1.5rem);
  margin: 0 auto;
}
.ibc-page__recommended-modal {
  z-index: 9999;
  align-items: flex-start;
  padding-top: calc(0.5rem + env(safe-area-inset-top));
  padding-bottom: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ibc-page__recommended-modal .summary-modal__body {
  display: block;
  flex: 1 1 auto;
  padding: 0.56rem 0.62rem 0.72rem;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.ibc-page__recommended-create-setup {
  margin-bottom: 0.56rem;
  border: 1px solid #d6e3f4;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.64rem;
  display: grid;
  gap: 0.62rem;
}
.ibc-page__recommended-create-headline {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.1;
}
.ibc-page__recommended-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.ibc-page__recommended-create-field {
  display: grid;
  gap: 0.24rem;
  min-width: 0;
}
.ibc-page__recommended-create-label {
  font-size: 0.56rem;
  line-height: 1.1;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ibc-page__recommended-create-select-wrap {
  border: 1px solid #dbeafe;
  border-radius: 0.56rem;
  background: #eff6ff;
  padding: 0.18rem;
}
.ibc-page__recommended-create-select {
  width: 100%;
  min-width: 0;
  height: 1.82rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0 0.5rem;
}
.ibc-page__recommended-create-select:disabled {
  color: #94a3b8;
  background: #f8fafc;
}
.ibc-page__recommended-create-stats {
  display: grid;
  gap: 0.4rem;
}
.ibc-page__recommended-create-stats-title {
  font-size: 0.62rem;
  color: #7c8da5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}
.ibc-page__recommended-create-stats-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}
.ibc-page__recommended-create-stat-card {
  border: 1px solid #d6e4f6;
  border-radius: 0.7rem;
  background: #fff;
  padding: 0.46rem 0.52rem;
  text-align: left;
  display: grid;
  gap: 0.24rem;
  cursor: pointer;
}
.ibc-page__recommended-create-stat-card.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
}
.ibc-page__recommended-create-stat-name {
  font-size: 0.74rem;
  line-height: 1.2;
  color: #1e293b;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ibc-page__recommended-create-stat-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.14rem 0.34rem;
  font-size: 0.62rem;
  color: #64748b;
  line-height: 1.25;
}
.ibc-page__recommended-create-stats-empty {
  font-size: 0.72rem;
  color: #94a3b8;
  padding: 0.34rem 0.2rem;
}
.ibc-page__recommended-create-hint {
  font-size: 0.74rem;
  color: #64748b;
  border: 1px dashed #bfdbfe;
  border-radius: 0.62rem;
  background: #f8fbff;
  padding: 0.62rem;
}
.ibc-page__recommended-editor {
  display: grid;
  gap: 0.44rem;
  --ibc-reco-photo-col: 2.5rem;
  --ibc-reco-name-col: 10.6rem;
  --ibc-reco-metric-col: minmax(4.9rem, 0.92fr);
  --ibc-reco-sales-col: minmax(3.6rem, 0.7fr);
  --ibc-reco-sales-period-col: 2.75rem;
  --ibc-reco-days-col: minmax(4.9rem, 0.92fr);
  --ibc-reco-proc-col: minmax(4.9rem, 0.92fr);
  --ibc-reco-reorder-col: minmax(7.1rem, 1fr);
  --ibc-reco-target-col: minmax(5.4rem, 0.8fr);
  --ibc-reco-qty-col: minmax(2.75rem, 0.5fr);
  --ibc-reco-action-col: minmax(2.2rem, max-content);
}
.ibc-page__recommended-editor-metrics-head {
  display: grid;
  grid-template-columns: var(--ibc-reco-photo-col) var(--ibc-reco-name-col) var(--ibc-reco-metric-col) var(--ibc-reco-sales-col) var(--ibc-reco-reorder-col) var(--ibc-reco-target-col) var(--ibc-reco-qty-col) var(--ibc-reco-action-col);
  align-items: center;
  gap: 0.2rem;
  padding: 0.14rem 0.12rem 0.04rem;
}
.ibc-page__recommended-editor-head-spacer {
  width: 100%;
  height: 1px;
  visibility: hidden;
  pointer-events: none;
}
.ibc-page__recommended-editor-head-spacer--photo {
  grid-column: 1;
}
.ibc-page__recommended-editor-head-spacer--name {
  grid-column: 2;
}
.ibc-page__recommended-editor-row {
  display: grid;
  grid-template-columns: var(--ibc-reco-photo-col) var(--ibc-reco-name-col) var(--ibc-reco-metric-col) var(--ibc-reco-sales-col) var(--ibc-reco-reorder-col) var(--ibc-reco-target-col) var(--ibc-reco-qty-col) var(--ibc-reco-action-col);
  align-items: center;
  gap: 0.2rem;
  padding: 0.16rem 0.12rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.62rem;
  background: #f8fbff;
}
.ibc-page__recommended-editor.is-stock-breakdown-expanded .ibc-page__recommended-editor-metrics-head,
.ibc-page__recommended-editor.is-stock-breakdown-expanded .ibc-page__recommended-editor-row {
  grid-template-columns: var(--ibc-reco-photo-col) var(--ibc-reco-name-col) var(--ibc-reco-metric-col) var(--ibc-reco-metric-col) var(--ibc-reco-metric-col) var(--ibc-reco-sales-col) var(--ibc-reco-reorder-col) var(--ibc-reco-target-col) var(--ibc-reco-qty-col) var(--ibc-reco-action-col);
}
.ibc-page__recommended-editor.is-sales-breakdown-expanded .ibc-page__recommended-editor-metrics-head,
.ibc-page__recommended-editor.is-sales-breakdown-expanded .ibc-page__recommended-editor-row {
  grid-template-columns: var(--ibc-reco-photo-col) var(--ibc-reco-name-col) var(--ibc-reco-metric-col) var(--ibc-reco-sales-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-reorder-col) var(--ibc-reco-target-col) var(--ibc-reco-qty-col) var(--ibc-reco-action-col);
}
.ibc-page__recommended-editor.is-stock-breakdown-expanded.is-sales-breakdown-expanded .ibc-page__recommended-editor-metrics-head,
.ibc-page__recommended-editor.is-stock-breakdown-expanded.is-sales-breakdown-expanded .ibc-page__recommended-editor-row {
  grid-template-columns: var(--ibc-reco-photo-col) var(--ibc-reco-name-col) var(--ibc-reco-metric-col) var(--ibc-reco-metric-col) var(--ibc-reco-metric-col) var(--ibc-reco-sales-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-reorder-col) var(--ibc-reco-target-col) var(--ibc-reco-qty-col) var(--ibc-reco-action-col);
}
.ibc-page__recommended-editor.is-reorder-breakdown-expanded .ibc-page__recommended-editor-metrics-head,
.ibc-page__recommended-editor.is-reorder-breakdown-expanded .ibc-page__recommended-editor-row {
  grid-template-columns: var(--ibc-reco-photo-col) var(--ibc-reco-name-col) var(--ibc-reco-metric-col) var(--ibc-reco-sales-col) var(--ibc-reco-reorder-col) var(--ibc-reco-days-col) var(--ibc-reco-proc-col) var(--ibc-reco-target-col) var(--ibc-reco-qty-col) var(--ibc-reco-action-col);
}
.ibc-page__recommended-editor.is-stock-breakdown-expanded.is-reorder-breakdown-expanded .ibc-page__recommended-editor-metrics-head,
.ibc-page__recommended-editor.is-stock-breakdown-expanded.is-reorder-breakdown-expanded .ibc-page__recommended-editor-row {
  grid-template-columns: var(--ibc-reco-photo-col) var(--ibc-reco-name-col) var(--ibc-reco-metric-col) var(--ibc-reco-metric-col) var(--ibc-reco-metric-col) var(--ibc-reco-sales-col) var(--ibc-reco-reorder-col) var(--ibc-reco-days-col) var(--ibc-reco-proc-col) var(--ibc-reco-target-col) var(--ibc-reco-qty-col) var(--ibc-reco-action-col);
}
.ibc-page__recommended-editor.is-sales-breakdown-expanded.is-reorder-breakdown-expanded .ibc-page__recommended-editor-metrics-head,
.ibc-page__recommended-editor.is-sales-breakdown-expanded.is-reorder-breakdown-expanded .ibc-page__recommended-editor-row {
  grid-template-columns: var(--ibc-reco-photo-col) var(--ibc-reco-name-col) var(--ibc-reco-metric-col) var(--ibc-reco-sales-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-reorder-col) var(--ibc-reco-days-col) var(--ibc-reco-proc-col) var(--ibc-reco-target-col) var(--ibc-reco-qty-col) var(--ibc-reco-action-col);
}
.ibc-page__recommended-editor.is-stock-breakdown-expanded.is-sales-breakdown-expanded.is-reorder-breakdown-expanded .ibc-page__recommended-editor-metrics-head,
.ibc-page__recommended-editor.is-stock-breakdown-expanded.is-sales-breakdown-expanded.is-reorder-breakdown-expanded .ibc-page__recommended-editor-row {
  grid-template-columns: var(--ibc-reco-photo-col) var(--ibc-reco-name-col) var(--ibc-reco-metric-col) var(--ibc-reco-metric-col) var(--ibc-reco-metric-col) var(--ibc-reco-sales-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-sales-period-col) var(--ibc-reco-reorder-col) var(--ibc-reco-days-col) var(--ibc-reco-proc-col) var(--ibc-reco-target-col) var(--ibc-reco-qty-col) var(--ibc-reco-action-col);
}
.ibc-page__recommended-editor-name {
  display: grid;
  gap: 0.06rem;
  font-size: 0.82rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.ibc-page__recommended-editor-name-sku {
  font-weight: 750;
  color: #1e293b;
}
.ibc-page__recommended-editor-name-title {
  font-size: 0.72rem;
  font-weight: 560;
  color: #64748b;
}
.ibc-page__recommended-editor-stock-col {
  border: 1px solid #dbeafe;
  border-radius: 0.46rem;
  background: #f8fbff;
  padding: 0.14rem 0.18rem;
  display: grid;
  gap: 0.06rem;
}
.ibc-page__recommended-editor-stock-label {
  font-size: 0.56rem;
  line-height: 1.1;
  color: #64748b;
  font-weight: 650;
  display: flex;
  align-items: center;
  min-height: 1.24rem;
}
.ibc-page__recommended-editor-stock-value {
  font-size: 0.78rem;
  line-height: 1.1;
  color: #1e3a8a;
  font-weight: 800;
}
.ibc-page__recommended-editor-total-col {
  border: 1px solid #bfdbfe;
  border-radius: 0.46rem;
  background: #eff6ff;
  padding: 0.14rem 0.18rem;
  display: grid;
  gap: 0.06rem;
}
.ibc-page__recommended-editor-days-col {
  border: 1px solid #dbeafe;
  border-radius: 0.46rem;
  background: #f8fbff;
  padding: 0.14rem 0.18rem;
  display: grid;
  gap: 0.06rem;
}
.ibc-page__recommended-editor-processing-col {
  border: 1px solid #dbeafe;
  border-radius: 0.46rem;
  background: #f8fbff;
  padding: 0.14rem 0.18rem;
  display: grid;
  gap: 0.06rem;
}
.ibc-page__recommended-editor-reorder-col,
.ibc-page__recommended-editor-target-col {
  border: 1px solid #dbeafe;
  border-radius: 0.46rem;
  background: #f8fbff;
  padding: 0.14rem 0.18rem;
  display: grid;
  gap: 0.06rem;
}
.ibc-page__recommended-editor-flow-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.18rem;
}
.ibc-page__recommended-editor-flow-cols--single {
  grid-template-columns: minmax(0, 1fr);
}
.ibc-page__recommended-editor-flow-col {
  border: 1px solid #dbeafe;
  border-radius: 0.46rem;
  background: #f8fbff;
  padding: 0.14rem 0.18rem;
  display: grid;
  gap: 0.06rem;
}
.ibc-page__recommended-editor-flow-col--sum {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.ibc-page__recommended-editor-flow-label {
  font-size: 0.56rem;
  line-height: 1.1;
  color: #64748b;
  font-weight: 650;
  display: flex;
  align-items: center;
  min-height: 1.24rem;
}
.ibc-page__recommended-editor-flow-value {
  font-size: 0.74rem;
  line-height: 1.1;
  color: #1e3a8a;
  font-weight: 800;
}
.ibc-page__recommended-editor-sales-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.24rem;
}
.ibc-page__recommended-editor-sales-cols.is-expanded {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.ibc-page__recommended-editor-sales-col {
  border: 1px solid #dbeafe;
  border-radius: 0.46rem;
  background: #f8fbff;
  padding: 0.14rem 0.18rem;
  display: grid;
  gap: 0.06rem;
}
.ibc-page__recommended-editor-sales-period-col {
  border: 1px solid #dbeafe;
  border-radius: 0.46rem;
  background: #f8fbff;
  padding: 0.14rem 0.18rem;
  display: grid;
  gap: 0.06rem;
}
.ibc-page__recommended-editor-sales-col--main {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.ibc-page__recommended-editor-sales-label {
  font-size: 0.52rem;
  line-height: 1.1;
  color: #64748b;
  font-weight: 650;
  display: flex;
  align-items: center;
  min-height: 1.24rem;
}
.ibc-page__recommended-editor-sales-value {
  font-size: 0.72rem;
  line-height: 1.1;
  color: #1e3a8a;
  font-weight: 800;
}
.ibc-page__recommended-editor-qty,
.ibc-page__recommended-editor-target-input,
.ibc-page__recommended-editor-input {
  height: 1.82rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.5rem;
}
.ibc-page__recommended-editor-remove,
.ibc-page__recommended-editor-add-btn {
  height: 1.82rem;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  background: #fef2f2;
  color: #ef4444;
  padding: 0 0.58rem;
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
}
.ibc-page__recommended-editor-add-btn {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
.ibc-page__recommended-editor-remove--icon {
  width: 1.82rem;
  height: 1.82rem;
  aspect-ratio: 1 / 1;
  min-width: 1.82rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
}
.ibc-page__recommended-editor-remove--icon svg {
  width: 0.92rem;
  height: 0.92rem;
}
.ibc-page__recommended-editor-row .ibc-page__recommended-editor-qty,
.ibc-page__recommended-editor-row .ibc-page__recommended-editor-remove {
  width: 100%;
  min-width: 0;
}
.ibc-page__recommended-editor-row .ibc-page__recommended-editor-remove--icon {
  width: 1.82rem;
  min-width: 1.82rem;
}
.ibc-page__recommended-editor-target-input {
  width: 100%;
  min-width: 0;
}
.ibc-page__recommended-editor-add {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.46rem;
  margin-top: 0.08rem;
  padding: 0.32rem 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-height: 10.4rem;
}
.ibc-page__recommended-editor.is-create .ibc-page__recommended-editor-add {
  min-height: min(84dvh, 54rem);
}
.ibc-page__recommended-editor-add-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.2rem;
}
.ibc-page__recommended-editor-add-title {
  font-size: 0.72rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0;
}
.ibc-page__recommended-editor-stock-head,
.ibc-page__recommended-editor-sales-head {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  margin: 0;
}
.ibc-page__recommended-editor-stock-head {
  grid-column: 3;
}
.ibc-page__recommended-editor-sales-head {
  grid-column: 4;
}
.ibc-page__recommended-editor-reorder-head {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  margin: 0;
  grid-column: 5;
}
.ibc-page__recommended-editor.is-stock-breakdown-expanded .ibc-page__recommended-editor-sales-head {
  grid-column: 6;
}
.ibc-page__recommended-editor.is-stock-breakdown-expanded .ibc-page__recommended-editor-reorder-head {
  grid-column: 7;
}
.ibc-page__recommended-editor.is-sales-breakdown-expanded .ibc-page__recommended-editor-reorder-head {
  grid-column: 9;
}
.ibc-page__recommended-editor.is-stock-breakdown-expanded.is-sales-breakdown-expanded .ibc-page__recommended-editor-reorder-head {
  grid-column: 11;
}
.ibc-page__recommended-editor-sales-toggle {
  width: 1.28rem;
  height: 1.28rem;
  border-radius: 0.36rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ibc-page__recommended-editor-sales-head-title {
  font-size: 0.68rem;
  line-height: 1.1;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ibc-page__recommended-editor-picker {
  display: grid;
  align-content: start;
  gap: 0.42rem;
  max-height: 11rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}
.ibc-page__recommended-editor.is-create .ibc-page__recommended-editor-picker {
  max-height: min(74dvh, 42rem);
}
.ibc-page__recommended-editor-option {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) 5rem;
  gap: 0.5rem;
  align-items: center;
  text-align: left;
  border: 1px solid #d6e4f4;
  border-radius: 0.56rem;
  background: #ffffff;
  padding: 0.34rem 0.42rem;
}
.ibc-page__recommended-editor-option-main {
  display: grid;
  min-width: 0;
}
.ibc-page__recommended-editor-option-sku {
  font-size: 0.72rem;
  line-height: 1.15;
  font-weight: 700;
  color: #1e3a8a;
}
.ibc-page__recommended-editor-option-name {
  font-size: 0.7rem;
  line-height: 1.18;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ibc-page__recommended-editor-option-qty {
  width: 100%;
  height: 1.82rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.5rem;
  text-align: right;
}
.ibc-page__recommended-editor-add-side {
  display: grid;
  align-content: start;
  gap: 0.46rem;
}
.ibc-page__recommended-editor-row--add {
  cursor: pointer;
}
.ibc-page__recommended-editor-row--add.is-selected {
  border-color: #93c5fd;
  background: #eff6ff;
}
.ibc-page__recommended-editor-select {
  width: 1.82rem;
  height: 1.82rem;
  min-width: 1.82rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.5rem;
  background: #f8fbff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.ibc-page__recommended-editor-select.is-selected {
  border-color: #3b82f6;
  background: #dbeafe;
}
.ibc-page__recommended-editor-select-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
}
.ibc-page__recommended-editor-add-head .ibc-page__recommended-editor-add-btn {
  width: auto;
  min-width: 8.4rem;
}
.ibc-page__recommended-editor-input-wrap {
  display: grid;
  gap: 0.24rem;
}
.ibc-page__recommended-editor-input-label {
  font-size: 0.68rem;
  line-height: 1.1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.ibc-page__recommended-editor-preview {
  width: 2.1rem;
  height: 2.7rem;
}
.ibc-page__recommended-products--modal {
  gap: 0.5rem;
}
.ibc-page__recommended-product--modal {
  padding: 0.24rem 0.44rem 0.24rem 0.26rem;
}
.ibc-page__recommended-photo--modal {
  width: 2.5rem;
  height: 3.3rem;
}
.ibc-page__recommended-product--modal span {
  font-size: 0.74rem;
}
.ibc-page__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d1d5db;
  flex-shrink: 0;
}

/* Spinner */
.ibc-page__spinner {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid #e5e7eb;
  border-top-color: #047857;
  border-radius: 50%;
  animation: ibc-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.ibc-page__spinner--lg { width: 2rem; height: 2rem; border-width: 3px; }
@keyframes ibc-spin { to { transform: rotate(360deg); } }

/* Alert */
.ibc-page__alert {
  margin: 1rem 2.25rem;
  padding: 0.875rem 1rem;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: var(--ibc-r-sm);
  font-size: 0.875rem;
}
.ibc-page__alert--info { background: #fefce8; color: #92400e; border-color: #fde68a; }

/* State */
.ibc-page__state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3.5rem 2rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  background: linear-gradient(180deg, #fafafa 0%, #f8fafc 100%);
}

/* Table */
.ibc-page__table-wrap {
  margin: 1rem 0 2rem;
  overflow: auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
.ibc-page__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  --ibc-photo-col-w: 56px;
  --ibc-product-col-w: 180px;
  --ibc-share-col-w: 88px;
  --ibc-availability-col-w: 136px;
  --ibc-total-col-w: 72px;
}
.ibc-page__fixed-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  z-index: 260;
  display: none;
  pointer-events: none;
}
.ibc-page__fixed-head-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border: none;
  box-shadow: none;
  scrollbar-width: none;
}
.ibc-page__fixed-head-viewport::-webkit-scrollbar {
  display: none;
}
.ibc-page__table--fixed-head {
  min-width: 100%;
}
.ibc-page__table th,
.ibc-page__table td {
  padding: 0.6rem 0.875rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.ibc-page__table thead th {
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
  border-radius: 0 !important;
}
.ibc-page__table--fixed-head thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  border-radius: 0 !important;
}
.ibc-page__photo-col {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
  width: var(--ibc-photo-col-w);
  min-width: var(--ibc-photo-col-w);
  max-width: var(--ibc-photo-col-w);
  text-align: center;
  vertical-align: middle;
}
.ibc-page__photo-head-label {
  display: inline;
}
.ibc-page__photo-head-icon {
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: #64748b;
}
.ibc-page__photo-head-icon svg {
  width: 0.96rem;
  height: 0.96rem;
}
.ibc-page__table--fixed-head thead .ibc-page__photo-col { z-index: 11; }
.ibc-page__table thead .ibc-page__photo-col { background: #f8fafc; }
.ibc-page__photo-cell {
  padding: 0.35rem !important;
  vertical-align: middle;
}
.ibc-page__photo {
  width: 2.08rem;
  height: 2.82rem;
  object-fit: cover;
  border-radius: 0.62rem;
  border: 1px solid #d7e3f4;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.ibc-page__photo-placeholder {
  width: 2.08rem;
  height: 2.82rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #9ca3af;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  border: 1px solid #d7e3f4;
  border-radius: 0.62rem;
}
.ibc-page__row:hover .ibc-page__photo-col { background: #f1f5f9 !important; }
.ibc-page__pin-col {
  position: sticky;
  left: var(--ibc-photo-col-w);
  z-index: 5;
  background: #fff;
  box-shadow: 2px 0 6px -2px rgba(0,0,0,0.06);
  width: var(--ibc-product-col-w);
  min-width: var(--ibc-product-col-w);
  max-width: var(--ibc-product-col-w);
}
.ibc-page__table--fixed-head thead .ibc-page__pin-col { z-index: 12; }
.ibc-page__table thead .ibc-page__pin-col { background: #f8fafc; }
.ibc-page__table--transposed .ibc-page__pin-col {
  left: 0;
}
.ibc-page__table--transposed .ibc-page__cluster-th {
  padding-left: 0.55rem !important;
  padding-right: 0.55rem !important;
}
.ibc-page__cluster-th {
  text-align: center;
  width: 101px;
  min-width: 101px;
  max-width: 101px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 0.42rem !important;
  padding-bottom: 0.42rem !important;
}
.ibc-page__cluster-th-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  line-height: 1;
  height: 2.2em;
  max-height: 2.2em;
  min-height: 2.2em;
  overflow: hidden;
}

.ibc-page__cluster-th-text {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.05;
  max-height: 2.2em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-align: center;
  font-weight: 700;
  color: #4b5563;
  font-size: 0.58rem;
}
.ibc-page__table--transposed .ibc-page__cluster-th-label {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 0;
  height: auto;
  min-height: 4.1rem;
  max-height: none;
  line-height: 1.1;
  padding-right: 0;
}
.ibc-page__table--transposed .ibc-page__cluster-th-photo {
  justify-self: end;
  width: 2.02rem;
  height: 2.68rem;
  object-fit: cover;
  border-radius: 0.42rem;
  border: 1px solid #d7e3f4;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.ibc-page__table--transposed .ibc-page__cluster-th-photo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  color: #9ca3af;
  font-size: 0.6rem;
}
.ibc-page__total-th {
  text-align: right;
  width: var(--ibc-total-col-w);
  min-width: var(--ibc-total-col-w);
  max-width: var(--ibc-total-col-w);
  color: #374151 !important;
}
.ibc-page__availability-th,
.ibc-page__share-th {
  text-align: right;
  min-width: var(--ibc-availability-col-w);
}
.ibc-page__share-th {
  min-width: var(--ibc-share-col-w);
  width: var(--ibc-share-col-w);
  max-width: var(--ibc-share-col-w);
  white-space: normal !important;
  line-height: 1.1;
}
.ibc-page__availability-th {
  width: var(--ibc-availability-col-w);
  max-width: var(--ibc-availability-col-w);
}
.ibc-page__metric-head {
  position: sticky;
}
.ibc-page__metric-label {
  display: inline;
}
.ibc-page__metric-icon-btn,
.ibc-page__metric-icon-static {
  display: none;
}
.ibc-page__metric-icon-btn {
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: auto;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}
.ibc-page__metric-icon-btn svg,
.ibc-page__metric-icon-static svg {
  width: 0.96rem;
  height: 0.96rem;
}
.ibc-page__metric-icon-btn.is-open {
  color: #1d4ed8;
  background: #e6efff;
}
.ibc-page__metric-tooltip {
  position: absolute;
  bottom: calc(100% + 0.3rem);
  right: 0.18rem;
  width: 11.2rem;
  padding: 0.42rem 0.52rem;
  border-radius: 0.56rem;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  color: #475569;
  font-size: 0.64rem;
  font-weight: 500;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  text-align: left;
  z-index: 40;
}
.ibc-page__name-cell {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}
.ibc-page__product-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #111827;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.ibc-page__product-sku {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 1px;
}
.ibc-page__row:hover td { background: #f9fafb !important; }
.ibc-page__row:hover .ibc-page__pin-col { background: #f1f5f9 !important; }
.ibc-page__row:hover .ibc-page__photo-col { background: #f1f5f9 !important; }
.ibc-page__num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #374151;
}
.ibc-page__num-cell--zero { color: #d1d5db; }
.ibc-page__num-cell--high { color: #15803d; font-weight: 600; }
.ibc-page__cluster-cell {
  width: 101px;
  min-width: 101px;
  max-width: 101px;
  padding-left: 0.55rem !important;
  padding-right: 0.55rem !important;
}
.ibc-page__cluster-main {
  line-height: 1.05;
  font-size: 0.85em;
}
.ibc-page__cluster-metric-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28rem;
}
.ibc-page__cluster-metric-key {
  display: none;
}
.ibc-page__cluster-metric-key-short {
  display: none;
}
.ibc-page__cluster-metric-value {
  color: inherit;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.ibc-page__cluster-main-addon {
  color: #64748b;
  font-weight: 500;
}
.ibc-page__cluster-sub {
  margin-top: 0.14rem;
  font-size: 0.58rem;
  font-weight: 500;
  color: #9ca3af;
  line-height: 1.1;
}
.ibc-page__cluster-netdays {
  margin-top: 0.16rem;
  font-size: 0.58rem;
  line-height: 1.1;
}
.ibc-page__cluster-netdays-btn {
  border: none;
  background: transparent;
  padding: 0;
  color: #475569;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.ibc-page__cluster-netdays-btn--danger {
  color: #dc2626;
  font-weight: 700;
}
.ibc-page__cluster-netdays-btn:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.ibc-page__cluster-netdays-btn--danger:hover {
  color: #b91c1c;
}
.ibc-page__cluster-supply-date {
  margin-top: 0.12rem;
  font-size: 0.56rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.08;
}
.ibc-page__cluster-delivery-link {
  margin-top: 0.24rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe6f4;
  padding: 0.16rem 0.44rem;
  border-radius: 999px;
  background: #f8fbff;
  color: #51637b;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.ibc-page__cluster-delivery-link:hover {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eef5ff;
  text-decoration: none;
}
.ibc-page__cluster-delivery-link--static {
  cursor: default;
}
.ibc-page__cluster-delivery-link--static:hover {
  color: #51637b;
  border-color: #dbe6f4;
  background: #f8fbff;
  text-decoration: none;
}
.ibc-page__cluster-delivery-calc {
  display: grid;
  gap: 0.45rem;
  color: #334155;
  font-size: 0.83rem;
  line-height: 1.45;
}
.ibc-page__cluster-coverage-modal .summary-modal__dialog {
  max-width: 760px;
}
.ibc-page__cluster-coverage-modal .summary-modal__subtitle {
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ibc-page__coverage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
  padding: 0.84rem 0.95rem 0.95rem;
}
.ibc-page__coverage-item {
  display: grid;
  gap: 0.22rem;
  padding: 0.58rem 0.62rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.78rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.ibc-page__coverage-label {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.2;
}
.ibc-page__coverage-value {
  margin: 0;
  font-size: 0.93rem;
  font-weight: 800;
  line-height: 1.22;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.ibc-page__coverage-formula {
  padding: 0.84rem 0.95rem 0.95rem;
  display: grid;
  gap: 0.65rem;
}
.ibc-page__coverage-formula-main {
  padding: 0.62rem 0.7rem;
  border-radius: 0.78rem;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e293b;
  font-size: 0.89rem;
  font-weight: 700;
  line-height: 1.34;
  overflow-wrap: anywhere;
}
.ibc-page__coverage-result {
  padding: 0.62rem 0.72rem;
  border-radius: 0.78rem;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  color: #1e3a8a;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
}
.ibc-page__coverage-result strong {
  font-size: 0.95rem;
  font-weight: 800;
}
.ibc-page__cluster-delivery-table-wrap {
  overflow: auto;
}
.ibc-page__cluster-delivery-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
}
.ibc-page__cluster-delivery-table th,
.ibc-page__cluster-delivery-table td {
  padding: 0.44rem 0.52rem;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.ibc-page__cluster-delivery-table th {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.63rem;
  color: #64748b;
  background: #f8fafc;
  text-align: left;
}
.ibc-page__cluster-delivery-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 768px) {
  .ibc-page {
    --ibc-content-x: 1rem;
  }

  .ibc-page__toolbar {
    padding: 0.9rem 1rem;
    gap: 0.75rem;
    align-items: stretch;
  }

  .ibc-page__filters {
    width: 100%;
    gap: 0.42rem;
  }

  .ibc-page__filters-title {
    font-size: 0.64rem;
  }

  .ibc-page__filters-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.38rem;
    overflow: visible;
    padding-bottom: 0;
  }

  .ibc-page__filter-btn {
    min-height: 1.88rem;
    font-size: 0.7rem;
    padding: 0.36rem 0.5rem;
    justify-content: center;
    width: 100%;
  }

  .ibc-page__summary {
    margin-left: 0;
    align-items: flex-start;
    width: 100%;
    font-size: 0.75rem;
  }

  .ibc-page__summary-main {
    flex-wrap: wrap;
    gap: 0.38rem;
  }

  .ibc-page__table-meta {
    margin: 0.48rem var(--ibc-content-x) 0;
    font-size: 0.73rem;
    gap: 0.38rem;
    flex-wrap: wrap;
  }

  .ibc-page__table-head-row {
    grid-template-columns: 1fr;
    margin: 0.62rem 0 0;
    gap: 0.46rem;
    padding-inline: 0;
  }

  .ibc-page__table-head-controls,
  .ibc-page__recommended {
    padding: 0.54rem;
    border-radius: 0.82rem;
  }

  .ibc-page__table-head-controls-grid {
    grid-template-columns: 1fr;
    gap: 0.52rem;
  }

  .ibc-page__recommended::after {
    display: none;
  }

  .ibc-page__recommended {
    width: 100%;
    min-width: 0;
    margin-top: 0;
    margin-inline: 0;
    padding: 0.76rem;
  }

  .ibc-page__recommended-title {
    font-size: 0.66rem;
  }

  .ibc-page__recommended-list {
    display: flex;
    gap: 0.62rem;
    padding-bottom: 0.16rem;
  }

  .ibc-page__recommended-card {
    flex: 0 0 86vw;
    min-width: 86vw;
    padding: 0.62rem;
  }

  .ibc-page__recommended-top {
    margin-bottom: 0.56rem;
    flex-wrap: wrap;
  }

  .ibc-page__recommended-create-btn {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
  }

  .ibc-page__recommended-head strong {
    font-size: 1.05rem;
  }

  .ibc-page__recommended-head span {
    font-size: 0.76rem;
  }

  .ibc-page__recommended-products {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .ibc-page__recommended-photo {
    width: 1.22rem;
    height: 1.58rem;
  }

  .ibc-page__recommended-product span {
    font-size: 0.72rem;
  }

  .ibc-page__recommended-modal .summary-modal__dialog {
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .ibc-page__recommended-modal {
    padding-top: calc(0.35rem + env(safe-area-inset-top));
    padding-bottom: 0.55rem;
  }

  .ibc-page__recommended-create-setup {
    padding: 0.5rem;
  }

  .ibc-page__recommended-create-grid {
    grid-template-columns: 1fr;
  }

  .ibc-page__recommended-create-stats-list {
    grid-template-columns: 1fr;
  }

  .ibc-page__recommended-create-stat-meta {
    grid-template-columns: 1fr;
    gap: 0.08rem;
  }

  .ibc-page__recommended-photo--modal {
    width: 2.2rem;
    height: 2.9rem;
  }

  .ibc-page__recommended-editor-row {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }

  .ibc-page__recommended-editor-metrics-head {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    padding: 0.22rem 0 0.06rem;
  }

  .ibc-page__recommended-editor-stock-head,
  .ibc-page__recommended-editor-sales-head,
  .ibc-page__recommended-editor-reorder-head {
    grid-column: 2;
  }
  .ibc-page__recommended-editor-head-spacer {
    display: none;
  }

  .ibc-page__recommended-editor-flow-cols {
    grid-column: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.22rem;
  }

  .ibc-page__recommended-editor-stock-col {
    grid-column: 2;
    padding: 0.18rem 0.24rem;
  }
  .ibc-page__recommended-editor-total-col {
    grid-column: 2;
    padding: 0.18rem 0.24rem;
  }
  .ibc-page__recommended-editor-days-col {
    grid-column: 2;
    padding: 0.18rem 0.24rem;
  }
  .ibc-page__recommended-editor-processing-col {
    grid-column: 2;
    padding: 0.18rem 0.24rem;
  }
  .ibc-page__recommended-editor-reorder-col,
  .ibc-page__recommended-editor-target-col {
    grid-column: 2;
    padding: 0.18rem 0.24rem;
  }

  .ibc-page__recommended-editor-stock-label {
    font-size: 0.52rem;
  }

  .ibc-page__recommended-editor-stock-value {
    font-size: 0.68rem;
  }

  .ibc-page__recommended-editor-flow-col {
    padding: 0.18rem 0.24rem;
  }

  .ibc-page__recommended-editor-flow-label {
    font-size: 0.52rem;
  }

  .ibc-page__recommended-editor-flow-value {
    font-size: 0.68rem;
  }

  .ibc-page__recommended-editor-sales-cols {
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }

  .ibc-page__recommended-editor-sales-col,
  .ibc-page__recommended-editor-sales-period-col {
    grid-column: 2;
    padding: 0.16rem 0.2rem;
  }

  .ibc-page__recommended-editor-sales-label {
    font-size: 0.5rem;
  }

  .ibc-page__recommended-editor-sales-value {
    font-size: 0.64rem;
  }

  .ibc-page__recommended-editor-qty,
  .ibc-page__recommended-editor-target-input,
  .ibc-page__recommended-editor-remove,
  .ibc-page__recommended-editor-add-btn,
  .ibc-page__recommended-editor-input {
    width: 100%;
  }
  .ibc-page__recommended-editor-remove--icon {
    width: 1.82rem;
    min-width: 1.82rem;
    height: 1.82rem;
    aspect-ratio: 1 / 1;
    justify-self: start;
  }

  .ibc-page__recommended-editor-row .ibc-page__recommended-editor-qty,
  .ibc-page__recommended-editor-row .ibc-page__recommended-editor-remove,
  .ibc-page__recommended-editor-row .ibc-page__recommended-editor-select {
    grid-column: 2;
  }

  .ibc-page__recommended-editor-sales-head {
    margin-top: 0;
  }

  .ibc-page__recommended-editor-add {
    grid-template-columns: 1fr;
    min-height: 11.4rem;
  }

  .ibc-page__recommended-editor.is-create .ibc-page__recommended-editor-add {
    min-height: min(84dvh, 44rem);
  }

  .ibc-page__recommended-editor-add-head {
    margin-bottom: 0.28rem;
    flex-wrap: wrap;
  }

  .ibc-page__recommended-editor-picker {
    max-height: 8.8rem;
  }

  .ibc-page__recommended-editor.is-create .ibc-page__recommended-editor-picker {
    max-height: min(70dvh, 34rem);
  }

  .ibc-page__recommended-editor-option {
    grid-template-columns: 1.95rem minmax(0, 1fr) 4.6rem;
    padding: 0.3rem 0.36rem;
    gap: 0.4rem;
  }

  .ibc-page__recommended-editor-add-side {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.46rem;
  }

  .ibc-page__recommended-editor-add-btn {
    width: 100%;
  }

  .ibc-page__recommended-editor-add-head .ibc-page__recommended-editor-add-btn {
    width: 100%;
    min-width: 0;
  }

  .ibc-page__recommended-editor-preview {
    width: 1.95rem;
    height: 2.45rem;
  }

  .ibc-page__cluster-th {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    padding-top: 0.34rem !important;
    padding-bottom: 0.34rem !important;
  }

  .ibc-page__cluster-th-label {
    height: 2.05em;
    min-height: 2.05em;
    max-height: 2.05em;
  }

  .ibc-page__cluster-th-text {
    font-size: 0.52rem;
    line-height: 1.02;
    max-height: 2.05em;
  }

  .ibc-page__cluster-delivery-link {
    margin-top: 0.16rem;
    padding: 0.12rem 0.34rem;
    font-size: 0.52rem;
    line-height: 1.1;
    max-width: 100%;
  }

  .ibc-page__cluster-delivery-modal {
    padding: 0.55rem;
  }

  .ibc-page__cluster-delivery-modal .summary-modal__dialog {
    max-height: calc(100vh - 1.1rem);
  }

  .ibc-page__cluster-delivery-modal .summary-modal__header {
    padding: 0.88rem 0.88rem 0.82rem;
  }

  .ibc-page__cluster-delivery-modal .summary-modal__title {
    font-size: 0.96rem;
  }

  .ibc-page__cluster-delivery-modal .summary-modal__subtitle {
    font-size: 0.76rem;
  }

  .ibc-page__cluster-delivery-modal .summary-modal__body {
    padding: 0.74rem 0.88rem 0.92rem;
    gap: 0.65rem;
  }

  .ibc-page__cluster-delivery-calc {
    font-size: 0.76rem;
    gap: 0.38rem;
  }
  
  .ibc-page__cluster-coverage-modal .summary-modal__subtitle {
    font-size: 0.74rem;
    line-height: 1.35;
  }
  
  .ibc-page__coverage-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.7rem 0.76rem 0.82rem;
  }
  
  .ibc-page__coverage-item {
    padding: 0.5rem 0.56rem;
    border-radius: 0.68rem;
  }
  
  .ibc-page__coverage-label {
    font-size: 0.62rem;
  }
  
  .ibc-page__coverage-value {
    font-size: 0.82rem;
    line-height: 1.22;
  }
  
  .ibc-page__coverage-formula {
    padding: 0.7rem 0.76rem 0.82rem;
    gap: 0.52rem;
  }
  
  .ibc-page__coverage-formula-main {
    font-size: 0.78rem;
    padding: 0.5rem 0.56rem;
  }
  
  .ibc-page__coverage-result {
    font-size: 0.74rem;
    padding: 0.5rem 0.56rem;
  }
  
  .ibc-page__coverage-result strong {
    font-size: 0.84rem;
  }

  .ibc-page__cluster-delivery-table {
    font-size: 0.72rem;
  }

  .ibc-page__cluster-delivery-table th,
  .ibc-page__cluster-delivery-table td {
    padding: 0.36rem 0.42rem;
  }

  .ibc-page__cluster-main {
    font-size: 0.8em;
  }

  .ibc-page__cluster-metric-key {
    font-size: 0.48rem;
    letter-spacing: 0.015em;
  }

  .ibc-page__cluster-metric-key-full {
    display: none;
  }

  .ibc-page__cluster-metric-key-short {
    display: inline;
  }

  .ibc-page__cluster-sub,
  .ibc-page__cluster-netdays {
    font-size: 0.52rem;
  }

  .ibc-page__cluster-supply-date {
    font-size: 0.5rem;
  }
}
.ibc-page__total-cell {
  width: var(--ibc-total-col-w);
  min-width: var(--ibc-total-col-w);
  max-width: var(--ibc-total-col-w);
  font-weight: 600;
  color: #111827;
  background: #f8fafc;
  box-shadow: 2px 0 8px -4px rgba(15, 23, 42, 0.22);
}
.ibc-page__total-main {
  line-height: 1.05;
}
.ibc-page__total-sub {
  margin-top: 0.14rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: #9ca3af;
  line-height: 1.1;
}
.ibc-page__availability-cell {
  width: var(--ibc-availability-col-w);
  min-width: var(--ibc-availability-col-w);
  max-width: var(--ibc-availability-col-w);
  color: #0f766e;
  font-weight: 600;
}
.ibc-page__share-cell {
  color: #0369a1;
  font-weight: 600;
  width: var(--ibc-share-col-w);
  min-width: var(--ibc-share-col-w);
  max-width: var(--ibc-share-col-w);
}
.ibc-page__share-th,
.ibc-page__share-cell {
  position: sticky;
  left: calc(var(--ibc-photo-col-w) + var(--ibc-product-col-w));
  z-index: 4;
  background: #fff;
}
.ibc-page__availability-th,
.ibc-page__availability-cell {
  position: sticky;
  left: calc(var(--ibc-photo-col-w) + var(--ibc-product-col-w) + var(--ibc-share-col-w));
  z-index: 4;
  background: #fff;
}
.ibc-page__total-th,
.ibc-page__total-cell {
  position: sticky;
  left: calc(var(--ibc-photo-col-w) + var(--ibc-product-col-w) + var(--ibc-share-col-w) + var(--ibc-availability-col-w));
  z-index: 4;
}
.ibc-page__table thead .ibc-page__share-th,
.ibc-page__table thead .ibc-page__availability-th,
.ibc-page__table thead .ibc-page__total-th {
  z-index: 6;
  background: #f8fafc;
}
.ibc-page__table--fixed-head thead .ibc-page__share-th,
.ibc-page__table--fixed-head thead .ibc-page__availability-th,
.ibc-page__table--fixed-head thead .ibc-page__total-th {
  z-index: 10;
}
.ibc-page__table--hide-share .ibc-page__availability-th,
.ibc-page__table--hide-share .ibc-page__availability-cell {
  left: calc(var(--ibc-photo-col-w) + var(--ibc-product-col-w));
}
.ibc-page__table--hide-availability .ibc-page__total-th,
.ibc-page__table--hide-availability .ibc-page__total-cell {
  left: calc(var(--ibc-photo-col-w) + var(--ibc-product-col-w) + var(--ibc-share-col-w));
}
.ibc-page__table--hide-share .ibc-page__total-th,
.ibc-page__table--hide-share .ibc-page__total-cell {
  left: calc(var(--ibc-photo-col-w) + var(--ibc-product-col-w) + var(--ibc-availability-col-w));
}
.ibc-page__table--hide-share.ibc-page__table--hide-availability .ibc-page__total-th,
.ibc-page__table--hide-share.ibc-page__table--hide-availability .ibc-page__total-cell {
  left: calc(var(--ibc-photo-col-w) + var(--ibc-product-col-w));
}
.ibc-page__foot-row td {
  background: #f1f5f9 !important;
  border-top: 2px solid #e5e7eb;
  border-bottom: none;
}
.ibc-page__foot-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}
.ibc-page__foot-cell {
  font-weight: 600;
  color: #374151;
}
.ibc-page__grand-total {
  font-weight: 700;
  color: #111827;
  font-size: 0.875rem;
}
.ibc-page__extra-th {
  text-align: right;
  min-width: 80px;
  color: #9ca3af !important;
}
.ibc-page__extra-cell { color: #9ca3af; font-size: 0.775rem; }
.ibc-page__extra-cell--return { color: #f87171; }
.ibc-page__fetched-at {
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
}

@media (max-width: 768px) {
  .ibc-page__table {
    --ibc-product-col-w: 0px;
    --ibc-photo-col-w: 48px;
    --ibc-share-col-w: 46px;
    --ibc-availability-col-w: 50px;
    --ibc-total-col-w: 56px;
  }

  /* На мобильных скрываем колонку с названием товара и SKU */
  .ibc-page__pin-col {
    display: none !important;
  }

  .ibc-page__photo-col {
    width: var(--ibc-photo-col-w);
    min-width: var(--ibc-photo-col-w);
    max-width: var(--ibc-photo-col-w);
  }

  .ibc-page__photo-head {
    text-align: center;
    padding-left: 0.38rem !important;
    padding-right: 0.38rem !important;
  }

  .ibc-page__photo-head-label {
    display: none;
  }

  .ibc-page__photo-head-icon {
    display: inline-flex;
  }

  .ibc-page__share-th,
  .ibc-page__share-cell {
    left: var(--ibc-photo-col-w);
  }

  .ibc-page__availability-th,
  .ibc-page__availability-cell {
    left: calc(var(--ibc-photo-col-w) + var(--ibc-share-col-w));
  }

  .ibc-page__total-th,
  .ibc-page__total-cell {
    left: calc(var(--ibc-photo-col-w) + var(--ibc-share-col-w) + var(--ibc-availability-col-w));
  }

  .ibc-page__table--hide-share .ibc-page__availability-th,
  .ibc-page__table--hide-share .ibc-page__availability-cell {
    left: var(--ibc-photo-col-w);
  }

  .ibc-page__table--hide-availability .ibc-page__total-th,
  .ibc-page__table--hide-availability .ibc-page__total-cell {
    left: calc(var(--ibc-photo-col-w) + var(--ibc-share-col-w));
  }

  .ibc-page__table--hide-share .ibc-page__total-th,
  .ibc-page__table--hide-share .ibc-page__total-cell {
    left: calc(var(--ibc-photo-col-w) + var(--ibc-availability-col-w));
  }

  .ibc-page__table--hide-share.ibc-page__table--hide-availability .ibc-page__total-th,
  .ibc-page__table--hide-share.ibc-page__table--hide-availability .ibc-page__total-cell {
    left: var(--ibc-photo-col-w);
  }

  .ibc-page__metric-head {
    text-align: center;
    padding-left: 0.38rem !important;
    padding-right: 0.38rem !important;
  }

  .ibc-page__metric-label {
    display: none;
  }

  .ibc-page__metric-icon-btn,
  .ibc-page__metric-icon-static {
    display: inline-flex;
    margin-left: 0;
  }

  .ibc-page__share-cell,
  .ibc-page__availability-cell,
  .ibc-page__total-cell {
    padding-left: 0.24rem !important;
    padding-right: 0.24rem !important;
  }

  .ibc-page__foot-row .ibc-page__photo-col {
    position: sticky;
    left: 0;
    z-index: 6;
    background: #f1f5f9 !important;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b7280;
  }

  .ibc-page__foot-row .ibc-page__photo-col::after {
    content: "Итого";
  }
}

@media (max-width: 420px) {
  .ibc-page__filters-list {
    grid-template-columns: 1fr;
  }
}

/* Transactions table: fixed column widths, no overflow */
.transactions-table-wrap {
  border-radius: 0.5rem;
  border: 1px solid var(--mpb-gray-100);
}

.transactions-table th,
.transactions-table td {
  box-sizing: border-box;
}

.transactions-table__th {
  white-space: nowrap;
  justify-content: center;
  text-overflow: ellipsis;
  overflow: hidden;
}

.transactions-table__td {
  white-space: normal;
  text-overflow: unset;
  overflow: visible;
  word-break: break-word;
  overflow-wrap: break-word;
}

.transactions-table__th--wrap,
.transactions-table__td--wrap {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.transactions-table tbody tr:nth-child(even) td {
  background: var(--mpb-gray-50);
}

.transactions-table tbody tr:hover td {
  background: var(--mpb-primary-light);
}

.costs-empty-row td {
  color: var(--mpb-gray-500);
  font-style: italic;
  padding: 1.5rem;
}

/* Purchase detail meta (карточка поставки) */
/* Purchase detail header (карточка поставки) */
.purchase-detail-page {
  --purchase-detail-inline-gap: 0;
}

.purchase-detail-header {
  padding: 1.45rem var(--purchase-detail-inline-gap) 1.5rem;
  border-bottom: 1px solid var(--mpb-gray-100);
  background: linear-gradient(180deg, #f9fafb 0%, var(--mpb-white) 100%);
}

.purchase-detail-header__crumbs-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem 1.5rem;
  margin-bottom: 0.72rem;
}

.purchase-detail-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem 1.2rem;
}

.purchase-detail-header__left {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  width: 100%;
}

.purchase-detail-header__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
}

.purchase-detail-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-500);
}

.purchase-detail-header__title {
  margin: 0;
  font-size: clamp(1.42rem, 1.2rem + 0.9vw, 1.92rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: var(--mpb-gray-900);
}

.purchase-detail-header__title-toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  cursor: pointer;
}

.purchase-detail-header__title-toggle:hover {
  color: #2563eb;
}

.purchase-detail-header__title-toggle:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 4px;
  border-radius: 0.35rem;
}

.purchase-detail-header__subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: var(--mpb-gray-500);
}

.purchase-detail-header__right {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-end;
  min-width: 0;
}

.purchase-detail-header__status-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  gap: 0.4rem;
}

.purchase-detail-header__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.purchase-detail-header__status-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mpb-gray-500);
}

.purchase-detail-header__status-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 1.95rem;
  padding: 0.36rem 1.5rem 0.36rem 0.62rem;
  border-radius: 0.62rem;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23334155' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.48rem center;
  background-size: 0.6rem 0.38rem;
  cursor: pointer;
}

.purchase-detail-header__status-select.purchases-page__status--draft {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.purchase-detail-header__status-select.purchases-page__status--ordered,
.purchase-detail-header__status-select.purchases-page__status--in_transit {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.purchase-detail-header__status-select.purchases-page__status--received {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.purchase-detail-header__status-select.purchases-page__status--paid {
  background: #fef9c3;
  border-color: #fde047;
  color: #854d0e;
}

.purchase-detail-header__status-select.purchases-page__status--cancelled,
.purchase-detail-header__status-select.purchases-page__status--written_off {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
}

.purchase-detail-header__status-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.purchase-detail-header__status-date {
  min-height: 1.95rem;
  padding: 0.35rem 0.58rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.62rem;
  background: #fff;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
}

.purchase-detail-header__status-date:hover {
  border-color: #abc8f6;
  color: #1d4ed8;
  background: #f8fbff;
}

.purchase-detail-header .costs-page__crumbs {
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .purchase-detail-page .purchase-detail-header__crumbs-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .purchase-detail-page .purchase-detail-header__top {
    flex-direction: column;
    align-items: stretch;
  }

  .purchase-detail-page .purchase-detail-header__right {
    align-items: flex-start;
  }

  .purchase-detail-page .purchase-detail-header__kpi {
    justify-content: flex-start;
  }

  .purchase-detail-page .purchase-detail-header__kpi-item {
    text-align: left;
  }

  .purchase-detail-page .purchase-detail-header__actions {
    justify-content: flex-start;
  }

  .purchase-detail-page .purchase-detail-content-tabs {
    margin: 0.7rem var(--purchase-detail-inline-gap) 0.5rem;
  }

  .purchase-detail-page .purchase-detail-service-row {
    margin: 0.74rem var(--purchase-detail-inline-gap) 0.5rem;
  }
}

@media (max-width: 768px) {
  .purchase-detail-page .purchase-detail-header__crumbs-row {
    flex-direction: column;
    gap: 0.65rem;
  }

  .purchase-detail-page .purchase-detail-header__top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .purchase-detail-page .purchase-detail-header__title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .purchase-detail-page .purchase-detail-header__right {
    align-items: stretch;
  }

  .purchase-detail-page .purchase-detail-header__status-row {
    width: 100%;
    justify-content: flex-start;
  }

  .purchase-detail-page .purchase-detail-header__kpi {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: start;
  }

  .purchase-detail-page .purchase-detail-header__kpi-item {
    min-width: 0;
    text-align: left;
  }

  .purchase-detail-page .purchase-detail-header__kpi-save {
    margin-left: 0;
  }

  .purchase-detail-page .purchase-detail-header__actions {
    justify-content: flex-start;
  }

  .purchase-detail-page .purchase-detail-content-tabs {
    margin: 0.62rem 1rem 0.46rem;
    gap: 0.36rem;
    padding-bottom: 0.42rem;
  }

  .purchase-detail-page .purchase-detail-content-tabs__tab {
    padding: 0.47rem 0.72rem;
    font-size: 0.78rem;
    border-radius: 0.56rem;
  }

  .purchase-detail-page .purchase-detail-service-row {
    margin: 0.58rem 1rem 0.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.42rem;
  }

  .purchase-detail-page .purchase-detail-service-row__meta {
    white-space: normal;
  }

  .purchase-detail-page .purchase-detail-service-row__actions {
    align-self: stretch;
    width: 100%;
    align-items: stretch;
  }

  .purchase-detail-page .purchase-detail-service-row__tabs {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .purchase-detail-page .purchase-detail-service-row__add-btn {
    width: 1.95rem;
    min-width: 1.95rem;
    height: 1.95rem;
    justify-content: center;
  }
}

.purchase-detail-header__status-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.purchase-detail-header__status-badge--draft {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.purchase-detail-header__status-badge--ordered,
.purchase-detail-header__status-badge--in_transit {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.purchase-detail-header__status-badge--received {
  background: #ecfdf3;
  color: #15803d;
  border-color: #bbf7d0;
}

.purchase-detail-header__status-badge--paid {
  background: #fef9c3;
  color: #854d0e;
  border-color: #fde047;
}

.purchase-detail-header__status-badge--cancelled,
.purchase-detail-header__status-badge--written_off {
  background: #ffe4e6;
  color: #be123c;
  border-color: #fda4af;
}

.purchase-detail-header__kpi {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, auto));
  column-gap: 0.52rem;
  row-gap: 0.52rem;
  justify-content: flex-end;
  margin-left: auto;
  align-items: center;
}

.purchase-detail-header__kpi-item {
  min-width: 96px;
  padding: 0.08rem 0.18rem;
  border: none;
  border-radius: 0;
  background: transparent;
  text-align: right;
}

.purchase-detail-header__kpi-item .label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mpb-gray-500);
  margin-bottom: 0.12rem;
}

.purchase-detail-header__kpi-item .value {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--mpb-gray-900);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.purchase-detail-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.purchase-detail-header__kpi-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.4rem;
  min-height: 2.8rem;
  margin-left: 0;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--mpb-gray-300);
  border-radius: 0.8rem;
  font-weight: 500;
  color: var(--mpb-primary);
  background: var(--mpb-gray-50);
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
}

.purchase-detail-header__kpi-save:hover:not(:disabled) {
  background: var(--mpb-gray-50);
  border-color: var(--mpb-gray-300);
  color: var(--mpb-primary);
}

.purchase-detail-header__kpi-save:disabled {
  opacity: 0.65;
  cursor: default;
}

.purchase-detail-header__save {
  min-height: 2.1rem;
  padding: 0.45rem 1rem;
  border-radius: 0.65rem;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--mpb-primary);
  color: var(--mpb-white);
  cursor: pointer;
}

.purchase-detail-header__save:hover:not(:disabled) {
  background: var(--mpb-primary-hover);
}

.purchase-detail-header__back {
  font-size: 0.8125rem;
  color: var(--mpb-gray-500);
  text-decoration: none;
}

.purchase-detail-header__back--top {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
}

.purchase-detail-header__back:hover {
  color: var(--mpb-gray-800);
}

.purchase-detail-header__meta {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.purchase-detail-header__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 180px;
}

.purchase-detail-header__field--wide {
  flex: 1 1 260px;
}

.purchase-detail-header__field .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mpb-gray-500);
}

.purchase-detail-header__field input,
.purchase-detail-header__field select {
  padding: 0.4rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid var(--mpb-gray-200);
  font-size: 0.875rem;
}

.purchase-status-dates-modal {
  max-width: 720px;
}

.purchase-status-dates-modal__body {
  padding-top: 1rem;
}

.purchase-status-dates-modal__list {
  display: grid;
  gap: 0.58rem;
}

.purchase-status-dates-modal__row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 180px) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.6rem;
  border: 1px solid #edf2f7;
  border-radius: 0.72rem;
  background: #fbfdff;
}

.purchase-status-dates-modal__label {
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.purchase-status-dates-modal__input {
  min-width: 0;
  height: 2.05rem;
  padding: 0.36rem 0.5rem;
  border: 1px solid #d9e2ef;
  border-radius: 0.55rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.82rem;
}

.purchase-status-dates-modal__input:focus {
  outline: none;
  border-color: #8fb8f8;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.purchase-status-dates-modal__save {
  height: 2.05rem;
  min-width: 6.4rem;
  padding: 0 0.72rem;
  border: 1px solid #cfd9e8;
  border-radius: 0.55rem;
  background: #f8fbff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.purchase-status-dates-modal__save:hover:not(:disabled) {
  background: #eef5ff;
  border-color: #abc8f6;
}

.purchase-status-dates-modal__save:disabled {
  opacity: 0.65;
  cursor: default;
}

@media (max-width: 640px) {
  .purchase-status-dates-modal__row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .purchase-status-dates-modal__save {
    width: 100%;
  }
}

.purchase-detail-service-row {
  margin: 0.8rem var(--purchase-detail-inline-gap) 0.58rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.purchase-detail-service-row__left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.purchase-detail-service-row__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.purchase-detail-service-row__meta {
  font-size: 0.8rem;
  color: #334155;
  font-weight: 600;
  line-height: 1.35;
}

.purchase-detail-service-row__actions {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  align-self: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.purchase-detail-service-row__tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.purchase-detail-service-row__tab-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.purchase-detail-service-row__tab {
  border: 1px solid #d5e2f5;
  border-radius: 0.56rem;
  background: #ffffff;
  color: #64748b;
  min-height: 1.95rem;
  padding: 0.38rem 0.72rem;
  text-decoration: none;
  line-height: 1;
  font-size: 0.79rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.purchase-detail-service-row__tab:hover {
  background: #f8fbff;
  border-color: #c5d8f6;
  color: #334155;
  text-decoration: none;
}

.purchase-detail-service-row__tab.is-active {
  background: #eaf3ff;
  border-color: #8fb8f8;
  color: #2d57d3;
  text-decoration: none;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.purchase-detail-service-row__tab-remove {
  position: absolute;
  top: -0.46rem;
  right: -0.34rem;
  width: 0.78rem;
  height: 0.78rem;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: transparent;
  color: #dc2626;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.purchase-detail-service-row__tab-wrap:hover .purchase-detail-service-row__tab-remove {
  opacity: 1;
  pointer-events: auto;
}

.purchase-detail-service-row__tab-wrap.is-delete-open .purchase-detail-service-row__tab-remove {
  opacity: 1;
  pointer-events: auto;
}

.purchase-detail-service-row__tab-remove:hover:not(:disabled) {
  color: #b91c1c;
  border-color: #fca5a5;
  background: #fff5f5;
}

.purchase-detail-service-row__tab-remove:disabled {
  color: #fca5a5;
  border-color: #fee2e2;
  background: transparent;
  cursor: default;
}

.purchase-detail-service-row__delete-popover {
  position: absolute;
  top: -0.35rem;
  left: calc(100% + 0.45rem);
  min-width: 12rem;
  padding: 0.55rem 0.62rem;
  border-radius: 0.66rem;
  border: 1px solid #dbe7ff;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  z-index: 12;
}

.purchase-detail-service-row__delete-popover::before {
  content: "";
  position: absolute;
  left: -0.36rem;
  top: 0.62rem;
  width: 0.64rem;
  height: 0.64rem;
  transform: rotate(45deg);
  background: #ffffff;
  border-left: 1px solid #dbe7ff;
  border-bottom: 1px solid #dbe7ff;
}

.purchase-detail-service-row__delete-popover-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.purchase-detail-service-row__delete-popover-label {
  margin-top: 0.18rem;
  font-size: 0.73rem;
  color: #64748b;
  line-height: 1.2;
}

.purchase-detail-service-row__delete-popover-actions {
  margin-top: 0.48rem;
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.purchase-detail-service-row__delete-popover-cancel,
.purchase-detail-service-row__delete-popover-confirm {
  border: 1px solid #d5e2f5;
  border-radius: 0.45rem;
  min-height: 1.56rem;
  padding: 0.18rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.purchase-detail-service-row__delete-popover-cancel {
  background: #ffffff;
  color: #64748b;
}

.purchase-detail-service-row__delete-popover-cancel:hover:not(:disabled) {
  background: #f8fbff;
  color: #334155;
}

.purchase-detail-service-row__delete-popover-confirm {
  border-color: #fecaca;
  background: #fff1f2;
  color: #dc2626;
}

.purchase-detail-service-row__delete-popover-confirm:hover:not(:disabled) {
  background: #fee2e2;
  color: #b91c1c;
}

.purchase-detail-service-row__delete-popover-cancel:disabled,
.purchase-detail-service-row__delete-popover-confirm:disabled {
  opacity: 0.6;
  cursor: default;
}

.purchase-detail-service-row__add-btn {
  width: 1.95rem;
  min-width: 1.95rem;
  height: 1.95rem;
  min-height: 1.95rem;
  padding: 0;
  border-radius: 0.56rem;
  border: 1px solid #d5e2f5;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 0.92rem;
  line-height: 1;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
}

.purchase-detail-service-row__add-btn:hover {
  background: #eff6ff;
  border-color: #8fb8f8;
  color: #1e40af;
}

.purchase-detail-service-row__setup-btn {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
  cursor: pointer;
  padding: 0;
}

.purchase-detail-service-row__setup-btn:hover {
  color: #1e3a8a;
}

.purchase-detail-service-row__delete-btn {
  border: 0;
  background: transparent;
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
  cursor: pointer;
  padding: 0;
}

.purchase-detail-service-row__delete-btn:hover {
  color: #b91c1c;
}

.purchase-detail-service-row__delete-btn:disabled {
  color: #94a3b8;
  cursor: default;
  text-decoration: none;
}

.purchase-detail-service-amount-link {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.16rem;
  text-decoration-thickness: 1px;
  cursor: pointer;
  padding: 0;
}

.purchase-detail-service-amount-link:hover {
  color: #1e3a8a;
}

.purchase-detail-content-tabs {
  margin: 0.75rem var(--purchase-detail-inline-gap) 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.46rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--mpb-gray-200);
  overflow-x: auto;
}

.purchase-detail-content-tabs__tab {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.2rem 0;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  text-underline-offset: 0.2rem;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.purchase-detail-content-tabs__tab:hover {
  color: #334155;
  text-decoration: underline;
}

.purchase-detail-content-tabs__tab.is-active {
  color: #1d4ed8;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  font-weight: 700;
}

.purchase-detail-service-row .purchase-detail-service-row__tab {
  border: 1px solid #d5e2f5;
  border-radius: 0.56rem;
  background: #ffffff;
  color: #64748b;
  min-height: 1.95rem;
  padding: 0.38rem 0.72rem;
  text-decoration: none;
  line-height: 1;
  font-size: 0.79rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.purchase-detail-service-row .purchase-detail-service-row__tab:hover {
  background: #f8fbff;
  border-color: #c5d8f6;
  color: #334155;
  text-decoration: none;
}

.purchase-detail-service-row .purchase-detail-service-row__tab.is-active {
  background: #eaf3ff;
  border-color: #8fb8f8;
  color: #2d57d3;
  text-decoration: none;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Purchase detail: файлы (платёжка, УПД) */
.purchase-files {
  margin: 0.9rem var(--purchase-detail-inline-gap) 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.purchase-files--aggregation {
  flex-direction: column;
  flex-wrap: nowrap;
}

.purchase-files--aggregation .purchase-files__item {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
}

.purchase-files__item {
  flex: 1 1 420px;
  min-width: 252px;
  max-width: none;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--mpb-gray-200);
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.purchase-files__item--payment {
  order: 1;
}

.purchase-files__item--payment-docs {
  order: 2;
}

.purchase-files__item--upd {
  order: 3;
}

.purchase-files__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.purchase-files__icon {
  width: 2.25rem;
  height: 2.75rem;
  border-radius: 0.4rem;
  border: 1px solid var(--mpb-gray-300);
  background: linear-gradient(135deg, #e5e7eb 0%, #f9fafb 100%);
  position: relative;
}

.purchase-files__icon::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  width: 0.8rem;
  height: 0.9rem;
  border-top: 2px solid rgba(148, 163, 184, 0.95);
  border-right: 2px solid rgba(148, 163, 184, 0.95);
  border-radius: 0 0.25rem 0 0;
}

.purchase-files__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mpb-gray-900);
}

.purchase-files__hint {
  font-size: 0.8rem;
  color: var(--mpb-gray-500);
}

.purchase-files__status-row {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.purchase-files__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--mpb-gray-300);
  border-radius: 0.72rem;
  background: var(--mpb-gray-50);
  color: var(--mpb-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.purchase-files__action-btn:hover:not(:disabled) {
  background: var(--mpb-gray-50);
  border-color: var(--mpb-gray-300);
  color: var(--mpb-primary);
}

.purchase-files__action-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.purchase-files__plan-cell {
  display: grid;
  gap: 0.45rem;
}

.purchase-files__plan-actions {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.purchase-files__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.purchase-files__status--ok {
  background: #ecfdf3;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.purchase-files__status--ok .purchase-files__status-dot {
  background: #16a34a;
}

.purchase-files__status--empty {
  background: #f3f4f6;
  color: var(--mpb-gray-500);
  border: 1px dashed var(--mpb-gray-300);
}

.purchase-files__status--empty .purchase-files__status-dot {
  background: var(--mpb-gray-400);
}

.purchase-files__status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
}

.purchase-files__status-progress {
  width: 100%;
  height: 0.44rem;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.purchase-files__status-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 0.2s ease;
}

.purchase-files__path {
  font-size: 0.75rem;
  color: var(--mpb-gray-400);
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.purchase-files__button {
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid var(--mpb-gray-300);
  background: var(--mpb-white);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--mpb-gray-700);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.purchase-files__button:hover {
  background: var(--mpb-gray-50);
  border-color: var(--mpb-primary);
  color: var(--mpb-primary);
}

.purchase-files__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.purchase-files__download:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.purchase-files__list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 8.5rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.purchase-files__list-link {
  font-size: 0.75rem;
  color: #1f2937;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.purchase-files__list-link:hover {
  color: var(--mpb-primary);
  text-decoration: underline;
}

.purchase-files__payments-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  font-size: 0.75rem;
  color: #475569;
}

.purchase-files__payments-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 10rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.purchase-files__payments-list--docs {
  max-height: 14rem;
  overflow-x: hidden;
}

.purchase-files__payments-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 56px;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.9rem;
  padding: 0.32rem 0.45rem;
  border-radius: 0.48rem;
  border: 1px solid #dbe5f0;
  background: #fff;
}

.purchase-files__payments-row--with-actions {
  grid-template-columns: minmax(0, 1fr) 96px 56px auto;
}

.purchase-files__payments-row--docs {
  --purchase-doc-date-col: 6.55rem;
  --purchase-doc-amount-col: 3.95rem;
  display: grid;
  grid-template-columns:
    minmax(0, var(--purchase-doc-date-col))
    minmax(0, var(--purchase-doc-amount-col))
    minmax(5.4rem, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 0.32rem;
}

.purchase-files__payments-row--docs .purchase-files__payments-date,
.purchase-files__payments-row--docs .purchase-files__payments-amount {
  white-space: nowrap;
}

.purchase-files__payments-row--docs .purchase-files__payments-date {
  flex: 0 0 var(--purchase-doc-date-col);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.purchase-files__payments-row--docs .purchase-files__payments-amount {
  flex: 0 0 var(--purchase-doc-amount-col);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.purchase-files__payments-row--docs .purchase-files__path {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-files__payments-row--docs .purchase-files__payments-doc-actions {
  width: 100%;
  min-width: 0;
  overflow: visible;
  justify-content: flex-end;
}

.purchase-files__payments-row--docs .purchase-files__button--mini {
  margin-top: 0;
  flex: 0 0 1.95rem;
  width: 1.95rem;
  min-width: 1.95rem;
  height: 1.95rem;
  min-height: 1.95rem;
  padding: 0;
  border-radius: 0.52rem;
  white-space: nowrap;
}

.purchase-files__payments-row--fact {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.purchase-files__payments-row--plan {
  border-color: #dbe5f0;
  background: #fff;
}

.purchase-files__payments-date {
  font-size: 0.75rem;
  color: #334155;
}

.purchase-files__payments-amount {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.purchase-files__payments-state {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.purchase-files__payments-row--fact .purchase-files__payments-state {
  color: #15803d;
}

.purchase-files__payments-row--plan .purchase-files__payments-state {
  color: #64748b;
}

.purchase-files__payments-unlink {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15rem;
  cursor: pointer;
  white-space: nowrap;
  justify-self: end;
  padding: 0;
}

.purchase-files__payments-unlink:hover:not(:disabled) {
  color: #334155;
}

.purchase-files__payments-unlink:disabled {
  opacity: 0.55;
  cursor: default;
  text-decoration: none;
}

.purchase-files__payments-doc-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  min-width: 0;
  flex-wrap: nowrap;
}

.purchase-files__payments-doc-actions .purchase-files__list-link {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-files__doc-more-tag {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
}

.purchase-files__doc-delete {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.purchase-files__doc-delete:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.purchase-files__doc-delete:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.purchase-files__doc-delete svg {
  width: 0.9rem;
  height: 0.9rem;
}

.purchase-files__button--mini {
  margin-top: 0;
  min-height: 1.8rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
}

.purchase-files__button-mini-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  line-height: 1;
  font-size: 1.2rem;
  font-weight: 600;
}

.purchase-files__docs-cell {
  text-align: center;
  vertical-align: middle;
}

.purchase-files__docs-cell-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  font-size: 0.74rem;
  font-weight: 600;
  color: #334155;
}

.purchase-files__docs-cell-link:hover {
  color: #1d4ed8;
}

.purchase-files__docs-upload-btn {
  margin-top: 0;
  width: 1.95rem;
  min-width: 1.95rem;
  height: 1.95rem;
  min-height: 1.95rem;
  padding: 0;
  border-radius: 0.52rem;
}

.purchase-files__payments-link {
  display: inline-flex;
  width: fit-content;
  font-size: 0.78rem;
  color: #1d4ed8;
  text-decoration: none;
}

.purchase-files__payments-link:hover {
  text-decoration: underline;
}

.purchase-detail-product-photo {
  width: 2.08rem;
  height: 2.82rem;
  object-fit: cover;
  border-radius: 0.62rem;
  border: 1px solid #d7e3f4;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: block;
  flex-shrink: 0;
}

.purchase-detail-products-table {
  width: 100%;
  table-layout: fixed;
}

.purchase-detail-products-table td:nth-child(2) {
  overflow-wrap: anywhere;
}

.purchase-detail-pricing-table {
  min-width: 1780px;
  font-size: 0.8rem;
  table-layout: auto;
}

.purchase-detail-pricing-table th,
.purchase-detail-pricing-table td {
  padding: 0.52rem 0.68rem;
  vertical-align: middle;
}

.purchase-detail-pricing-table th:nth-child(2),
.purchase-detail-pricing-table td:nth-child(2) {
  width: 440px;
  min-width: 440px;
  max-width: 520px;
  overflow-wrap: anywhere;
}

.purchase-detail-pricing-table th:first-child,
.purchase-detail-pricing-table td:first-child:not([colspan]) {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 72px;
  min-width: 72px;
  background: #fff;
  box-shadow: 1px 0 0 #e2e8f0, 0.45rem 0 0.8rem rgba(15, 23, 42, 0.06);
}

.purchase-detail-pricing-table th:first-child {
  z-index: 3;
  background: var(--mpb-gray-50);
}

.purchase-detail-pricing-table input[type="number"] {
  max-width: 100%;
  height: 2rem;
  padding: 0.28rem 0.52rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 0 rgba(255, 255, 255, 0.75);
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.purchase-detail-pricing-table input[type="number"]:focus {
  outline: none;
  border-color: #7aa7f7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14), inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.purchase-detail-pricing-table td:last-child span {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 5.6rem;
  padding: 0.28rem 0.62rem;
  border: 1px solid #dbe6f5;
  border-radius: 0.55rem;
  background: #f8fbff;
  color: #0f172a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.purchase-catalog-panel {
  margin: 0 var(--purchase-detail-inline-gap) 1.5rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.purchase-catalog-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--mpb-gray-900);
}

.purchase-catalog-panel__top {
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.purchase-catalog-panel__hint {
  margin-bottom: 0.8rem;
}

.purchase-catalog-panel__add-btn {
  margin-left: auto;
  min-height: 2.25rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
}

.purchase-catalog-panel .costs-table-wrap {
  margin: 0;
}

.purchase-catalog-panel__table-wrap {
  width: 100%;
  max-height: 360px;
  overflow: auto;
}

.purchase-catalog-panel__table {
  width: 100%;
  table-layout: fixed;
}

.purchase-catalog-panel__table td:nth-child(2) {
  overflow-wrap: anywhere;
}

.purchase-catalog-panel__photo-cell,
.purchase-catalog-panel__qty-cell {
  vertical-align: middle;
}

.purchase-catalog-panel__qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.18rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.62rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.purchase-catalog-panel__qty-btn {
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.42rem;
  background: #f8fafc;
  color: #334155;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.purchase-catalog-panel__qty-btn:hover:not(:disabled) {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.purchase-catalog-panel__qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.purchase-catalog-panel__qty-input {
  width: 4.4rem;
  height: 1.6rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.42rem;
  padding: 0.2rem 0.35rem;
  text-align: center;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  background: #fff;
}

.purchase-catalog-panel__qty-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.purchase-detail-product-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: #f1f5f9;
  font-size: 0.8rem;
}

.purchase-detail-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.purchase-detail-qty__input {
  width: 5.5rem;
  padding: 0.28rem 0.4rem;
  border-radius: 0.4rem;
  border: 1px solid var(--mpb-gray-200);
  font-size: 0.8125rem;
  color: var(--mpb-gray-900);
  font-variant-numeric: tabular-nums;
}

.purchase-detail-qty__input:focus {
  outline: none;
  border-color: var(--mpb-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.purchase-detail-qty__save {
  min-width: 2rem;
  height: 1.8rem;
  border-radius: 0.4rem;
  border: 1px solid #22c55e;
  background: #ecfdf5;
  color: #16a34a;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.purchase-detail-qty__save:hover:not(:disabled) {
  border-color: #16a34a;
  background: #dcfce7;
  color: #15803d;
}

.purchase-detail-qty__save:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.purchase-detail-writeoff-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.purchase-detail-writeoff-btn {
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 0.45rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.purchase-detail-writeoff-btn:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

.purchase-detail-writeoff-modal {
  max-width: 760px;
}

.purchase-detail-writeoff-modal .soc-page__modal-body {
  padding-top: 0.75rem;
}

.purchase-detail-writeoff-modal .costs-table-wrap {
  margin: 0;
}

.purchase-detail-page .purchase-payment-plan {
  margin: 0 var(--purchase-detail-inline-gap) 1.5rem;
  padding: 1.35rem 1.5rem 1.2rem;
  border: 1px solid #dbe5f0;
  border-left: 1px solid #dbe5f0;
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.purchase-payment-plan__quick-actions {
  margin: 0 var(--purchase-detail-inline-gap) 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.purchase-payment-plan__header {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.1rem;
  margin-bottom: 1rem;
}

.purchase-payment-plan__header-main {
  min-width: 0;
  align-self: center;
}

.purchase-payment-plan__header-side {
  display: grid;
  justify-items: end;
  gap: 0.55rem;
}

.purchase-payment-plan__title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.purchase-payment-plan__subtitle {
  margin: 0.45rem 0 0;
  font-size: 0.83rem;
  line-height: 1.45;
  color: #64748b;
}

.purchase-payment-plan__total {
  flex: 0 0 auto;
  min-width: 248px;
  padding: 0.68rem 0.82rem;
  border-radius: 0.78rem;
  border: 1px solid #dbe5f0;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.24rem;
}

.purchase-payment-plan__total-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.purchase-payment-plan__total-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.purchase-payment-plan__link-btn {
  min-height: 2.15rem;
  padding: 0.35rem 0.82rem;
  border-radius: 0.58rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.purchase-payment-plan__link-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.purchase-payment-plan__link-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.purchase-payment-plan__layout {
  width: 100%;
  display: grid;
  gap: 0.9rem;
}

.purchase-payment-plan__controls {
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(220px, 260px) auto;
  justify-content: stretch;
  gap: 0.8rem;
  align-items: end;
  padding: 0.82rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.82rem;
  background: #f8fbff;
}

.purchase-payment-plan__field {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
  min-width: 0;
}

.purchase-payment-plan__field span {
  font-size: 0.71rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.purchase-payment-plan__input {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.44rem 0.68rem;
  border-radius: 0.58rem;
  border: 1px solid #cfd8e3;
  background: #fff;
  font-size: 0.86rem;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.purchase-payment-plan__input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.purchase-payment-plan__input--count {
  max-width: 100%;
}

.purchase-payment-plan__equal-btn {
  min-height: 2.35rem;
  padding: 0.42rem 1.12rem;
  border-radius: 0.58rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.purchase-payment-plan__equal-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.purchase-payment-plan__table-wrap {
  width: 100%;
  max-width: 100%;
  border: 1px solid #dbe5f0;
  border-radius: 0.82rem;
  overflow: auto;
  background: #fff;
}

.purchase-payment-plan__table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.85rem;
}

.purchase-payment-plan__table thead th {
  padding: 0.62rem 0.7rem;
  background: #f8fbff;
  color: #475569;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #dbe5f0;
}

.purchase-payment-plan__table tbody td {
  padding: 0.52rem 0.7rem;
  border-bottom: 1px solid #eef2f7;
  color: #0f172a;
  vertical-align: middle;
}

.purchase-payment-plan__table tbody tr:last-child td {
  border-bottom: 0;
}

.purchase-payment-plan__table thead th:nth-child(1),
.purchase-payment-plan__table tbody td:nth-child(1) {
  width: 96px;
}

.purchase-payment-plan__table thead th:nth-child(2),
.purchase-payment-plan__table tbody td:nth-child(2) {
  width: 240px;
}

.purchase-payment-plan__table thead th:nth-child(3),
.purchase-payment-plan__table tbody td:nth-child(3) {
  width: 170px;
}

.purchase-payment-plan__part-cell {
  white-space: nowrap;
  font-weight: 800;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

.purchase-payment-plan__cell-input {
  width: 100%;
  min-height: 2.15rem;
  padding: 0.38rem 0.58rem;
  border-radius: 0.56rem;
  border: 1px solid #d0dbe8;
  background: #fff;
  font-size: 0.84rem;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.purchase-payment-plan__cell-input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.purchase-payment-plan__docs-cell {
  vertical-align: middle;
}

.purchase-payment-plan__docs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
}

.purchase-payment-plan__doc-link {
  flex: 1 1 auto;
  min-width: 0;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-payment-plan__doc-link:hover {
  text-decoration: underline;
}

.purchase-payment-plan__doc-empty {
  flex: 1 1 auto;
  color: #94a3b8;
  font-size: 0.78rem;
}

.purchase-payment-plan__doc-more {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.purchase-payment-plan__doc-upload {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: 0.22rem 0.62rem;
  border-radius: 0.52rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.purchase-payment-plan__doc-upload:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.purchase-payment-plan__footer {
  margin-top: 0.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
}

.purchase-payment-plan__footer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.purchase-payment-plan__hint {
  margin: 0;
  font-size: 0.86rem;
  color: #334155;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.purchase-payment-plan__submit {
  justify-self: auto;
  min-width: 0;
}

.purchase-payment-plan__text-link {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
  cursor: pointer;
  padding: 0.12rem 0;
}

.purchase-payment-plan__text-link:hover:not(:disabled) {
  color: #1e3a8a;
}

.purchase-payment-plan__text-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.purchase-aggregation-module-title {
  margin: 0 var(--purchase-detail-inline-gap) 0.15rem;
  display: grid;
  gap: 0.22rem;
}

.purchase-aggregation-module-title__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.purchase-aggregation-module-title__subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

.purchase-aggregation-col-head {
  display: grid;
  gap: 0.1rem;
}

.purchase-aggregation-col-head__action {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.14rem;
  cursor: pointer;
  padding: 0;
  justify-self: start;
}

.purchase-aggregation-col-head__action:hover {
  color: #1e3a8a;
}

.purchase-aggregation-add-th {
  width: 56px;
  text-align: right;
}

.purchase-aggregation-add-cell {
  width: 56px;
}

.purchase-aggregation-add-btn {
  width: 1.8rem;
  min-width: 1.8rem;
  height: 1.8rem;
  min-height: 1.8rem;
}

.purchase-aggregation-add-product-row td {
  background: #f8fbff;
  border-top: 1px dashed #cbd5e1;
}

.purchase-aggregation-add-product-row__icon-cell {
  text-align: center;
  vertical-align: middle;
}

.purchase-aggregation-add-product-row__icon-btn {
  width: 1.8rem;
  min-width: 1.8rem;
  height: 1.8rem;
  min-height: 1.8rem;
}

.purchase-aggregation-add-product-row__text-btn {
  border: none;
  background: transparent;
  color: #1d4ed8;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16rem;
  cursor: pointer;
  padding: 0;
}

.purchase-aggregation-add-product-row__text-btn:hover {
  color: #1e3a8a;
}

.purchase-detail-page .purchase-tax-card {
  margin: 0 var(--purchase-detail-inline-gap) 1.5rem;
  padding: 1.25rem 1.5rem 1.2rem;
  border: 1px solid #dbe5f0;
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.purchase-tax-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.purchase-tax-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.purchase-tax-card__subtitle {
  margin: 0;
  font-size: 0.83rem;
  color: #64748b;
  line-height: 1.45;
}

.purchase-tax-card__label {
  margin-top: 0.95rem;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #64748b;
}

.purchase-tax-card__options {
  margin-top: 0.56rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.56rem;
}

.purchase-tax-card__option {
  min-height: 2.35rem;
  border: 1px solid #d5e2f5;
  border-radius: 0.7rem;
  background: #ffffff;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  padding: 0.52rem 0.72rem;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.purchase-tax-card__option:hover {
  background: #f8fbff;
  border-color: #c5d8f6;
}

.purchase-tax-card__option.is-active {
  border-color: #8fb8f8;
  background: #eaf3ff;
  color: #1d4ed8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.purchase-tax-card__hint {
  margin: 0.72rem 0 0;
  font-size: 0.83rem;
  color: #334155;
  line-height: 1.45;
  font-weight: 600;
}

.purchase-tax-card__all-services-hint {
  margin: 0.95rem 0 0;
  padding: 0.74rem 0.86rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.7rem;
  background: #f8fafc;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
}

.purchase-tax-card__table-wrap {
  margin-top: 1rem;
}

.purchase-tax-card__table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.purchase-tax-card__table-action {
  min-height: 1.82rem;
  border: 1px solid #d5e2f5;
  border-radius: 0.56rem;
  background: #ffffff;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0.28rem 0.56rem;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.purchase-tax-card__table-action:hover {
  background: #f8fbff;
  border-color: #c5d8f6;
}

.purchase-tax-card__table-action.is-active {
  border-color: #8fb8f8;
  background: #eaf3ff;
  color: #1d4ed8;
}

.purchase-detail-page .costs-table-wrap,
.purchase-detail-page .costs-form-card,
.purchase-detail-page .dashboard-alert {
  margin-left: var(--purchase-detail-inline-gap);
  margin-right: var(--purchase-detail-inline-gap);
}

.purchase-detail-page .purchase-detail-block {
  margin-left: var(--purchase-detail-inline-gap);
  margin-right: var(--purchase-detail-inline-gap);
}

.purchase-payment-link-modal {
  max-width: min(1180px, calc(100vw - 2rem));
  width: 100%;
  max-height: calc(100vh - 3rem);
}

.purchase-payment-link-modal__body {
  display: grid;
  gap: 1rem;
}

.purchase-payment-link-modal__purchase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.72rem;
  background: #f8fbff;
}

.purchase-payment-link-modal__purchase-main {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.purchase-payment-link-modal__purchase-main strong {
  color: #0f172a;
  font-size: 0.95rem;
}

.purchase-payment-link-modal__purchase-main span,
.purchase-payment-link-modal__purchase-stats span {
  color: #475569;
  font-size: 0.8rem;
}

.purchase-payment-link-modal__purchase-stats {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 0.2rem;
}

.purchase-payment-link-modal__progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 0.46rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.purchase-payment-link-modal__progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 0.2s ease;
}

.purchase-payment-link-modal__section {
  display: grid;
  gap: 0.45rem;
}

.purchase-payment-link-modal__section h4 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.purchase-payment-link-modal__table-wrap {
  margin: 0;
  max-height: 285px;
  overflow: auto;
}

.purchase-payment-link-modal__table th:last-child,
.purchase-payment-link-modal__table td:last-child {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.purchase-payment-link-modal__table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f6f8fc;
  box-shadow: inset 0 -1px 0 #e2e8f0;
}

.purchase-payment-link-modal__row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.purchase-payment-link-modal__amount-input {
  min-width: 0;
  width: 100%;
  height: 1.9rem;
  border: none;
  background: transparent;
  padding: 0 0.1rem;
  box-shadow: none;
}

.purchase-payment-link-modal__amount-editor {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 9.25rem;
  max-width: 10.5rem;
  padding: 0.24rem 0.34rem 0.24rem 0.46rem;
  border: 1px solid #d7e0ec;
  border-radius: 0.72rem;
  background: #fbfdff;
}

.purchase-payment-link-modal__amount-editor:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.purchase-payment-link-modal__amount-currency {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  line-height: 1;
}

.purchase-payment-link-modal__amount-save {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.5rem;
  border: 1px solid #c8d5e7;
  background: #fff;
  color: #1f4fbf;
  font-size: 0.83rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.purchase-payment-link-modal__amount-save:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.purchase-payment-link-modal__amount-save:disabled {
  opacity: 0.65;
  cursor: wait;
}

.purchase-payment-link-modal__bind-btn {
  min-height: 2.1rem;
  padding: 0.42rem 0.72rem;
  border-radius: 0.65rem;
  border: 1px solid #d1d9e6;
  background: #ffffff;
  color: #4b5a74;
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.purchase-payment-link-modal__bind-btn:hover:not(:disabled) {
  background: #f8fbff;
  border-color: #c2cedf;
  color: #334155;
}

.purchase-payment-link-modal__bind-btn:disabled {
  opacity: 1;
  color: #8d99ad;
  border-color: #d7dfeb;
  background: #ffffff;
  cursor: not-allowed;
}

.purchase-payment-link-modal__unbind-btn {
  min-height: 2.1rem;
  padding: 0.42rem 0.72rem;
  border-radius: 0.65rem;
  font-size: 0.775rem;
  font-weight: 700;
}

.purchase-payment-link-modal__allocator {
  gap: 0.62rem;
  padding: 0.78rem 0.84rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.72rem;
  background: #f8fbff;
}

.purchase-payment-link-modal__allocator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #334155;
  font-size: 0.82rem;
}

.purchase-payment-link-modal__allocator-head strong {
  color: #0f172a;
  font-size: 0.9rem;
}

.purchase-payment-link-modal__allocator-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: #334155;
}

.purchase-payment-link-modal__allocator-stats .is-warning {
  color: #b45309;
}

.purchase-payment-link-modal__allocator-stats .is-ok {
  color: #047857;
}

.purchase-payment-link-modal__allocator-table {
  display: grid;
  gap: 0.42rem;
}

.purchase-payment-link-modal__allocator-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9rem auto;
  gap: 0.5rem;
  align-items: center;
}

.purchase-payment-link-modal__allocator-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.purchase-service-modal {
  max-width: min(520px, calc(100vw - 2rem));
}

.purchase-service-modal__body {
  display: grid;
  gap: 0.9rem;
  padding-top: 1rem;
}

.purchase-service-modal__hint {
  margin: 0;
  font-size: 0.84rem;
  color: #475569;
}

.purchase-service-modal__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.purchase-service-modal__tab {
  min-height: 2rem;
  padding: 0.45rem 0.78rem;
}

.purchase-service-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.purchase-service-modal__section {
  display: grid;
  gap: 0.5rem;
  padding: 0.62rem 0.66rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.62rem;
  background: #f8fbff;
}

.purchase-service-modal__section-label {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.purchase-service-modal__fields {
  display: grid;
  gap: 0.45rem;
}

.purchase-service-modal__field {
  display: grid;
  gap: 0.28rem;
}

.purchase-service-modal__field span {
  font-size: 0.74rem;
  color: #475569;
  font-weight: 600;
}

.purchase-service-modal__field input {
  width: 100%;
  min-height: 2rem;
  border: 1px solid #cfd8e3;
  border-radius: 0.56rem;
  background: #fff;
  padding: 0.4rem 0.58rem;
  font-size: 0.84rem;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.purchase-service-modal__field input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.purchase-service-modal__stats {
  margin: 0;
  font-size: 0.78rem;
  color: #334155;
  font-weight: 600;
}

@media (max-width: 980px) {
  .purchase-aggregation-module-title {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .purchase-aggregation-col-head {
    gap: 0.16rem;
  }

  .purchase-detail-page .purchase-payment-plan {
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 1.1rem;
  }

  .purchase-payment-plan__quick-actions {
    margin-left: 1rem;
    margin-right: 1rem;
    flex-wrap: wrap;
  }

  .purchase-detail-page .purchase-tax-card {
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 1.05rem;
  }

  .purchase-tax-card__options {
    grid-template-columns: 1fr;
  }

  .purchase-tax-card__table-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .purchase-payment-plan__header {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .purchase-payment-plan__header-side {
    justify-items: start;
  }

  .purchase-payment-plan__total {
    width: fit-content;
    max-width: 100%;
    align-items: flex-start;
    min-width: 0;
  }

  .purchase-payment-plan__layout {
    width: 100%;
  }

  .purchase-payment-plan__controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-payment-plan__footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .purchase-payment-plan__footer-actions {
    justify-content: flex-start;
  }

  .purchase-payment-plan__submit {
    justify-self: start;
    min-width: 0;
  }

  .purchase-payment-link-modal__purchase {
    grid-template-columns: 1fr;
  }

  .purchase-payment-link-modal__purchase-stats {
    justify-items: start;
  }

  .purchase-payment-link-modal__allocator-row {
    grid-template-columns: 1fr;
  }

  .purchase-payment-link-modal__allocator-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .purchase-service-modal__actions {
    justify-content: stretch;
  }

  .purchase-service-modal__actions .mpb-btn-secondary,
  .purchase-service-modal__actions .mpb-btn-primary {
    flex: 1 1 0;
  }
}

@media (max-width: 640px) {
  .purchase-payment-plan__controls {
    grid-template-columns: 1fr;
    padding: 0.72rem;
  }

  .purchase-payment-plan__table {
    min-width: 520px;
  }

  .purchase-payment-plan__total {
    width: 100%;
  }

  .purchase-payment-plan__equal-btn,
  .purchase-payment-plan__submit {
    width: 100%;
  }

  .purchase-payment-plan__footer {
    gap: 0.65rem;
    padding-top: 0.78rem;
  }

  .purchase-files__payments-list--docs {
    overflow-x: hidden;
  }

  .purchase-files__payments-row--docs {
    --purchase-doc-date-col: 5.8rem;
    --purchase-doc-amount-col: 3.45rem;
    gap: 0.24rem;
    grid-template-columns:
      minmax(0, var(--purchase-doc-date-col))
      minmax(0, var(--purchase-doc-amount-col))
      minmax(5rem, 1fr);
  }

  .purchase-files__payments-row--with-actions {
    grid-template-columns: minmax(0, 1fr) 88px 52px auto;
    gap: 0.3rem;
  }

  .purchase-files__payments-row--docs .purchase-files__button--mini {
    flex-basis: 1.8rem;
    width: 1.8rem;
    min-width: 1.8rem;
    height: 1.8rem;
    min-height: 1.8rem;
    padding: 0;
  }

  .purchase-catalog-panel {
    margin: 0 1rem 1.25rem;
  }

  .purchase-catalog-panel__top {
    align-items: stretch;
    gap: 0.5rem;
  }

  .purchase-catalog-panel__add-btn {
    width: 100%;
    margin-left: 0;
  }

  .purchase-catalog-panel__table-wrap {
    max-height: 320px;
  }

  .purchase-catalog-panel__qty-control {
    gap: 0.18rem;
    padding: 0.14rem;
  }

  .purchase-catalog-panel__qty-btn,
  .purchase-catalog-panel__qty-input {
    height: 1.52rem;
  }

  .purchase-catalog-panel__qty-btn {
    width: 1.52rem;
  }

  .purchase-catalog-panel__qty-input {
    width: 3.8rem;
    font-size: 0.8rem;
  }
}

.costs-btn-edit,
.costs-btn-delete {
  padding: 0.35rem 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.costs-btn-edit {
  background: var(--mpb-primary-light);
  color: var(--mpb-primary);
}

.costs-btn-delete {
  background: #fef2f2;
  color: #dc2626;
}

/* Summary page — premium cash flow dashboard */
.summary-page {
  --s-income: #059669;
  --s-income-soft: #ecfdf5;
  --s-expense: #dc2626;
  --s-expense-soft: #fef2f2;
  --s-today-bg: #eff6ff;
  --s-today-border: #60a5fa;
  --s-surface: #ffffff;
  --s-surface-subtle: #f8fafc;
  --s-border: #e2e8f0;
  --s-border-strong: #cbd5e1;
  --s-text: #0f172a;
  --s-text-muted: #64748b;
  --s-radius: 0.75rem;
  --s-radius-sm: 0.8rem;
  --s-radius-xs: 0.55rem;
  --s-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.06);
  --s-fs-xs: 0.75rem;
  --s-fs-sm: 0.875rem;
  --s-fs-base: 0.9375rem;
  --s-fs-lg: 1.125rem;
  --s-transition: 0.18s cubic-bezier(.4,0,.2,1);
  --s-sticky-offset: 5.9rem;
  --s-pin-width: 11.5rem;
  --s-pin-mask-width: var(--s-pin-width);
}

.summary-page__card {
  width: 100%;
  margin: 0 auto;
  background: var(--s-surface);
  border-radius: var(--s-radius);
  box-shadow: none;
  border: none;
  overflow: visible;
}

.summary-page__hero {
  padding: 2.25rem 2.25rem 1.75rem;
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.28), transparent 34%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #3b82f6 100%);
  border-radius: var(--s-radius) var(--s-radius) 0 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.summary-page__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent 55%);
  pointer-events: none;
}

.summary-page__hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.95fr);
  gap: 1.5rem;
  align-items: end;
}

.summary-page__hero-inner {
  max-width: 46rem;
  position: relative;
}

.summary-page__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.95rem;
  background: rgba(255,255,255,0.14);
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
}

.summary-page__badge svg {
  width: 0.9rem;
  height: 0.9rem;
}

.summary-page__hero .summary-page__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: #fff;
}

.summary-page__hero .summary-page__subtitle {
  max-width: 42rem;
  margin: 0.95rem 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.86);
}

.summary-page__hero-actions {
  margin-top: 1rem;
}

.summary-page__hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.7rem;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22);
  transition: transform var(--s-transition), box-shadow var(--s-transition);
}

.summary-page__hero-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.28);
}

.summary-page__hero-panel {
  padding: 1.15rem 1.2rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.08));
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.summary-page__hero-panel-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.68);
}

.summary-page__hero-panel-period {
  margin-top: 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}

.summary-page__hero-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.summary-page__hero-metric {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.summary-page__hero-metric span {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.72);
}

.summary-page__hero-metric strong {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.summary-page__toolbar {
  position: sticky;
  top: 0.75rem;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.summary-page__toolbar-main {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.summary-page__toolbar-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.summary-page__period,
.summary-page__group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.summary-page__period--wide {
  min-width: 19rem;
}

.summary-page__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
}

.summary-page__period-inputs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.summary-page__input {
  min-width: 0;
  padding: 0.68rem 0.8rem;
  font-size: var(--s-fs-sm);
  border: 1px solid var(--s-border);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--s-text);
  transition: border-color var(--s-transition), box-shadow var(--s-transition), transform var(--s-transition);
}

.summary-page__input:hover {
  border-color: var(--s-border-strong);
}

.summary-page__input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.summary-page__period-sep {
  color: #94a3b8;
  font-size: 0.9rem;
}

.summary-page__pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.summary-page__pill {
  padding: 0.58rem 0.92rem;
  font-size: var(--s-fs-sm);
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all var(--s-transition);
}

.summary-page__pill:hover {
  border-color: #bfdbfe;
  color: #0f172a;
  transform: translateY(-1px);
}

.summary-page__pill.is-active {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  color: #1d4ed8;
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.summary-page__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 0.85rem 1.15rem;
  border-radius: 0.95rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
  color: #fff;
  text-decoration: none;
  font-size: var(--s-fs-sm);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.18);
  transition: transform var(--s-transition), box-shadow var(--s-transition), opacity var(--s-transition);
}

.summary-page__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(30, 64, 175, 0.24);
}

.summary-page__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.5rem 0 0;
}

.summary-page__metric-card {
  position: relative;
  overflow: hidden;
  padding: 1.15rem 1.15rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid var(--s-border);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.summary-page__metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  background: #94a3b8;
}

.summary-page__metric-card[data-tone="positive"]::before {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.summary-page__metric-card[data-tone="negative"]::before {
  background: linear-gradient(180deg, #fb7185 0%, #dc2626 100%);
}

.summary-page__metric-card[data-tone="neutral"]::before {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.summary-page__metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.summary-page__metric-value {
  margin-top: 0.55rem;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--s-text);
  line-height: 1.1;
}

.summary-page__metric-meta {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--s-text-muted);
}

.summary-page__body {
  padding: 1.4rem 0 1.85rem;
}

.summary-page__section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.summary-page__section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-left: 0;
  width: 100%;
}

.summary-page__section-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
}

.summary-page__section-title {
  margin: 0.2rem 0 0;
  font-size: 1.4rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--s-text);
}

.summary-page__section-note {
  margin-left: 0;
  max-width: 28rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--s-text-muted);
  text-align: left;
}

.summary-page__section-note-icon {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  color: #64748b;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.summary-page__table-wrap {
  position: relative;
  isolation: isolate;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 0.82rem;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.55) rgba(226, 232, 240, 0.65);
}

.summary-page__table-wrap::-webkit-scrollbar {
  height: 12px;
}

.summary-page__table-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.92) 100%);
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.82);
}

.summary-page__table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
  background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.summary-page__table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
}

.summary-page__table-wrap::-webkit-scrollbar-thumb:active {
  background: linear-gradient(90deg, #2563eb 0%, #1e40af 100%);
}

.summary-page__table-wrap::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--s-pin-mask-width);
  background: #fff;
  z-index: 4;
  pointer-events: none;
}

.summary-page__fixed-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  z-index: 260;
  display: none;
  pointer-events: none;
}

.summary-page__fixed-head-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border: none;
  box-shadow: none;
  scrollbar-width: none;
}

.summary-page__fixed-head-viewport::-webkit-scrollbar {
  display: none;
}

.summary-page__fixed-head--portal .summary-page__fixed-head-viewport {
  --s-border: #e2e8f0;
  --s-fs-sm: 0.875rem;
  background: #fff;
  border: none;
  box-shadow: none;
}

.summary-page__fixed-head--portal .summary-page__table--fixed-head thead th {
  height: 56px;
  padding: 0 1rem;
  vertical-align: middle;
  background: #fff;
  font-weight: 700;
  font-size: var(--s-fs-sm, 0.875rem);
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--s-border);
  border-right: 1px solid #edf2f7;
  backdrop-filter: none;
  border-radius: 0;
}

.summary-page__fixed-head--portal .summary-page__table--fixed-head thead th:last-child {
  border-right: none;
}

.summary-page__fixed-head--portal .summary-page__table--fixed-head thead .summary-page__pin {
  background: #fff;
  z-index: 5;
}

.summary-page__table-sticky-head {
  position: sticky;
  top: var(--s-sticky-offset);
  z-index: 8;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.summary-page__table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--s-fs-sm);
}

.summary-page__col-category {
  width: var(--s-pin-width);
}

.summary-page__col-period {
  width: 7.5rem;
}

.summary-page__table th,
.summary-page__table td {
  padding: 0.68rem 0.95rem;
  border-bottom: 1px solid #edf2f7;
}

.summary-page__table th {
  border-right: 1px solid #edf2f7;
}

.summary-page__table td {
  border-right: 1px solid #f8fafc;
}

.summary-page__table th:last-child,
.summary-page__table td:last-child {
  border-right: none;
}

.summary-page__table thead th {
  height: 56px;
  padding: 0 1rem;
  vertical-align: middle;
  background: #fff;
  font-weight: 700;
  font-size: var(--s-fs-sm);
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--s-border);
  backdrop-filter: none;
  border-radius: 0;
}

.summary-page__table thead th:first-child,
.summary-page__table thead th:last-child,
.summary-page__table--fixed-head thead th:first-child,
.summary-page__table--fixed-head thead th:last-child {
  border-radius: 0;
}

.summary-page__table thead th:first-child,
.summary-page__table--fixed-head thead th:first-child {
  border-top-left-radius: 1rem;
  border-bottom-left-radius: 1rem;
}

.summary-page__table thead th:last-child,
.summary-page__table--fixed-head thead th:last-child {
  border-top-right-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.summary-page__table--sticky-head thead th {
  position: relative;
  z-index: 3;
}

.summary-page__table--fixed-head {
  min-width: 100%;
}

.summary-page__table--fixed-head thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.summary-page__table--sticky-head {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0.14s;
}

.summary-page__table-sticky-head.is-active .summary-page__table--sticky-head {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0s;
}

.summary-page__pin {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
  background-clip: padding-box;
  contain: paint;
  box-shadow: inset -1px 0 0 #dbe3ee;
}

.summary-page__table thead .summary-page__pin {
  background: #fff;
  z-index: 5;
}

.summary-page__th-cat,
.summary-page__td-type {
  min-width: var(--s-pin-width);
  text-align: left;
}

.summary-page__th-date,
.summary-page__cell {
  min-width: 7.5rem;
  text-align: right;
}

.summary-page__th-date {
  white-space: nowrap;
}

.summary-page__th-weekday {
  display: block;
  font-size: 0.62rem;
  line-height: 1;
  color: #94a3b8;
  letter-spacing: 0.06em;
}

.summary-page__th-day {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.18rem;
  font-size: inherit;
  line-height: 1.05;
}

.summary-page__th-date.is-today {
  background: #fff;
  color: inherit;
  border-left: none;
  border-right: 1px solid #edf2f7;
}

.summary-page__th-date.is-today .summary-page__th-day {
  color: #64748b;
  font-weight: inherit;
}

.summary-page__th-date.is-today .summary-page__th-day::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 0.12rem rgba(37, 99, 235, 0.2);
}

.summary-page__aggregate {
  background: #f8fafc;
  font-weight: 700;
}

.summary-page__aggregate td {
  background: #f8fafc;
}

.summary-page__aggregate .summary-page__pin {
  background: #f8fafc;
}

.summary-page__aggregate td:first-child {
  border-top-left-radius: 1rem;
  border-bottom-left-radius: 1rem;
}

.summary-page__aggregate td:last-child {
  border-top-right-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.summary-page__aggregate--opening td,
.summary-page__aggregate--closing td {
  background: #eaf2ff;
}

.summary-page__aggregate--opening .summary-page__pin,
.summary-page__aggregate--closing .summary-page__pin {
  background: #eaf2ff;
  border-top-left-radius: 0.85rem;
  border-bottom-left-radius: 0.85rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 0 round 0.85rem 0 0 0.85rem);
  box-shadow: none;
  z-index: 9;
  position: sticky;
  left: 0;
  isolation: isolate;
  background-clip: padding-box;
}

.summary-page__aggregate--opening .summary-page__pin::before,
.summary-page__aggregate--closing .summary-page__pin::before {
  display: none;
}

.summary-page__aggregate--opening .summary-page__pin > *,
.summary-page__aggregate--closing .summary-page__pin > * {
  position: relative;
  z-index: 1;
}

.summary-page__aggregate--opening .summary-page__td-type,
.summary-page__aggregate--closing .summary-page__td-type,
.summary-page__aggregate--opening .summary-page__cell--balance,
.summary-page__aggregate--closing .summary-page__cell--balance {
  color: #1d4ed8;
  font-weight: 700;
}

.summary-page__aggregate--opening td:first-child,
.summary-page__aggregate--closing td:first-child {
  border-top-left-radius: 0.85rem;
  border-bottom-left-radius: 0.85rem;
  overflow: hidden;
}

.summary-page__aggregate--opening td:last-child,
.summary-page__aggregate--closing td:last-child {
  border-top-right-radius: 0.85rem;
  border-bottom-right-radius: 0.85rem;
  overflow: hidden;
}

.summary-page__aggregate--opening .summary-page__pin,
.summary-page__aggregate--income .summary-page__pin,
.summary-page__aggregate--expense .summary-page__pin,
.summary-page__aggregate--net .summary-page__pin,
.summary-page__aggregate--closing .summary-page__pin {
  border-top-left-radius: 0.85rem !important;
  border-bottom-left-radius: 0.85rem !important;
  overflow: hidden;
}

.summary-page__aggregate--income td:first-child,
.summary-page__aggregate--expense td:first-child,
.summary-page__aggregate--net td:first-child {
  border-top-left-radius: 0.85rem;
  border-bottom-left-radius: 0.85rem;
  overflow: hidden;
}

.summary-page__aggregate--income td:last-child,
.summary-page__aggregate--expense td:last-child,
.summary-page__aggregate--net td:last-child {
  border-top-right-radius: 0.85rem;
  border-bottom-right-radius: 0.85rem;
  overflow: hidden;
}

.summary-page__aggregate--income td,
.summary-page__aggregate--expense td,
.summary-page__aggregate--net td,
.summary-page__aggregate--closing td {
  border-top: 0.5rem solid #fff;
  background-clip: padding-box;
}

.summary-page__table tbody tr:not(.summary-page__aggregate):nth-child(even) td {
  background: #fbfdff;
}

.summary-page__table tbody tr:not(.summary-page__aggregate):nth-child(even) .summary-page__pin {
  background: #fbfdff;
}

.summary-page__table tbody tr:not(.summary-page__aggregate):hover td {
  background: #f3f7ff;
}

.summary-page__table tbody tr:not(.summary-page__aggregate):hover .summary-page__pin {
  background: #f3f7ff;
}

.summary-page__td-type {
  font-weight: 700;
  color: var(--s-text);
}

.summary-page__td-type[data-type="income"] {
  color: var(--s-income);
}

.summary-page__td-type[data-type="expense"] {
  color: var(--s-expense);
}

.summary-page__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.15rem 0;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.summary-page__toggle:hover .summary-page__toggle-icon {
  transform: rotate(45deg) scale(1.08);
}

.summary-page__toggle-icon {
  width: 0.48rem;
  height: 0.48rem;
  display: inline-block;
  flex-shrink: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform var(--s-transition), color var(--s-transition);
}

.summary-page__toggle-icon.is-collapsed {
  transform: rotate(-45deg);
}

.summary-page__toggle:hover .summary-page__toggle-icon.is-collapsed {
  transform: rotate(-45deg) scale(1.08);
}

.summary-page__td-cat {
  min-width: var(--s-pin-width);
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  line-height: 1.25;
  font-size: 0.8125rem;
  padding-left: 2rem;
}

.summary-page__cell {
  color: var(--s-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background var(--s-transition), transform var(--s-transition);
}

.summary-page__cell--clickable {
  cursor: pointer;
}

.summary-page__cell--clickable:hover {
  background: #eef4ff !important;
}

.summary-page__cell.is-today {
  background: inherit;
  font-weight: inherit;
  border-left: none;
  border-right: 1px solid #f8fafc;
}

.summary-page__cell--income {
  color: var(--s-income);
}

.summary-page__aggregate .summary-page__cell--income {
  color: var(--s-income);
}

.summary-page__cell--expense {
  color: var(--s-expense);
}

.summary-page__aggregate .summary-page__cell--expense {
  color: var(--s-expense);
}

.summary-page__empty {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
  border-radius: 1.1rem;
  border: 1px dashed #cbd5e1;
}

.summary-page__empty-icon {
  width: 3.6rem;
  height: 3.6rem;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(59,130,246,0.16), rgba(59,130,246,0.04)),
    #fff;
  border: 1px solid rgba(59,130,246,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  position: relative;
}

.summary-page__empty-icon::before,
.summary-page__empty-icon::after {
  content: "";
  position: absolute;
  bottom: 0.8rem;
  width: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.summary-page__empty-icon::before {
  left: 1rem;
  height: 1rem;
}

.summary-page__empty-icon::after {
  left: 1.8rem;
  height: 1.55rem;
  box-shadow: 0 0 0 0.55rem rgba(96, 165, 250, 0.14);
}

.summary-page__empty-text {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #334155;
}

.summary-page__empty-hint {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: #64748b;
}

.summary-page__empty-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  font-size: var(--s-fs-sm);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 999px;
  text-decoration: none;
  transition: transform var(--s-transition), box-shadow var(--s-transition);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.summary-page__empty-link:hover {
  transform: translateY(-1px);
}

.summary-page__planned {
  margin: 0 0 1.85rem;
  border-radius: 1.1rem;
  border: 1px solid #f3d18d;
  background: linear-gradient(180deg, #fffdf6 0%, #ffffff 100%);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(146, 64, 14, 0.06);
}

.summary-page__planned-head {
  padding: 1rem 1.3rem;
  border-bottom: 1px solid rgba(146, 64, 14, 0.08);
  background: linear-gradient(135deg, #fff8e1 0%, #fef3c7 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.summary-page__planned-head::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(146,64,14,0.08);
  color: #b45309;
  font-weight: 800;
  flex-shrink: 0;
}

.summary-page__planned-head > div:first-of-type {
  flex: 1;
}

.summary-page__planned-title {
  font-size: 1rem;
  font-weight: 700;
  color: #92400e;
  margin: 0;
}

.summary-page__planned-desc {
  font-size: 0.8125rem;
  color: #a16207;
  margin: 0.22rem 0 0;
  line-height: 1.5;
}

.summary-page__planned-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: #92400e;
  white-space: nowrap;
}

.summary-page__planned-table-wrap {
  overflow: auto;
}

.summary-page__planned-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--s-fs-sm);
}

.summary-page__planned-table th,
.summary-page__planned-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid #f8e7bf;
}

.summary-page__planned-table thead th {
  background: rgba(255, 251, 235, 0.88);
  font-weight: 700;
  font-size: 0.6875rem;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}

.summary-page__planned-table td {
  color: #5b4b28;
}

.summary-page__planned-table tbody tr:hover td {
  background: #fffaf0;
}

.summary-page__planned-input {
  padding: 0.5rem 0.65rem;
  font-size: var(--s-fs-sm);
  border: 1px solid #edd6a0;
  border-radius: 0.7rem;
  width: 100%;
  max-width: 10rem;
  background: #fff;
  color: #111827;
  transition: border-color var(--s-transition), box-shadow var(--s-transition);
}

.summary-page__planned-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.summary-page__planned-input--amount {
  max-width: 6rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.summary-page__planned-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-start;
}

.summary-page__planned-move,
.summary-page__planned-tofact,
.summary-page__planned-delete {
  min-width: 6.1rem;
  padding: 0.52rem 0.82rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--s-transition);
}

.summary-page__planned-move {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.summary-page__planned-move:hover:not(:disabled) {
  background: #dbeafe;
}

.summary-page__planned-move:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.summary-page__planned-tofact {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.summary-page__planned-tofact:hover {
  background: #d1fae5;
}

.summary-page__planned-delete {
  color: #475467;
  background: #f8fafc;
  border: 1px solid #d0d5dd;
}

.summary-page__planned-delete:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.summary-page__planned-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) auto auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid #dbe5f0;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.summary-page__planned-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.summary-page__planned-card-title {
  min-width: 0;
}

.summary-page__planned-card-type {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-page__planned-card-title strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.84rem;
  line-height: 1.3;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-page__planned-card-amount {
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.summary-page__planned-card-grid {
  display: grid;
  grid-template-columns: 8.4rem 6.2rem;
  gap: 0.55rem;
  align-items: center;
}

.summary-page__planned-field {
  display: grid;
  gap: 0.25rem;
}

.summary-page__planned-field span {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.summary-page__planned-card-desc {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #64748b;
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Recharts overrides */
.recharts-default-legend {
  display: flex;
  gap: 1rem;
}

.recharts-legend-item-text {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #111827;
}

/* Modal with transactions (summary) */
.summary-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.summary-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(8px);
  animation: s-fade-in 0.15s ease-out;
}

@keyframes s-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes s-slide-up {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.summary-modal__dialog {
  position: relative;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-radius: 1.35rem;
  border: 1px solid rgba(191, 219, 254, 0.7);
  box-shadow: 0 36px 72px rgba(15, 23, 42, 0.22), 0 8px 24px rgba(15, 23, 42, 0.08);
  max-width: 960px;
  width: 100%;
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: s-slide-up 0.2s ease-out;
}

.summary-modal__header {
  padding: 1.2rem 1.35rem 1.15rem;
  border-bottom: 1px solid rgba(191, 219, 254, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.summary-modal__heading {
  min-width: 0;
  display: grid;
  gap: 0.28rem;
}

.summary-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-modal__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
}

.summary-modal__subtitle {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #64748b;
  max-width: 42rem;
}

.summary-modal__header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.summary-modal__plans-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.72rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.summary-modal__plans-toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
}

.summary-modal__plans-toggle:hover {
  background: #dbeafe;
}

.summary-modal__plans-toggle.is-active {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.summary-modal__plans-toggle.is-active span {
  background: rgba(255, 255, 255, 0.18);
}

.summary-modal__close {
  border: 1px solid #dbe5f0;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #64748b;
  padding: 0.35rem;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  transition: all 0.15s;
}

.summary-modal__close:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.summary-modal__close--floating {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  z-index: 14;
}

.summary-modal__body {
  padding: 1rem 1.35rem 1.35rem;
  overflow: auto;
  display: grid;
  gap: 0.9rem;
  background:
    radial-gradient(circle at top left, rgba(219, 234, 254, 0.22), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.summary-modal__panel {
  border: 1px solid #dbe5f0;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.summary-modal__panel-head {
  padding: 0.95rem 1rem 0.75rem;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fbff 100%);
}

.summary-modal__panel-head strong {
  display: block;
  font-size: 0.92rem;
  color: #0f172a;
}

.summary-modal__panel-head p {
  margin: 0.22rem 0 0;
  font-size: 0.79rem;
  color: #64748b;
}

.summary-modal__planned {
  padding: 0.9rem 1rem 1rem;
}

.summary-modal__planned-head {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.7rem;
}

.summary-modal__planned-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-modal__planned-list {
  display: grid;
  gap: 0.6rem;
  max-height: min(30vh, 15rem);
  overflow: auto;
  padding-right: 0.15rem;
  scrollbar-width: thin;
}

.summary-modal__planned-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9rem 7.5rem 14.75rem;
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem 0.95rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.95rem;
  background: #ffffff;
}

.summary-modal__planned-main {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
  align-self: center;
}

.summary-modal__planned-title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.summary-modal__planned-title strong {
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.summary-modal__planned-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.45rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.summary-modal__planned-desc {
  margin: 0;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #64748b;
  overflow-wrap: anywhere;
}

.summary-modal__planned-field {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  align-content: start;
}

.summary-modal__planned-field span {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-modal__planned-actions {
  display: grid;
  grid-template-columns: 6.25rem 5.5rem 2rem;
  align-items: end;
  justify-content: end;
  gap: 0.45rem;
}

.summary-modal__planned-actions .summary-page__planned-move,
.summary-modal__planned-actions .summary-page__planned-tofact,
.summary-modal__planned-actions .summary-page__planned-delete {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.summary-modal__planned-delete-icon {
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
}

.summary-modal__new {
  margin: 0;
  padding: 1rem;
  border-radius: 0;
  background: transparent;
  border: none;
}

.summary-modal__new-row {
  display: grid;
  grid-template-columns: 9rem 8rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: flex-end;
}

.summary-modal__new-row label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-modal__new-row input {
  width: 100%;
  padding: 0.65rem 0.78rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.summary-modal__new-row select {
  padding: 0.65rem 0.78rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.summary-modal__new-row input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.summary-modal__new-row select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.summary-modal__new-desc {
  min-width: 0;
}

.summary-modal__new-btn {
  min-width: 7.75rem;
  height: 2.7rem;
  padding: 0.72rem 1.15rem;
  border-radius: 0.8rem;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.summary-modal__new-btn:hover {
  transform: translateY(-1px);
}

.summary-modal__new-hint {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.summary-modal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: #fff;
  table-layout: fixed;
}

.summary-modal__table th,
.summary-modal__table td {
  padding: 0.72rem 0.75rem;
  border-bottom: 1px solid #eef2f7;
}

.summary-modal__table th {
  text-align: left;
  font-weight: 700;
  font-size: 0.6875rem;
  color: #64748b;
  background: #f8fbff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: sticky;
  top: 0;
}

.summary-modal__table tbody tr:hover td {
  background: #f8fbff;
}

.summary-modal__table td:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}

.summary-modal__table td:last-child,
.summary-modal__table th:last-child {
  width: 88px;
}

.summary-modal__table--planned td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}

.summary-modal__table--planned td:nth-child(5) {
  text-align: left;
  font-variant-numeric: normal;
  white-space: normal;
  font-weight: 400;
}

.summary-modal__table--planned td:last-child,
.summary-modal__table--planned th:last-child {
  width: 104px;
}

.summary-modal__summary {
  margin-top: 0.75rem;
  text-align: right;
  font-size: 0.875rem;
  color: #334155;
}

.summary-modal__planned-col-date {
  width: 8.25rem;
}

.summary-modal__planned-col-type {
  width: 5.75rem;
}

.summary-modal__planned-col-category {
  width: 9.5rem;
}

.summary-modal__planned-col-amount {
  width: 6.75rem;
}

.summary-modal__planned-col-description {
  width: auto;
}

.summary-modal__planned-col-actions {
  width: 10.5rem;
}

.summary-modal__empty {
  font-size: 0.9375rem;
  color: #64748b;
  text-align: center;
  padding: 1.75rem 1rem;
}

.summary-modal__actions {
  display: flex;
  gap: 0.3rem;
  justify-content: flex-end;
}

.summary-modal__actions--planned {
  width: 100%;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.summary-modal__actions--planned .summary-modal__btn-save:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.summary-modal__planned-tofact {
  min-width: 4.8rem;
  padding: 0.42rem 0.6rem;
  border-radius: 0.6rem;
  white-space: nowrap;
}

.summary-modal__cell-description {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
}

.summary-modal__cell-wrap {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.summary-modal__btn-edit,
.summary-modal__btn-delete,
.summary-modal__btn-save,
.summary-modal__btn-cancel {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  transition: all 0.15s;
  padding: 0;
}

.summary-modal__btn-edit {
  background: #eff6ff;
  color: #3b82f6;
  border-color: #bfdbfe;
}

.summary-modal__btn-edit:hover {
  background: #dbeafe;
}

.summary-modal__btn-delete {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

.summary-modal__btn-delete:hover {
  background: #fee2e2;
}

.summary-modal__btn-save {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.summary-modal__btn-save:hover {
  background: #d1fae5;
}

.summary-modal__btn-cancel {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

.summary-modal__btn-cancel:hover {
  background: #e5e7eb;
  color: #374151;
}

.summary-modal__inline-input {
  padding: 0.45rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
  font-size: 0.8125rem;
  color: #111827;
  background: #fff;
  width: 100%;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.summary-modal__inline-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.summary-modal__inline-input--amount {
  width: 5.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.summary-modal__row--editing td {
  background: #f0f7ff !important;
}

.summary-modal__badge {
  display: inline-block;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.summary-modal__badge[data-type="income"] {
  background: #ecfdf3;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.summary-modal__badge[data-type="expense"] {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.feedback-modal__dialog {
  max-width: 760px;
}

.feedback-modal__body {
  gap: 1rem;
}

.feedback-modal__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.95fr);
  gap: 0.9rem;
  align-items: stretch;
}

.feedback-modal__field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.feedback-modal__field > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.feedback-modal__field em {
  font-style: normal;
  color: #94a3b8;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.feedback-modal__field select,
.feedback-modal__field textarea {
  width: 100%;
  border: 1px solid #dbe5f0;
  border-radius: 0.85rem;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feedback-modal__field select {
  min-height: 2.75rem;
  padding: 0 0.82rem;
}

.feedback-modal__field textarea {
  min-height: 8.5rem;
  resize: vertical;
  padding: 0.8rem 0.9rem;
  line-height: 1.5;
}

.feedback-modal__field select:focus,
.feedback-modal__field textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.feedback-modal__dropzone {
  min-height: 7.1rem;
  border: 1px dashed #bfdbfe;
  border-radius: 0.95rem;
  background: #f8fbff;
  color: #1d4ed8;
  cursor: pointer;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.feedback-modal__dropzone:hover,
.feedback-modal__dropzone.is-dragging {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.feedback-modal__dropzone.has-file {
  border-style: solid;
  color: #0f172a;
}

.feedback-modal__file-input {
  display: none;
}

.feedback-modal__upload-icon,
.feedback-modal__preview {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1d4ed8;
  overflow: hidden;
}

.feedback-modal__preview {
  object-fit: cover;
  background: #e2e8f0;
}

.feedback-modal__drop-text {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.feedback-modal__drop-text strong {
  min-width: 0;
  font-size: 0.88rem;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-modal__drop-text span {
  font-size: 0.78rem;
  color: #64748b;
}

.feedback-modal__alert {
  border-radius: 0.85rem;
  padding: 0.72rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.feedback-modal__alert--error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.feedback-modal__alert--success {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.feedback-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 0.15rem;
}

.mpb-onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 1320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.mpb-onboarding-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at 20% 10%, rgba(14, 165, 233, 0.25), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(124, 58, 237, 0.2), transparent 28%),
    rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  animation: s-fade-in 0.16s ease-out;
}

.mpb-onboarding-modal__dialog {
  position: relative;
  width: min(47.9rem, 100%);
  max-height: calc(100vh - 2.4rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 1.2rem;
  border: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(186, 230, 253, 0.58), transparent 31%),
    radial-gradient(circle at 88% 3%, rgba(221, 214, 254, 0.68), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 38px 90px rgba(15, 23, 42, 0.34), 0 10px 26px rgba(37, 99, 235, 0.12);
  animation: s-slide-up 0.22s ease-out;
}

.mpb-onboarding-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.mpb-onboarding-confetti span {
  position: absolute;
  width: 0.44rem;
  height: 1rem;
  border-radius: 999px;
  opacity: 0.82;
  transform: rotate(22deg);
}

.mpb-onboarding-confetti span:nth-child(1) { top: 1.1rem; left: 8%; background: #06b6d4; }
.mpb-onboarding-confetti span:nth-child(2) { top: 2.2rem; left: 18%; background: #facc15; transform: rotate(-18deg); }
.mpb-onboarding-confetti span:nth-child(3) { top: 1.25rem; right: 14%; background: #7c3aed; }
.mpb-onboarding-confetti span:nth-child(4) { top: 4.6rem; right: 7%; background: #10b981; transform: rotate(-32deg); }
.mpb-onboarding-confetti span:nth-child(5) { bottom: 5rem; left: 5%; background: #fb7185; transform: rotate(38deg); }
.mpb-onboarding-confetti span:nth-child(6) { bottom: 3.2rem; right: 10%; background: #38bdf8; transform: rotate(-12deg); }

.mpb-onboarding-modal__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.45rem 1rem;
}

.mpb-onboarding-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.45rem;
  padding: 0 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  background: rgba(224, 242, 254, 0.88);
  color: #0369a1;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mpb-onboarding-modal__title {
  margin: 0.65rem 0 0;
  max-width: 34rem;
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1.16;
  font-weight: 900;
}

.mpb-onboarding-modal__subtitle {
  margin: 0.45rem 0 0;
  max-width: 35rem;
  color: #475569;
  font-size: 0.94rem;
  line-height: 1.52;
}

.mpb-onboarding-modal__close {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.82);
  color: #64748b;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mpb-onboarding-modal__close:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.mpb-onboarding-progress {
  position: relative;
  z-index: 1;
  margin: 0 1.45rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(219, 234, 254, 0.9);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.mpb-onboarding-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mpb-onboarding-progress__meta strong {
  color: #1d4ed8;
}

.mpb-onboarding-progress__track {
  position: relative;
  height: 0.55rem;
  margin-top: 0.62rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mpb-onboarding-progress__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #06b6d4 0%, #2563eb 52%, #7c3aed 100%);
  transition: width 0.24s ease;
}

.mpb-onboarding-progress__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.mpb-onboarding-progress__steps span {
  min-width: 0;
  padding: 0.36rem 0.5rem;
  border-radius: 0.6rem;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mpb-onboarding-progress__steps span.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.mpb-onboarding-progress__steps span.is-complete {
  background: #ecfdf5;
  color: #047857;
}

.mpb-onboarding-modal__body {
  position: relative;
  z-index: 1;
  overflow: auto;
  padding: 1rem 1.45rem 1.1rem;
}

.mpb-onboarding-modal__body--welcome {
  padding: 0;
}

.mpb-onboarding-welcome,
.mpb-onboarding-step,
.mpb-onboarding-done {
  border: 0;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.mpb-onboarding-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
  min-height: 13.5rem;
  overflow: hidden;
  background: #ffffff;
  position: relative;
  border-radius: 0;
  box-shadow: none;
}

.mpb-onboarding-welcome__media {
  border-radius: 0;
  overflow: hidden;
  background: #e8eefc;
}

.mpb-onboarding-welcome__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #e8eefc;
}

.mpb-onboarding-welcome__content {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem 0.92rem 1rem;
  border-radius: 0;
  background: #f2f7fd;
  height: 100%;
}

.mpb-onboarding-done__badge {
  width: 4.1rem;
  height: 4.1rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 48%, #7c3aed 100%);
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.26);
}

.mpb-onboarding-welcome__kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.5rem;
  padding: 0 0.6rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #2563eb;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mpb-onboarding-welcome__points {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.2rem;
  display: grid;
  gap: 0.36rem;
  margin-bottom: 0.45rem;
}

.mpb-onboarding-welcome__points li {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  color: #334155;
  font-size: 0.93rem;
  line-height: 1.35;
  font-weight: 500;
}

.mpb-onboarding-welcome__points li span {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  flex: 0 0 auto;
  margin-top: 0;
}

.mpb-onboarding-welcome__points li span svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mpb-onboarding-welcome__field {
  min-width: 0;
  min-height: 3rem;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: center;
  border: 1px solid #dbe7f5;
  border-radius: 0.78rem;
  background: #ffffff;
  overflow: hidden;
}

.mpb-onboarding-welcome__field-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.mpb-onboarding-welcome__field-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.mpb-onboarding-welcome__field input,
.mpb-onboarding-welcome__field select {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 1rem;
  padding: 0 0.9rem 0 0.2rem;
  outline: none;
}

.mpb-onboarding-welcome__field select {
  appearance: none;
  cursor: pointer;
  background:
    linear-gradient(45deg, transparent 50%, #94a3b8 50%) calc(100% - 1.05rem) 52% / 0.34rem 0.34rem no-repeat,
    linear-gradient(135deg, #94a3b8 50%, transparent 50%) calc(100% - 0.8rem) 52% / 0.34rem 0.34rem no-repeat;
}

.mpb-onboarding-welcome__time-trigger {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 1rem;
  text-align: left;
  padding: 0 0.9rem 0 0.2rem;
  cursor: pointer;
}

.mpb-onboarding-welcome__timezone-note {
  margin: -0.42rem 0 0.14rem;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}

.mpb-onboarding-welcome__slot-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: stretch;
}

.mpb-onboarding-welcome__slot-btn {
  min-height: 2.35rem;
  border: 1px solid #dbe7f5;
  border-radius: 0.72rem;
  background: #ffffff;
  color: #1e293b;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 0.5rem;
  text-align: center;
  cursor: pointer;
}

.mpb-onboarding-welcome__slot-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.mpb-onboarding-welcome__slot-btn.is-active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1d4ed8;
}

.mpb-onboarding-welcome__slot-btn--custom {
  border-style: dashed;
  display: grid;
  align-content: center;
  justify-items: center;
  line-height: 1.05;
}

@media (max-width: 900px) {
  .mpb-onboarding-welcome__slot-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mpb-onboarding-welcome__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: auto;
}

.mpb-onboarding-welcome__actions .mpb-onboarding-btn {
  min-height: 3rem;
}

.mpb-onboarding-welcome h3,
.mpb-onboarding-step h3,
.mpb-onboarding-done h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 900;
}

.mpb-onboarding-modal__close--welcome {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
}

.mpb-onboarding-welcome h3 {
  font-size: 2.05rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
}

.mpb-onboarding-welcome__brand {
  color: #2563eb;
}

.mpb-onboarding-btn--welcome-primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.mpb-onboarding-btn--welcome-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border-color: #1e40af;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.mpb-onboarding-time-modal {
  position: fixed;
  inset: 0;
  z-index: 1325;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.mpb-onboarding-time-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.mpb-onboarding-time-modal__dialog {
  position: relative;
  width: min(22rem, 100%);
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border-radius: 0.9rem;
  border: 1px solid #dbe7f5;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
}

.mpb-onboarding-time-modal__dialog h4 {
  margin: 0 0 0.1rem;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 900;
}

.mpb-onboarding-time-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.mpb-onboarding-welcome-done {
  border: 0;
  border-radius: 0.35rem;
  background: #f2f7fd;
  padding: 2rem 1.5rem;
  text-align: center;
}

.mpb-onboarding-welcome-done h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: 900;
}

.mpb-onboarding-welcome-done p {
  margin: 0.6rem 0 0;
  color: #334155;
  font-size: 1rem;
  line-height: 1.45;
}

.mpb-onboarding-welcome p,
.mpb-onboarding-step p,
.mpb-onboarding-done p {
  margin: 0.4rem 0 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.52;
}

.mpb-onboarding-step {
  padding: 1rem;
  display: grid;
  gap: 0.95rem;
}

.mpb-onboarding-step__copy > span {
  display: inline-flex;
  margin-bottom: 0.35rem;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mpb-onboarding-step__progress {
  height: 0.42rem;
  margin-top: 0.85rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mpb-onboarding-step__progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #06b6d4 0%, #2563eb 52%, #7c3aed 100%);
  transition: width 0.24s ease;
}

.mpb-onboarding-help-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 2rem;
  margin-top: 0.72rem;
  padding: 0;
  border: 0;
  border-bottom: 1px dashed #2563eb;
  background: transparent;
  color: #1d4ed8;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
}

.mpb-onboarding-help-link:hover {
  color: #0f172a;
  border-bottom-color: #0f172a;
}

.mpb-onboarding-field {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.mpb-onboarding-field > span {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mpb-onboarding-field input,
.mpb-onboarding-field select {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.78rem;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.9rem;
  padding: 0 0.85rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mpb-onboarding-field select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #64748b 50%) calc(100% - 1.05rem) 52% / 0.34rem 0.34rem no-repeat,
    linear-gradient(135deg, #64748b 50%, transparent 50%) calc(100% - 0.78rem) 52% / 0.34rem 0.34rem no-repeat,
    #ffffff;
  padding-right: 2.1rem;
}

.mpb-onboarding-field input:focus,
.mpb-onboarding-field select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.mpb-onboarding-tax-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 0.85rem;
}

.mpb-onboarding-api-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.mpb-onboarding-api-card {
  min-width: 0;
  display: grid;
  gap: 0.72rem;
  padding: 0.9rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.95rem;
  background: #fbfdff;
}

.mpb-onboarding-api-card.is-complete {
  align-content: start;
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.mpb-onboarding-api-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.mpb-onboarding-api-card__head strong {
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.3;
}

.mpb-onboarding-api-card__head span {
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mpb-onboarding-done {
  text-align: center;
  padding: 1.35rem 1rem 1.45rem;
}

.mpb-onboarding-done__badge {
  margin: 0 auto 0.85rem;
}

.mpb-onboarding-alert {
  margin-top: 0.8rem;
  border: 1px solid #fecaca;
  border-radius: 0.82rem;
  background: #fef2f2;
  color: #b91c1c;
  padding: 0.75rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 750;
}

.mpb-onboarding-alert--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.mpb-onboarding-modal__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0 1.45rem 1.35rem;
}

.mpb-onboarding-btn {
  min-height: 2.55rem;
  min-width: 8.6rem;
  border-radius: 0.78rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.mpb-onboarding-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.mpb-onboarding-btn--ghost {
  background: rgba(255, 255, 255, 0.75);
  color: #475569;
  border-color: #cbd5e1;
}

.mpb-onboarding-btn--ghost:hover:not(:disabled) {
  background: #f8fafc;
}

.mpb-onboarding-btn--primary {
  color: #ffffff;
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 52%, #6d28d9 100%);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.22);
}

.mpb-onboarding-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.28);
}

.mpb-onboarding-api-help {
  position: fixed;
  inset: 0;
  z-index: 1335;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.mpb-onboarding-api-help__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
}

.mpb-onboarding-api-help__dialog {
  position: relative;
  width: min(42rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid #dbe5f0;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 34px 78px rgba(15, 23, 42, 0.32);
  animation: s-slide-up 0.18s ease-out;
}

.mpb-onboarding-api-help__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.2rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.mpb-onboarding-api-help__eyebrow {
  display: inline-flex;
  margin-bottom: 0.42rem;
  color: #2563eb;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mpb-onboarding-api-help__header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.22rem;
  line-height: 1.22;
  font-weight: 900;
}

.mpb-onboarding-api-help__header p {
  margin: 0.38rem 0 0;
  max-width: 30rem;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.mpb-onboarding-api-help__close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.62rem;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 900;
}

.mpb-onboarding-api-help__close:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.mpb-onboarding-api-help__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1rem 1.2rem;
}

.mpb-onboarding-api-help__body--single {
  grid-template-columns: 1fr;
}

.mpb-onboarding-api-help__card {
  min-width: 0;
  display: grid;
  gap: 0.78rem;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
  background: #f8fbff;
  padding: 0.9rem;
}

.mpb-onboarding-api-help__card-head {
  display: grid;
  gap: 0.28rem;
}

.mpb-onboarding-api-help__card-head strong {
  color: #0f172a;
  font-size: 0.96rem;
  line-height: 1.25;
}

.mpb-onboarding-api-help__card-head span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
}

.mpb-onboarding-api-help__steps {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mpb-onboarding-api-help__steps li {
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.mpb-onboarding-api-help__steps b {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.48rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 900;
}

.mpb-onboarding-api-help__steps span {
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.42;
}

.mpb-onboarding-api-help__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.15rem;
}

.mpb-onboarding-api-help__links a {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.72rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.65rem;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.mpb-onboarding-api-help__links a:hover {
  background: #eff6ff;
}

.mpb-onboarding-api-help__note {
  margin: 0 1.2rem 1.15rem;
  border: 1px solid #fde68a;
  border-radius: 0.82rem;
  background: #fffbeb;
  color: #92400e;
  padding: 0.72rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 750;
}

.mpb-prep-modal {
  position: fixed;
  inset: 0;
  z-index: 1310;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.mpb-prep-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(10px);
  animation: s-fade-in 0.16s ease-out;
}

.mpb-prep-modal__dialog {
  position: relative;
  width: min(48rem, 100%);
  max-height: calc(100vh - 2.4rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid rgba(203, 213, 225, 0.84);
  background: #ffffff;
  box-shadow: 0 34px 86px rgba(15, 23, 42, 0.32);
  animation: s-slide-up 0.22s ease-out;
}

.mpb-prep-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.35rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.84) 0%, rgba(255, 255, 255, 0.95) 46%, rgba(239, 246, 255, 0.9) 100%),
    #ffffff;
}

.mpb-prep-modal__heading {
  min-width: 0;
}

.mpb-prep-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.45rem;
  padding: 0 0.62rem;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mpb-prep-modal__header h2 {
  margin: 0.65rem 0 0;
  color: #0f172a;
  font-size: 1.5rem;
  line-height: 1.16;
  font-weight: 900;
}

.mpb-prep-modal__header p {
  margin: 0.45rem 0 0;
  max-width: 36rem;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.5;
}

.mpb-prep-modal__close {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.86);
  color: #64748b;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mpb-prep-modal__close:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

.mpb-prep-summary {
  margin: 1rem 1.35rem 0;
  padding: 0.95rem;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
  background: #f8fbff;
}

.mpb-prep-modal__body {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.mpb-prep-section {
  margin-top: 0.35rem;
}

.mpb-prep-section + .mpb-prep-section {
  margin-top: 0.15rem;
}

.mpb-prep-section__title {
  margin: 0.85rem 1.35rem 0.45rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mpb-prep-block {
  margin: 0 1.35rem;
}

.mpb-prep-block.is-expanded .mpb-prep-summary--toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: rgba(219, 234, 254, 0.72);
}

.mpb-prep-summary--toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.95rem;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
  background: #f8fbff;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.mpb-prep-summary--toggle:hover {
  background: #f1f7ff;
  border-color: #bfdbfe;
}

.mpb-prep-summary--toggle:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.mpb-prep-summary__headline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.mpb-prep-summary__chevron {
  width: 1rem;
  height: 1rem;
  color: #64748b;
  transform: rotate(-90deg);
  transition: transform 0.18s ease, color 0.15s ease;
}

.mpb-prep-summary__chevron.is-expanded {
  transform: rotate(90deg);
  color: #2563eb;
}

.mpb-prep-list--nested {
  margin: 0;
  padding: 0.72rem;
  border: 1px solid #dbeafe;
  border-top: 0;
  border-radius: 0 0 0.9rem 0.9rem;
  background: #fcfdff;
}

.mpb-prep-item__link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mpb-prep-item__link:hover {
  color: #2563eb;
}

.mpb-prep-summary__main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.mpb-prep-summary__main strong {
  color: #0f172a;
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 900;
}

.mpb-prep-summary__main span,
.mpb-prep-summary__meta {
  color: #475569;
  font-size: 0.82rem;
  font-weight: 800;
}

.mpb-prep-summary__bar {
  position: relative;
  height: 0.58rem;
  margin-top: 0.74rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mpb-prep-summary__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e 0%, #0ea5e9 54%, #6366f1 100%);
  transition: width 0.24s ease;
}

.mpb-prep-summary__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.72rem;
}

.mpb-prep-alert {
  margin: 0.9rem 1.35rem 0;
  border: 1px solid #fecaca;
  border-radius: 0.82rem;
  background: #fef2f2;
  color: #b91c1c;
  padding: 0.75rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 750;
}

.mpb-prep-list {
  overflow: auto;
  display: grid;
  gap: 0.72rem;
  padding: 1rem 1.35rem;
}

.mpb-prep-item {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr);
  gap: 0.75rem;
  min-width: 0;
  padding: 0.86rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #ffffff;
}

.mpb-prep-item__marker {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 900;
}

.mpb-prep-item--done .mpb-prep-item__marker {
  background: #dcfce7;
  color: #047857;
}

.mpb-prep-item--in_progress .mpb-prep-item__marker {
  background: #eff6ff;
  color: #2563eb;
}

.mpb-prep-item__content {
  min-width: 0;
}

.mpb-prep-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.mpb-prep-item__top h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.94rem;
  line-height: 1.25;
  font-weight: 900;
}

.mpb-prep-item__top span {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 1.42rem;
  padding: 0 0.52rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mpb-prep-item__bar {
  position: relative;
  height: 0.42rem;
  margin-top: 0.56rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mpb-prep-item__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e 0%, #0ea5e9 100%);
  transition: width 0.24s ease;
}

.mpb-prep-item--done .mpb-prep-item__top span {
  background: #dcfce7;
  color: #047857;
}

.mpb-prep-item--in_progress .mpb-prep-item__top span {
  background: #dbeafe;
  color: #1d4ed8;
}

.mpb-prep-item__content p {
  margin: 0.34rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.48;
}

.mpb-prep-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.62rem;
}

.mpb-prep-item__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.73rem;
  font-weight: 800;
}

.mpb-prep-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.58rem;
}

.mpb-prep-source {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 1.45rem;
  max-width: 100%;
  padding: 0 0.48rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 0.69rem;
  font-weight: 850;
  line-height: 1;
}

.mpb-prep-source strong {
  color: inherit;
  font-size: 0.68rem;
  font-weight: 900;
}

.mpb-prep-source--done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.mpb-prep-source--in_progress {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.mpb-prep-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0 1.35rem 1.2rem;
  border-top: 1px solid #e2e8f0;
}

.mpb-prep-btn {
  min-height: 2.5rem;
  min-width: 8rem;
  border-radius: 0.74rem;
  padding: 0 0.95rem;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 850;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.mpb-prep-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.mpb-prep-btn--ghost {
  background: #ffffff;
  color: #475569;
  border-color: #cbd5e1;
}

.mpb-prep-btn--primary {
  color: #ffffff;
  background: linear-gradient(135deg, #059669 0%, #2563eb 100%);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
}

.mpb-prep-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.26);
}

@media (max-width: 720px) {
  .feedback-modal__top {
    grid-template-columns: 1fr;
  }

  .feedback-modal__actions {
    flex-direction: column-reverse;
  }

  .feedback-modal__actions .costs-edit-modal__btn {
    width: 100%;
  }

  .mpb-onboarding-modal {
    align-items: flex-end;
    padding: 0.7rem;
  }

  .mpb-onboarding-modal__dialog {
    max-height: calc(100dvh - 1.4rem);
    border-radius: 1rem;
  }

  .mpb-onboarding-modal__header {
    padding: 1.1rem 1rem 0.85rem;
  }

  .mpb-onboarding-modal__title {
    font-size: 1.25rem;
  }

  .mpb-onboarding-progress {
    margin: 0 1rem;
  }

  .mpb-onboarding-progress__steps {
    grid-template-columns: 1fr;
  }

  .mpb-onboarding-modal__body {
    padding: 0.85rem 1rem 1rem;
  }

  .mpb-onboarding-welcome {
    grid-template-columns: 1fr;
  }

  .mpb-onboarding-welcome__media {
    min-height: 13.5rem;
  }

  .mpb-onboarding-welcome h3 {
    font-size: 2.1rem;
  }

  .mpb-onboarding-welcome__actions {
    grid-template-columns: 1fr;
  }

  .mpb-onboarding-api-grid {
    grid-template-columns: 1fr;
  }

  .mpb-onboarding-tax-grid {
    grid-template-columns: 1fr;
  }

  .mpb-onboarding-modal__footer {
    padding: 0 1rem 1rem;
    flex-direction: column-reverse;
  }

  .mpb-onboarding-btn {
    width: 100%;
  }

  .mpb-onboarding-api-help {
    align-items: flex-end;
    padding: 0.7rem;
  }

  .mpb-onboarding-api-help__dialog {
    max-height: calc(100dvh - 1.4rem);
    border-radius: 1rem;
  }

  .mpb-onboarding-api-help__header {
    padding: 1rem 1rem 0.8rem;
  }

  .mpb-onboarding-api-help__body {
    grid-template-columns: 1fr;
    padding: 0.9rem 1rem;
  }

  .mpb-onboarding-api-help__note {
    margin: 0 1rem 1rem;
  }

  .mpb-prep-modal {
    align-items: flex-end;
    padding: 0.7rem;
  }

  .mpb-prep-modal__dialog {
    max-height: calc(100dvh - 1.4rem);
    border-radius: 1rem;
  }

  .mpb-prep-modal__header {
    padding: 1.1rem 1rem 0.9rem;
  }

  .mpb-prep-modal__header h2 {
    font-size: 1.25rem;
  }

  .mpb-prep-summary {
    margin: 0.85rem 1rem 0;
  }

  .mpb-prep-section__title {
    margin: 0.75rem 1rem 0.4rem;
  }

  .mpb-prep-block {
    margin: 0 1rem;
  }

  .mpb-prep-summary--toggle {
    padding: 0.85rem;
  }

  .mpb-prep-list--nested {
    padding: 0.65rem;
  }

  .mpb-prep-summary__main,
  .mpb-prep-summary__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.38rem;
  }

  .mpb-prep-list {
    padding: 0.85rem 1rem;
  }

  .mpb-prep-item {
    grid-template-columns: 1.9rem minmax(0, 1fr);
    gap: 0.62rem;
    padding: 0.78rem;
  }

  .mpb-prep-item__marker {
    width: 1.9rem;
    height: 1.9rem;
  }

  .mpb-prep-item__top {
    flex-direction: column;
    gap: 0.45rem;
  }

  .mpb-prep-modal__footer {
    padding: 0 1rem 1rem;
    flex-direction: column-reverse;
  }

  .mpb-prep-btn {
    width: 100%;
  }
}

/* Edit modal on costs page */
.costs-edit-modal .summary-modal__backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
}

.costs-edit-modal__dialog {
  max-width: 1160px;
  width: min(1160px, calc(100vw - 3rem));
}

.costs-edit-modal .summary-modal__header {
  padding: 1rem 1.25rem;
  background:
    linear-gradient(120deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.06) 100%),
    #f8fafc;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.costs-edit-modal .summary-modal__title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.costs-edit-modal__card {
  padding: 1rem;
  border: 1px solid #dbeafe;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0) 55%),
    #ffffff;
}

.costs-edit-modal__row {
  grid-template-columns:
    8.25rem
    10ch
    9ch
    minmax(16.15rem, 1.28fr)
    minmax(19rem, 1.95fr)
    8.75rem;
  column-gap: 0.45rem;
  row-gap: 0.45rem;
}

.costs-edit-modal__field {
  min-width: 0;
}

.costs-edit-modal__field--date { grid-column: 1; }
.costs-edit-modal__field--type { grid-column: 2; }
.costs-edit-modal__field--plan { grid-column: 3; }
.costs-edit-modal__field--category { grid-column: 4; }
.costs-edit-modal__field--description { grid-column: 5; }
.costs-edit-modal__field--amount { grid-column: 6; }

.costs-edit-modal__field--type select {
  width: 10ch;
  min-width: 10ch;
}

.costs-setup-modal__dialog {
  width: min(560px, calc(100vw - 2rem));
  max-height: min(680px, calc(100vh - 2rem));
}

.costs-setup-modal__body {
  padding: 1.15rem;
  overflow: auto;
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0) 56%),
    #ffffff;
}

.costs-setup-modal__content,
.costs-setup-modal__form,
.costs-setup-modal__empty,
.costs-setup-modal__ready {
  display: grid;
  gap: 0.95rem;
}

.costs-setup-modal__company {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(20, 184, 166, 0.06)),
    #f8fafc;
}

.costs-setup-modal__company span,
.costs-setup-modal__field > span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.costs-setup-modal__company strong {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 850;
}

.costs-setup-modal__field {
  display: grid;
  gap: 0.42rem;
}

.costs-setup-modal__field input,
.costs-setup-modal__field select {
  width: 100%;
  min-height: 3rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid #d8e2ef;
  border-radius: 0.82rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 650;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.costs-setup-modal__field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 1.05rem) 52%,
    calc(100% - 0.72rem) 52%;
  background-size: 0.38rem 0.38rem, 0.38rem 0.38rem;
  background-repeat: no-repeat;
  padding-right: 2.3rem;
}

.costs-setup-modal__field input:focus,
.costs-setup-modal__field select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.costs-setup-modal__note,
.costs-setup-modal__empty p,
.costs-setup-modal__ready p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.costs-setup-modal__empty strong,
.costs-setup-modal__ready strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 850;
}

.costs-setup-modal__ready {
  padding: 1rem;
  border: 1px solid #bbf7d0;
  border-radius: 0.9rem;
  background: #f0fdf4;
}

.costs-setup-modal__error {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  background: #fff5f5;
  color: #b91c1c;
  font-size: 0.84rem;
  font-weight: 700;
}

.costs-setup-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.costs-category-manager-modal__dialog {
  width: min(520px, calc(100vw - 2rem));
  max-height: min(620px, calc(100vh - 2rem));
}

.costs-category-manager-modal__body {
  padding: 1.15rem;
  overflow: auto;
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 56%),
    #ffffff;
}

.costs-category-manager-modal__form {
  display: grid;
  gap: 0.95rem;
}

.costs-category-manager-modal__field {
  display: grid;
  gap: 0.42rem;
}

.costs-category-manager-modal__field > span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.costs-category-manager-modal__field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid #d8e2ef;
  border-radius: 0.82rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.costs-category-manager-modal__field input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.costs-category-manager-modal__segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.9rem;
  background: #f8fafc;
}

.costs-category-manager-modal__segmented button {
  min-height: 2.55rem;
  border: none;
  border-radius: 0.68rem;
  background: transparent;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.costs-category-manager-modal__segmented button.is-active {
  background: #172554;
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

.costs-category-manager-modal__error {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  background: #fff5f5;
  color: #b91c1c;
  font-size: 0.84rem;
  font-weight: 700;
}

.costs-category-manager-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.costs-category-editor-modal__dialog {
  width: min(1180px, calc(100vw - 2rem));
  max-height: min(880px, calc(100vh - 2rem));
}

.costs-category-editor-modal__body {
  padding: 0;
  height: min(720px, calc(100vh - 8.5rem));
  overflow: hidden;
  background: #f8fafc;
}

.costs-category-editor-modal__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f8fafc;
}

.mpb-embedded-page {
  min-height: 100vh;
  background: #f8fafc;
}

.costs-edit-transaction-modal .costs-edit-modal__field--amount input {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.costs-edit-modal__error {
  margin: 0.75rem 0 0;
  color: #b91c1c;
  font-size: 0.8125rem;
  font-weight: 600;
}

.costs-edit-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.costs-edit-modal__btn {
  min-width: 124px;
  height: 2.45rem;
  padding: 0 1rem;
  border-radius: 0.8rem;
  font-size: 0.875rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
}

.costs-edit-modal__btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.costs-edit-modal__btn--secondary {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

.costs-edit-modal__btn--secondary:hover:not(:disabled) {
  background: #f1f5f9;
}

.costs-edit-modal__btn--primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.costs-edit-modal__btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.costs-recurring-modal__dialog {
  max-width: 780px;
}

.costs-recurring-settings-modal {
  z-index: 72;
}

.costs-recurring-modal__dialog .summary-modal__header {
  background:
    linear-gradient(120deg, rgba(29, 78, 216, 0.1), rgba(14, 165, 233, 0.07)),
    #f8fbff;
}

.costs-recurring-modal__dialog .costs-edit-modal__card {
  border-color: #cfe2ff;
  border-radius: 1rem;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.07);
}

.costs-recurring-modal__intro {
  margin-bottom: 0.7rem;
  font-size: 0.8rem;
  color: #475569;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 0.7rem;
  padding: 0.55rem 0.7rem;
}

.costs-recurring-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.82rem;
}

.costs-recurring-modal__field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.52rem;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 0.62rem 0.7rem 0.72rem;
}

.costs-recurring-modal__field > span {
  margin-bottom: 0;
}

.costs-recurring-modal__field input,
.costs-recurring-modal__field select {
  min-height: 2.2rem;
  border-radius: 0.62rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow: none;
}

.costs-recurring-modal__field input:focus,
.costs-recurring-modal__field select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.costs-recurring-modal__label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.costs-recurring-modal__help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.65rem;
  font-weight: 800;
  cursor: help;
  outline: none;
}

.costs-recurring-modal__tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  width: 230px;
  padding: 0.5rem 0.56rem;
  border-radius: 0.58rem;
  border: 1px solid #dbeafe;
  background: #ffffff;
  color: #334155;
  font-size: 0.72rem;
  line-height: 1.4;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.14s ease;
  z-index: 20;
}

.costs-recurring-modal__help:hover .costs-recurring-modal__tooltip,
.costs-recurring-modal__help:focus .costs-recurring-modal__tooltip {
  opacity: 1;
  visibility: visible;
}

.costs-recurring-modal__create-initial {
  grid-column: 1 / -1;
  margin-top: 0.2rem;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  background: #f8fbff;
  padding: 0.56rem 0.64rem;
}

.costs-recurring-manager__dialog {
  max-width: 840px;
}

.costs-recurring-manager__list {
  display: grid;
  gap: 0.65rem;
}

.costs-recurring-manager__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  border: 1px solid #dbeafe;
  background: #ffffff;
  border-radius: 0.85rem;
  padding: 0.68rem 0.78rem;
}

.costs-recurring-manager__main {
  min-width: 0;
}

.costs-recurring-manager__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.12rem;
}

.costs-recurring-manager__meta {
  font-size: 0.76rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.costs-recurring-manager__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.costs-recurring-manager__empty {
  border: 1px dashed #cbd5e1;
  border-radius: 0.8rem;
  padding: 1rem;
  font-size: 0.82rem;
  color: #64748b;
}

.costs-link-purchase-modal__dialog {
  max-width: 1100px;
}

.costs-link-purchase-modal__body {
  display: grid;
  gap: 0.9rem;
}

.costs-link-purchase-modal__tx {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid #dbeafe;
  border-radius: 0.8rem;
  background: #f8fbff;
}

.costs-link-purchase-modal__tx-row {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.costs-link-purchase-modal__tx-row span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 700;
}

.costs-link-purchase-modal__tx-row strong {
  font-size: 0.82rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.costs-link-purchase-modal__table-wrap {
  border: 1px solid #dbeafe;
  border-radius: 0.8rem;
  overflow: auto;
  background: #fff;
}

.costs-link-purchase-modal__table {
  min-width: 780px;
}

.costs-link-purchase-modal__actions-cell {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.costs-link-purchase-modal__allocator {
  border: 1px solid #dbeafe;
  border-radius: 0.8rem;
  background: #f8fbff;
  padding: 0.75rem 0.85rem;
  display: grid;
  gap: 0.6rem;
}

.costs-link-purchase-modal__allocator-head strong {
  font-size: 0.88rem;
  color: #0f172a;
}

.costs-link-purchase-modal__allocator-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #334155;
}

.costs-link-purchase-modal__allocator-stats .is-warning {
  color: #b45309;
}

.costs-link-purchase-modal__allocator-stats .is-ok {
  color: #047857;
}

.costs-link-purchase-modal__allocator-table {
  display: grid;
  gap: 0.48rem;
}

.costs-link-purchase-modal__allocator-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9rem auto;
  gap: 0.5rem;
  align-items: center;
}

.costs-link-purchase-modal__allocator-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (max-width: 1100px) {
  .costs-link-purchase-modal__tx {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .costs-link-purchase-modal__allocator-row {
    grid-template-columns: minmax(0, 1fr) 8rem auto;
  }

  .summary-page__hero-grid,
  .summary-page__metrics {
    grid-template-columns: 1fr;
  }

  .summary-page__toolbar {
    position: static;
    margin: 0 1rem;
  }

  .summary-page__toolbar-actions {
    width: 100%;
  }

  .summary-page__link {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .mpb-space.summary-page {
    --s-pin-width: 5.75rem;
    --s-pin-mask-width: var(--s-pin-width);
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .summary-page__table-wrap::before {
    width: var(--s-pin-mask-width);
  }

  .summary-page__fixed-head--portal .summary-page__fixed-head-viewport {
    --s-fs-sm: 0.7rem;
  }

  .costs-link-purchase-modal__tx {
    grid-template-columns: 1fr;
  }

  .costs-link-purchase-modal__allocator-row {
    grid-template-columns: 1fr;
  }

  .costs-link-purchase-modal__allocator-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-page__hero,
  .summary-page__metrics,
  .summary-page__body,
  .summary-page__planned {
    margin-left: 0;
    margin-right: 0;
  }

  .summary-page__hero {
    padding: 1.5rem 1rem 1.35rem;
  }

  .summary-page__toolbar,
  .summary-page__metrics,
  .summary-page__body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .summary-page__metrics {
    padding-top: 1rem;
  }

  .summary-page__section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-page__section-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    margin-left: 0;
  }

  .summary-page__section-note {
    text-align: left;
  }

  .summary-page__hero-panel-grid {
    grid-template-columns: 1fr;
  }

  .summary-page__period,
  .summary-page__group,
  .summary-page__period--wide {
    width: 100%;
    min-width: 0;
  }

  .summary-page__period-inputs {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-page__period-sep {
    display: none;
  }

  .summary-page__planned-card-top {
    flex-direction: column;
  }

  .summary-page__planned-card-grid {
    grid-template-columns: 1fr;
  }

  .summary-page__planned-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .summary-page__planned-card-desc {
    max-width: none;
    white-space: normal;
  }

  .summary-page__table th,
  .summary-page__table td,
  .summary-page__planned-table th,
  .summary-page__planned-table td {
    padding: 0.44rem 0.42rem;
  }

  .summary-page__fixed-head--portal .summary-page__table--fixed-head th {
    padding: 0.44rem 0.42rem;
  }

  .summary-page__table {
    font-size: 0.7rem;
  }

  .summary-page__col-category,
  .summary-page__th-cat,
  .summary-page__td-type,
  .summary-page__td-cat {
    width: var(--s-pin-width);
    min-width: var(--s-pin-width);
    max-width: var(--s-pin-width);
  }

  .summary-page__col-period,
  .summary-page__th-date,
  .summary-page__cell {
    min-width: 4.9rem;
    width: 4.9rem;
  }

  .summary-page__table th.summary-page__pin,
  .summary-page__table td.summary-page__pin {
    padding-right: 0.66rem !important;
    box-shadow: inset -1px 0 0 #dbe3ee;
  }

  .summary-page__aggregate:not(.summary-page__aggregate--opening):not(.summary-page__aggregate--closing) .summary-page__pin {
    z-index: 8;
    border-radius: 0.85rem !important;
    border-top-left-radius: 0.85rem !important;
    border-top-right-radius: 0.85rem !important;
    border-bottom-left-radius: 0.85rem !important;
    border-bottom-right-radius: 0.85rem !important;
    clip-path: none !important;
    overflow: hidden;
    isolation: isolate;
    background-clip: padding-box;
    box-shadow: inset -1px 0 0 #dbe3ee;
    transform: translateZ(0);
  }

  .summary-page__aggregate--opening .summary-page__pin,
  .summary-page__aggregate--closing .summary-page__pin {
    z-index: 9;
    border-top-left-radius: 0.85rem !important;
    border-bottom-left-radius: 0.85rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    clip-path: inset(0 0 0 0 round 0.85rem 0 0 0.85rem) !important;
    overflow: hidden;
    background-clip: padding-box;
    box-shadow: inset -1px 0 0 #dbe3ee;
  }

  .summary-page__aggregate--opening .summary-page__pin::before,
  .summary-page__aggregate--closing .summary-page__pin::before {
    border-top-left-radius: 0.85rem !important;
    border-bottom-left-radius: 0.85rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .summary-page__fixed-head--portal .summary-page__table--fixed-head th.summary-page__pin {
    padding-right: 0.66rem !important;
    box-shadow: inset -1px 0 0 #dbe3ee;
  }

  .summary-page__table thead th.summary-page__th-cat,
  .summary-page__table--fixed-head thead th.summary-page__th-cat {
    text-align: left !important;
    padding-left: 0.5rem !important;
  }

  .summary-page__fixed-head--portal .summary-page__table--fixed-head thead th.summary-page__th-cat {
    text-align: left !important;
    padding-left: 0.5rem !important;
  }

  .summary-page__th-weekday {
    font-size: 0.46rem;
    letter-spacing: 0.04em;
    line-height: 1.05;
  }

  .summary-page__th-day {
    font-size: 0.62rem;
    margin-top: 0.08rem;
    gap: 0.22rem;
  }

  .summary-page__td-type,
  .summary-page__td-cat {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .summary-page__td-cat {
    padding-left: 0.65rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .summary-page__toggle {
    gap: 0.28rem;
  }

  .summary-page__toggle strong {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .summary-page__cell {
    font-size: 0.72rem;
  }

  .summary-modal {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .summary-modal__dialog {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    animation: none;
  }

  @supports not (height: 100dvh) {
    .summary-modal__dialog {
      height: 100vh;
      max-height: 100vh;
    }
  }

  .summary-modal__header,
  .summary-modal__body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .summary-modal__header {
    align-items: flex-start;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .summary-modal__header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .summary-modal__close--floating {
    top: 0.7rem;
    right: 0.75rem;
  }

  .summary-modal__body {
    padding-top: 0.8rem;
    padding-bottom: calc(0.95rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .summary-modal__panel {
    border-radius: 0.82rem;
  }

  .summary-modal__new-row {
    grid-template-columns: 1fr;
  }

  .summary-modal__planned-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .summary-modal__planned-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 2rem;
    justify-content: flex-start;
  }

  .summary-modal__panel--table,
  .summary-modal__panel--planned {
    overflow-x: auto;
  }

  .summary-modal__panel--table {
    overflow-x: visible;
  }

  .summary-modal__panel--table .summary-modal__table {
    min-width: 0;
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  .summary-modal__panel--table .summary-modal__table thead {
    display: none;
  }

  .summary-modal__panel--table .summary-modal__table tbody {
    display: grid;
    gap: 0.6rem;
    padding: 0.75rem;
  }

  .summary-modal__panel--table .summary-modal__table tr {
    display: block;
    border: 1px solid #dbe5f0;
    border-radius: 0.82rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
  }

  .summary-modal__panel--table .summary-modal__table td {
    display: grid;
    grid-template-columns: minmax(5.8rem, 36%) minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem 0.55rem;
    padding: 0.52rem 0.68rem;
    border-bottom: 1px solid #eef2f7;
    text-align: left !important;
    font-size: 0.8rem;
    line-height: 1.28;
    white-space: normal !important;
    max-width: none !important;
  }

  .summary-modal__panel--table .summary-modal__table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
  }

  .summary-modal__panel--table .summary-modal__table td:last-child {
    width: auto !important;
    border-bottom: none;
  }

  .summary-modal__panel--table .summary-modal__table td[data-label="Сумма"] {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
  }

  .summary-modal__panel--table .summary-modal__table td[data-label="Описание"] {
    color: #475569;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .summary-modal__panel--table .summary-modal__actions {
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .summary-modal__panel--planned .summary-modal__table {
    min-width: 760px;
  }
}

/* ========== PnL Page — Modern Design ========== */
.pnl-page {
  --pnl-transition: 0.18s cubic-bezier(.4,0,.2,1);
  --pnl-border: #e2e8f0;
  --pnl-border-strong: #cbd5e1;
  --pnl-surface: #ffffff;
  --pnl-surface-subtle: #f8fafc;
  --pnl-text: #0f172a;
  --pnl-text-muted: #64748b;
  --pnl-positive: #059669;
  --pnl-negative: #dc2626;
  --pnl-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
}

.pnl-page__card {
  background: var(--pnl-surface);
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--pnl-shadow);
  overflow: hidden;
}

.pnl-page__hero {
  padding: 2.25rem 2.25rem 1.75rem;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #3b82f6 100%);
  border-radius: 0.75rem 0.75rem 0 0;
  color: #fff;
  position: relative;
}

.pnl-page__hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(255,255,255,0.12);
}

.pnl-page__hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr);
  gap: 1.25rem;
  align-items: end;
}

.pnl-page__hero-inner {
  position: relative;
  z-index: 1;
  max-width: 44rem;
}

.pnl-page__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.95rem;
}

.pnl-page__title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.9rem, 3vw, 2.45rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.pnl-page__subtitle {
  margin: 0;
  max-width: 42rem;
  font-size: 0.96rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.82);
}

.pnl-page__subtitle-highlight {
  border-bottom: 1px dashed rgba(148,163,184,0.8);
  color: #9ca3af;
  font-size: 0.68em;
  margin-left: 0.5rem;
}

.pnl-page__hero-panel {
  position: relative;
  z-index: 1;
  padding: 1rem 1rem 1.05rem;
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.pnl-page__hero-panel-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.68);
  margin-bottom: 0.35rem;
}

.pnl-page__hero-panel-period {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.9rem;
}

.pnl-page__hero-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.pnl-page__hero-metric {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.pnl-page__hero-metric span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pnl-page__hero-metric strong {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
}

.pnl-page__alert {
  margin: 1rem 2.25rem 0;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #be123c;
  border: 1px solid #fecdd3;
  font-size: 0.875rem;
  font-weight: 600;
}

.pnl-page__alert--info {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.pnl-page__toolbar {
  position: sticky;
  top: 0.75rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 1rem 0;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1.15rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.pnl-page__toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.pnl-page__toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.pnl-page__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pnl-page__field--wide {
  min-width: 260px;
}

.pnl-page__field--full {
  flex: 1 0 100%;
}

.pnl-page__label {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.pnl-page__period {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem;
  border-radius: 0.95rem;
  background: var(--pnl-surface-subtle);
  border: 1px solid var(--pnl-border);
}

.pnl-page__sep {
  color: #94a3b8;
  font-size: 0.875rem;
}

.pnl-page__input {
  min-height: 2.6rem;
  padding: 0.58rem 0.8rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  background: #fff;
  color: var(--pnl-text);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--pnl-transition), box-shadow var(--pnl-transition), background var(--pnl-transition);
}

.pnl-page__input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.pnl-page__pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pnl-page__products-strip {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.95rem;
  background: var(--pnl-surface-subtle);
  border: 1px solid var(--pnl-border);
  overflow-x: auto;
  width: 100%;
}

.pnl-page__products-strip--top6 {
  gap: 0.48rem;
  padding: 0.3rem 0.35rem;
}

.pnl-page__products-empty {
  font-size: 0.85rem;
  color: #64748b;
  padding: 0.4rem 0.6rem;
}

.pnl-page__product-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 80px;
  max-width: 96px;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
  padding: 0.45rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.pnl-page__product-card--top6 {
  min-width: 66px;
  max-width: 72px;
  padding: 0.32rem;
  gap: 0.24rem;
}

.pnl-page__product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.pnl-page__product-card.is-active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(37,99,235,0.45), 0 12px 26px rgba(15, 23, 42, 0.18);
}

.pnl-page__product-card-thumb {
  border-radius: 0.75rem;
  overflow: hidden;
  background: radial-gradient(circle at top, #e0f2fe, #1d4ed8);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pnl-page__product-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pnl-page__product-card-thumb--placeholder {
  width: 70%;
  height: 70%;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe 0%, #3b82f6 100%);
}

.pnl-page__product-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  align-items: flex-start;
}

.pnl-page__product-card-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: #0f172a;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.pnl-page__product-card-sku {
  font-size: 0.7rem;
  color: #64748b;
}

.pnl-page__product-card--top6 .pnl-page__product-card-name {
  font-size: 0.63rem;
}

.pnl-page__product-card--top6 .pnl-page__product-card-sku {
  font-size: 0.6rem;
}

.pnl-page__products-more {
  min-width: 120px;
  border-radius: 999px;
  border: 1px dashed #93c5fd;
  background: rgba(239,246,255,0.9);
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  align-self: center;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.pnl-page__products-more-label {
  display: inline-block;
  line-height: 1.08;
  text-align: center;
}

.pnl-page__products-more--top6 {
  min-width: 88px;
  padding: 0.34rem 0.62rem;
  font-size: 0.74rem;
}

.pnl-page__products-more:hover {
  background: #dbeafe;
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.pnl-products-articles-page__mobile-product-filter {
  display: flex;
  flex-direction: column;
  gap: 0.46rem;
  width: 100%;
}

.pnl-products-articles-page__mobile-product-controls {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
}

.pnl-products-articles-page__mobile-product-trigger {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #c7d5ea;
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(155deg, #f8fbff 0%, #f1f6fd 100%);
  padding: 0.72rem 0.84rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.72rem;
  text-align: left;
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 8px 18px rgba(37, 99, 235, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.pnl-products-articles-page__mobile-product-trigger:hover {
  border-color: #9fb7db;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 10px 22px rgba(37, 99, 235, 0.14);
}

.pnl-products-articles-page__mobile-product-trigger:active {
  transform: translateY(1px);
}

.pnl-products-articles-page__mobile-product-trigger-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.pnl-products-articles-page__mobile-product-trigger-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7b8ca4;
}

.pnl-products-articles-page__mobile-product-trigger-value {
  font-size: 1.02rem;
  font-weight: 800;
  color: #13213f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnl-products-articles-page__mobile-product-trigger-meta {
  font-size: 0.76rem;
  color: #52627a;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnl-products-articles-page__mobile-product-trigger-arrow {
  flex-shrink: 0;
  width: 0.62rem;
  height: 0.62rem;
  border-right: 2px solid #4d678f;
  border-bottom: 2px solid #4d678f;
  transform: rotate(-45deg);
  margin-right: 0.08rem;
}

.pnl-products-articles-page__mobile-product-reset {
  flex: 0 0 auto;
  border: 1px solid #d1dff2;
  border-radius: 0.85rem;
  background: #f8fbff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.58rem 0.72rem;
  white-space: nowrap;
}

.pnl-products-articles-page__mobile-top-products {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 0.42rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.pnl-products-articles-page__mobile-top-products .pnl-page__product-card--top6 {
  flex: 0 0 auto;
}

.pnl-products-articles-page__mobile-top-products .pnl-page__products-more--top6 {
  white-space: normal;
  min-width: 74px;
  max-width: 74px;
  padding: 0.3rem 0.4rem;
}

.pnl-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.pnl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
}

.pnl-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: 960px;
  max-height: min(640px, 90vh);
  margin: 5vh auto;
  padding: 1.5rem 1.75rem 1.75rem;
  border-radius: 1.3rem;
  background: #f9fafb;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pnl-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pnl-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.pnl-modal__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: #6b7280;
}

.pnl-modal__close {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.pnl-modal__search {
  margin-top: 0.25rem;
}

.pnl-modal__grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.9rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.pnl-page__product-card--modal {
  min-width: 0;
}

.pnl-products-articles-page .pnl-modal__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pnl-products-articles-page .pnl-page__product-card--modal {
  width: 100%;
  max-width: none;
}

@media (max-width: 1200px) {
  .pnl-products-articles-page .pnl-modal__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pnl-page__pill {
  min-height: 2.35rem;
  padding: 0.5rem 0.88rem;
  border: 1px solid var(--pnl-border);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.845rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--pnl-transition);
}

.pnl-page__pill:hover {
  border-color: #93c5fd;
  color: #0f172a;
  transform: translateY(-1px);
}

.pnl-page__pill.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.24);
}

.pnl-page__btn-refresh {
  min-height: 2.7rem;
  padding: 0.7rem 1.15rem;
  border: none;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.22);
  transition: transform var(--pnl-transition), box-shadow var(--pnl-transition), opacity var(--pnl-transition);
}

.pnl-page__btn-refresh:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(29, 78, 216, 0.24);
}

.pnl-page__btn-refresh:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.pnl-page__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.7rem 0.95rem;
  border-radius: 0.9rem;
  border: 1px solid var(--pnl-border);
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color var(--pnl-transition), color var(--pnl-transition), transform var(--pnl-transition);
}

.pnl-page__link:hover {
  color: #0f172a;
  border-color: var(--pnl-border-strong);
  transform: translateY(-1px);
}

.pnl-page__kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.35rem 2.25rem 0;
}

.pnl-page__kpi {
  position: relative;
  padding: 1.2rem 1.25rem 1.15rem;
  border-radius: 1.15rem;
  background: #fff;
  border: 1px solid var(--pnl-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 10px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.pnl-page__kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #cbd5e1;
}

.pnl-page__kpi[data-tone="positive"]::before {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.pnl-page__kpi[data-tone="negative"]::before {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.pnl-page__kpi[data-tone="neutral"]::before,
.pnl-page__kpi[data-tone="warning"]::before {
  background: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);
}

.pnl-page__kpi--accent {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.pnl-page__kpi-label {
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.pnl-page__kpi-value {
  font-size: clamp(1.55rem, 2vw, 1.9rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--pnl-text);
}

.pnl-page__kpi[data-tone="positive"] .pnl-page__kpi-value {
  color: var(--pnl-positive);
}

.pnl-page__kpi[data-tone="negative"] .pnl-page__kpi-value {
  color: var(--pnl-negative);
}

.pnl-page__kpi-pct {
  margin-top: 0.45rem;
  color: var(--pnl-text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.pnl-page__overview,
.pnl-page__body {
  padding: 1.35rem 2.25rem 0;
}

.pnl-page__section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pnl-page__section-head--table {
  margin-bottom: 1.1rem;
}

.pnl-page__section-eyebrow {
  margin-bottom: 0.32rem;
  color: #3b82f6;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pnl-page__section-title {
  margin: 0;
  color: var(--pnl-text);
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pnl-page__section-note {
  max-width: 28rem;
  color: var(--pnl-text-muted);
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: right;
}

.pnl-page__overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.95rem;
}

.pnl-page__overview-card {
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid var(--pnl-border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.pnl-page__overview-card[data-tone="positive"] {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
  border-color: #bbf7d0;
}

.pnl-page__overview-card[data-tone="negative"] {
  background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
  border-color: #fecaca;
}

.pnl-page__overview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pnl-page__overview-label {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

.pnl-page__overview-share {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pnl-page__overview-value {
  color: var(--pnl-text);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.pnl-page__overview-meta {
  margin-top: 0.38rem;
  color: var(--pnl-text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.pnl-page__table-wrap {
  overflow: auto;
  border: 1px solid var(--pnl-border);
  border-radius: 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.pnl-page__fixed-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  z-index: 260;
  display: none;
  pointer-events: none;
}

.pnl-page__fixed-head-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border-left: 1px solid var(--pnl-border);
  border-right: 1px solid var(--pnl-border);
  border-bottom: 1px solid var(--pnl-border);
  box-shadow: 0 10px 18px -14px rgba(15, 23, 42, 0.45);
  scrollbar-width: none;
}

.pnl-page__fixed-head-viewport::-webkit-scrollbar {
  display: none;
}

.pnl-report-page .pnl-page__card,
.pnl-products-page .pnl-page__card,
.pnl-products-articles-page .pnl-page__card {
  border: none;
  box-shadow: none;
}

.pnl-report-page .pnl-page__alert,
.pnl-products-page .pnl-page__alert,
.pnl-products-articles-page .pnl-page__alert {
  margin: 1rem 2.25rem 0 0;
}

.pnl-report-page .pnl-page__toolbar,
.pnl-products-page .pnl-page__toolbar,
.pnl-products-articles-page .pnl-page__toolbar {
  margin: 1rem 2.25rem 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.pnl-report-page .pnl-page__toolbar-block--period,
.pnl-products-page .pnl-page__toolbar-block--period,
.pnl-products-articles-page .pnl-page__toolbar-block--period {
  min-width: 0;
  padding: 0.55rem 0.62rem;
  border-radius: 0.8rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  gap: 0.28rem;
}

.pnl-report-page .pnl-page__toolbar .pnl-page__label,
.pnl-products-page .pnl-page__toolbar .pnl-page__label,
.pnl-products-articles-page .pnl-page__toolbar .pnl-page__label {
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  color: #94a3b8;
}

.pnl-report-page .pnl-page__pills .pnl-page__pill:not(.is-active),
.pnl-report-page .pnl-page__pills .pnl-page__pill:not(.is-active):hover,
.pnl-report-page .pnl-page__pills .pnl-page__pill:not(.is-active):focus-visible {
  border-color: transparent;
}

.pnl-products-articles-page .pnl-page__pills .pnl-page__pill:not(.is-active),
.pnl-products-articles-page .pnl-page__pills .pnl-page__pill:not(.is-active):hover,
.pnl-products-articles-page .pnl-page__pills .pnl-page__pill:not(.is-active):focus-visible {
  border-color: transparent;
}

.pnl-report-page .pnl-page__toolbar-block--period .pnl-page__label,
.pnl-products-page .pnl-page__toolbar-block--period .pnl-page__label,
.pnl-products-articles-page .pnl-page__toolbar-block--period .pnl-page__label {
  font-size: 0.62rem;
  letter-spacing: 0.11em;
}

.pnl-report-page .pnl-page__toolbar-block--period .pnl-page__period,
.pnl-products-page .pnl-page__toolbar-block--period .pnl-page__period,
.pnl-products-articles-page .pnl-page__toolbar-block--period .pnl-page__period {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.pnl-report-page .pnl-page__toolbar-block--period .pnl-page__sep,
.pnl-products-page .pnl-page__toolbar-block--period .pnl-page__sep,
.pnl-products-articles-page .pnl-page__toolbar-block--period .pnl-page__sep {
  color: #cbd5e1;
  font-size: 0.82rem;
}

.pnl-report-page .pnl-page__toolbar-block--period .pnl-page__input,
.pnl-products-page .pnl-page__toolbar-block--period .pnl-page__input,
.pnl-products-articles-page .pnl-page__toolbar-block--period .pnl-page__input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0.44rem 0.56rem;
  border-radius: 0.62rem;
  border: 1px solid #d6e0eb;
  background: #fff;
  font-size: 0.775rem;
}

.pnl-report-page .pnl-page__toolbar-block--period .pnl-page__input:focus,
.pnl-products-page .pnl-page__toolbar-block--period .pnl-page__input:focus,
.pnl-products-articles-page .pnl-page__toolbar-block--period .pnl-page__input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.pnl-report-page .pnl-page__toolbar-block--period {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.pnl-products-articles-page .pnl-page__toolbar-block--period {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.pnl-report-page .pnl-page__toolbar-main {
  align-items: flex-start;
}

.pnl-products-articles-page .pnl-page__toolbar-main {
  align-items: flex-start;
}

.pnl-products-page .pnl-products-filters {
  position: sticky;
  top: 0.75rem;
  z-index: 8;
  margin: 1.1rem 2.25rem 0 0;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 42px -30px rgba(15, 23, 42, 0.55);
}

.pnl-products-page .pnl-products-filters__grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 1fr) minmax(260px, 1fr);
  grid-template-areas:
    "period quick group"
    "search metric metric";
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}

.pnl-products-page .pnl-products-filters__card {
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.pnl-products-page .pnl-products-filters__card--period {
  grid-area: period;
}

.pnl-products-page .pnl-products-filters__card--quick {
  grid-area: quick;
}

.pnl-products-page .pnl-products-filters__card--group {
  grid-area: group;
}

.pnl-products-page .pnl-products-filters__card--search {
  grid-area: search;
}

.pnl-products-page .pnl-products-filters__card--metric {
  grid-area: metric;
}

.pnl-products-page .pnl-products-filters .pnl-page__label {
  color: #64748b;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.pnl-products-page .pnl-products-filters .pnl-page__period {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
}

.pnl-products-page .pnl-products-filters .pnl-page__input {
  width: 100%;
  min-width: 0;
  min-height: 2.42rem;
  border-color: #dbe3ef;
  background: #f8fafc;
}

.pnl-products-page .pnl-products-filters .pnl-page__input:focus {
  background: #fff;
}

.pnl-products-page .pnl-products-filters .pnl-page__pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
  width: 100%;
}

.pnl-products-page .pnl-products-filters__card--metric .pnl-page__pills {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pnl-products-page .pnl-products-filters .pnl-page__pill {
  width: 100%;
  min-height: 2.42rem;
  justify-content: center;
  padding: 0.5rem 0.65rem;
  border-color: #dbe3ef;
  background: #f8fafc;
  color: #334155;
  white-space: nowrap;
}

.pnl-products-page .pnl-products-filters .pnl-page__pill:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.pnl-report-page .pnl-page__kpi-row,
.pnl-products-page .pnl-page__kpi-row,
.pnl-products-articles-page .pnl-page__kpi-row {
  padding: 1.35rem 2.25rem 0 0;
}

.pnl-report-page .pnl-page__table-wrap {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.pnl-report-page .pnl-page__fixed-head-viewport,
.pnl-report-page__fixed-head .pnl-page__fixed-head-viewport {
  border: none;
  box-shadow: none;
}

.pnl-report-page .pnl-page__table thead th,
.pnl-report-page .pnl-page__table--fixed-head thead th,
.pnl-report-page__fixed-head .pnl-page__table--fixed-head thead th {
  border-radius: 0 !important;
}

.pnl-report-page__fixed-head .pnl-page__table--fixed-head th:first-child {
  min-width: 0 !important;
  width: auto;
  max-width: none;
}

.pnl-report-page .pnl-page__table th:first-child,
.pnl-report-page .pnl-page__table td:first-child {
  width: clamp(200px, 30vw, 320px);
  min-width: clamp(200px, 30vw, 320px);
  max-width: clamp(200px, 30vw, 320px);
}

.pnl-report-page .pnl-page__row--gross-margin td:first-child,
.pnl-report-page .pnl-page__row--marginal-profit td:first-child,
.pnl-report-page .pnl-page__row--ebitda td:first-child,
.pnl-report-page .pnl-page__row--interests td:first-child {
  box-shadow: 2px 0 0 #eef2f7;
}

.pnl-report-page .pnl-page__table tbody td:first-child,
.pnl-report-page .pnl-page__table tbody tr:hover td:first-child {
  background: #fff !important;
}

.pnl-products-page .pnl-page__fixed-head-viewport,
.pnl-products-page__fixed-head .pnl-page__fixed-head-viewport {
  border: none;
  box-shadow: none;
}

.pnl-products-page .pnl-page__table thead th,
.pnl-products-page .pnl-page__table--fixed-head thead th,
.pnl-products-page__fixed-head .pnl-page__table--fixed-head thead th {
  border-radius: 0 !important;
}

.pnl-products-page__fixed-head .pnl-products-table th.pnl-products-table__product-col--sticky {
  width: var(--pnl-products-col-w);
  min-width: var(--pnl-products-col-w);
  max-width: var(--pnl-products-col-w);
}

.pnl-products-articles-page .pnl-page__table-wrap {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.pnl-products-articles-page .pnl-page__fixed-head-viewport {
  border: none;
  box-shadow: none;
}

.pnl-products-articles-page__fixed-head .pnl-page__fixed-head-viewport {
  border: none;
  box-shadow: none;
}

.pnl-products-articles-page .pnl-page__table thead th,
.pnl-products-articles-page .pnl-page__table--fixed-head thead th {
  border-radius: 0 !important;
}

.pnl-products-articles-page__fixed-head .pnl-page__table--fixed-head thead th {
  border-radius: 0 !important;
}

.pnl-products-articles-page .pnl-page__row--orders td:first-child {
  box-shadow: none;
}

.pnl-products-articles-page .pnl-page__table tbody td:first-child,
.pnl-products-articles-page .pnl-page__table tbody tr:hover td:first-child {
  background: #fff !important;
}

.pnl-report-page .pnl-page__overview,
.pnl-report-page .pnl-page__body,
.pnl-products-page .pnl-page__overview,
.pnl-products-page .pnl-page__body,
.pnl-products-articles-page .pnl-page__overview,
.pnl-products-articles-page .pnl-page__body {
  padding: 1.35rem 2.25rem 0 0;
}

/* PnL по товарам (статьи): уменьшенный десктопный отступ основного контента */
.pnl-products-articles-page .pnl-page__overview,
.pnl-products-articles-page .pnl-page__body {
  padding-right: 1rem;
}

.cost-groups-page__table {
  width: 100%;
  table-layout: fixed;
}

.cost-groups-page__header-desc {
  margin: 0.55rem 0 0;
  max-width: 84ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--mpb-gray-500);
}

.cost-groups-page__body {
  padding: 0.55rem 2.25rem 0 0;
}

.cost-groups-page__table .pnl-page__input {
  width: 100%;
  min-width: 0;
}

.cost-groups-page__tabs {
  display: inline-flex;
  gap: 0.35rem;
  margin: 0 1.75rem 0.95rem;
  padding: 0.35rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.95rem;
  background: #f8fafc;
}

.cost-groups-page__tabs button {
  min-height: 2.55rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 0.68rem;
  background: transparent;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 850;
  cursor: pointer;
  transition: background var(--c-transition), color var(--c-transition), box-shadow var(--c-transition);
}

.cost-groups-page__tabs button:hover {
  color: #0f172a;
  background: #eef4ff;
}

.cost-groups-page__tabs button.is-active {
  color: #fff;
  background: #172554;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.cost-groups-page__opiu {
  display: grid;
  gap: 1rem;
}

.cost-groups-page__opiu-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(28rem, 0.95fr);
  gap: 1rem;
  align-items: end;
  padding: 1.05rem;
  border: 1px solid #dbeafe;
  border-radius: 1.05rem;
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 58%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.cost-groups-page__opiu-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 900;
}

.cost-groups-page__opiu-head p {
  margin: 0.35rem 0 0;
  max-width: 54rem;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.cost-groups-page__add-group {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) 9rem auto;
  gap: 0.55rem;
  align-items: center;
}

.cost-groups-page__opiu-tools {
  display: grid;
  gap: 0.55rem;
}

.cost-groups-page__opiu-tools .cost-groups-page__add-group {
  grid-template-columns: minmax(11rem, 1fr) minmax(9rem, 0.7fr) minmax(12rem, 1fr) auto;
}

.cost-groups-page__add-group--inner {
  opacity: 0.92;
}

.cost-groups-page__add-group--inner {
  grid-template-columns: minmax(11rem, 1fr) minmax(9rem, 0.55fr) auto !important;
}

.cost-groups-page__blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.cost-groups-page__statement {
  display: grid;
  gap: 0.85rem;
}

.cost-groups-page__statement-row {
  display: grid;
  grid-template-columns: minmax(14rem, 0.32fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #dbe5f0;
  border-radius: 1.08rem;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.cost-groups-page__statement-row--compact {
  grid-template-columns: 1fr;
}

.cost-groups-page__statement-row--income {
  border-color: #bbf7d0;
  background:
    radial-gradient(95% 120% at 100% 0%, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0) 58%),
    #ffffff;
}

.cost-groups-page__statement-row--expense {
  border-color: #dbeafe;
  background:
    radial-gradient(95% 120% at 100% 0%, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 58%),
    #ffffff;
}

.cost-groups-page__statement-label {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.cost-groups-page__statement-label > span {
  width: fit-content;
  min-height: 1.7rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 900;
}

.cost-groups-page__statement-row--income .cost-groups-page__statement-label > span {
  background: #dcfce7;
  color: #047857;
}

.cost-groups-page__statement-label strong {
  color: #0f172a;
  font-size: 1.02rem;
  font-weight: 900;
}

.cost-groups-page__statement-label p {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.cost-groups-page__blocks--statement {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cost-groups-page__formula-row {
  display: grid;
  grid-template-columns: auto minmax(10rem, auto) minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.cost-groups-page__formula-row > span {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #172554;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.cost-groups-page__formula-row strong {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 900;
}

.cost-groups-page__formula-row p {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
}

.cost-groups-page__formula-row--strong {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.cost-groups-page__formula-row--profit {
  border-color: #bbf7d0;
  background: #ecfdf5;
}

.cost-groups-page__formula-row--profit > span {
  background: #047857;
}

.cost-groups-page__empty-section {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #cbd5e1;
  border-radius: 0.95rem;
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 850;
  background: rgba(248, 250, 252, 0.7);
}

.cost-groups-page__block {
  min-width: 0;
  border: 1px solid #dbe5f0;
  border-radius: 1.05rem;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  transition: border-color var(--c-transition), box-shadow var(--c-transition), transform var(--c-transition), opacity var(--c-transition);
}

.cost-groups-page__block:hover {
  border-color: #bfdbfe;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.09);
}

.cost-groups-page__block.is-dragging {
  opacity: 0.62;
  transform: scale(0.99);
}

.cost-groups-page__block-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.cost-groups-page__drag-handle {
  color: #94a3b8;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.25em;
  cursor: grab;
  user-select: none;
}

.cost-groups-page__block-title,
.cost-groups-page__subgroup-head label {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.cost-groups-page__block-title span,
.cost-groups-page__subgroup-head label span {
  color: #94a3b8;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-groups-page__block-title input,
.cost-groups-page__subgroup-head input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 900;
  outline: none;
}

.cost-groups-page__subgroup-head input {
  font-size: 0.92rem;
  font-weight: 850;
}

.cost-groups-page__block-badge,
.cost-groups-page__block-count,
.cost-groups-page__subgroup-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.cost-groups-page__block-count,
.cost-groups-page__subgroup-head > span {
  background: #f1f5f9;
  color: #64748b;
}

.cost-groups-page__subgroups {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
}

.cost-groups-page__subgroup {
  display: grid;
  gap: 0.65rem;
  min-height: 6.25rem;
  padding: 0.75rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.92rem;
  background: #fbfdff;
  transition: border-color var(--c-transition), background var(--c-transition);
}

.cost-groups-page__subgroup:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.cost-groups-page__subgroup.is-article-drop-target {
  border-color: #f59e0b;
  background: #fffbeb;
}

.cost-groups-page__subgroup.is-article-drop-target:hover {
  border-color: #d97706;
  background: #fef3c7;
}

.cost-groups-page__subgroup-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.cost-groups-page__articles {
  display: grid;
  gap: 0.45rem;
}

.cost-groups-page__article {
  display: grid;
  gap: 0.16rem;
  padding: 0.62rem 0.7rem;
  border: 1px solid #dbeafe;
  border-radius: 0.78rem;
  background: #ffffff;
  cursor: grab;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.cost-groups-page__article strong {
  min-width: 0;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-groups-page__article span {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
}

.cost-groups-page__drop-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  border: 1px dashed #bfdbfe;
  border-radius: 0.75rem;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 800;
}

.cost-groups-page__add-subgroup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  padding: 0 0.85rem 0.85rem;
}

.cost-groups-page__opiu-builder {
  display: grid;
  grid-template-columns: minmax(22rem, 0.92fr) minmax(22rem, 1.08fr);
  gap: 0.85rem;
  align-items: start;
}

.cost-groups-page__skeleton,
.cost-groups-page__details {
  min-width: 0;
  border: 1px solid #dbe5f0;
  border-radius: 0.95rem;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.cost-groups-page__details {
  position: sticky;
  top: 0.75rem;
}

.cost-groups-page__skeleton-fixed,
.cost-groups-page__skeleton-list,
.cost-groups-page__excluded-list {
  display: grid;
  gap: 0.34rem;
  padding: 0.5rem;
}

.cost-groups-page__skeleton-fixed {
  background: #f8fafc;
}

.cost-groups-page__skeleton-fixed div,
.cost-groups-page__skeleton-row,
.cost-groups-page__section-row,
.cost-groups-page__skeleton-total {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto auto;
  gap: 0.42rem;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.34rem 0.42rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  background: #ffffff;
}

.cost-groups-page__skeleton-fixed div {
  grid-template-columns: auto minmax(0, 1fr) auto;
  background: #f8fafc;
}

.cost-groups-page__section-row,
.cost-groups-page__skeleton-total {
  grid-template-columns: auto auto minmax(10rem, 1fr) minmax(8.5rem, 0.55fr) minmax(11rem, 0.7fr) auto auto;
  width: 100%;
  text-align: left;
}

.cost-groups-page__skeleton-row {
  grid-template-columns: auto auto minmax(0, 1fr) minmax(7.5rem, 0.8fr) minmax(5.5rem, 0.5fr) auto auto auto;
}

.cost-groups-page__section-row {
  border-color: #dbeafe;
  cursor: pointer;
}

.cost-groups-page__section-row input,
.cost-groups-page__section-row select,
.cost-groups-page__skeleton-total strong {
  min-width: 0;
  height: 2rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.55rem;
  background: #ffffff;
  padding: 0 0.48rem;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 850;
}

.cost-groups-page__section-row input {
  font-size: 0.9rem;
  font-weight: 900;
}

.cost-groups-page__skeleton-total strong {
  border: 0;
  background: transparent;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-groups-page__section-row small,
.cost-groups-page__skeleton-total small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-groups-page__section-row em {
  align-self: center;
  min-height: 1.6rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.cost-groups-page__section-row:hover,
.cost-groups-page__section-row.is-active {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.09);
}

.cost-groups-page__section-row.is-excluded {
  border-color: #e5e7eb;
  background: #fafafa;
}

.cost-groups-page__section-row.is-drop-target {
  border-color: #22c55e;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}

.cost-groups-page__section-row.is-reorder-target {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.cost-groups-page__section-row.is-dragging {
  opacity: 0.55;
}

.cost-groups-page__section-delete {
  min-width: 1.9rem;
  min-height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.55rem;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background var(--c-transition), color var(--c-transition);
}

.cost-groups-page__section-delete:not(:disabled):hover {
  background: #fee2e2;
  color: #b91c1c;
}

.cost-groups-page__section-delete:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.cost-groups-page__skeleton-total {
  background: #f8fafc;
  border-color: #bbf7d0;
}

.cost-groups-page__skeleton-row {
  cursor: pointer;
  transition: border-color var(--c-transition), background var(--c-transition), box-shadow var(--c-transition), opacity var(--c-transition);
}

.cost-groups-page__skeleton-row:hover,
.cost-groups-page__skeleton-row.is-active {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.09);
}

.cost-groups-page__skeleton-row.is-excluded {
  border-color: #e5e7eb;
  background: #fafafa;
  opacity: 0.78;
}

.cost-groups-page__skeleton-row.is-dragging {
  opacity: 0.5;
}

.cost-groups-page__skeleton-row.is-article-drop-target {
  border-color: #f59e0b;
  background: #fffbeb;
}

.cost-groups-page__skeleton-row.is-article-drop-target:hover {
  border-color: #d97706;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16);
}

.cost-groups-page__skeleton-index,
.cost-groups-page__skeleton-fixed span {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 900;
}

.cost-groups-page__skeleton-row input,
.cost-groups-page__skeleton-row select,
.cost-groups-page__details-head select {
  min-width: 0;
  height: 2rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.55rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
}

.cost-groups-page__skeleton-row input {
  padding: 0 0.52rem;
}

.cost-groups-page__skeleton-row select,
.cost-groups-page__details-head select {
  padding: 0 0.42rem;
}

.cost-groups-page__skeleton-row button,
.cost-groups-page__article--compact button {
  min-height: 1.9rem;
  border: 0;
  border-radius: 0.55rem;
  padding: 0 0.58rem;
  background: #172554;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.cost-groups-page__article--compact button {
  background: #f8fafc;
  color: #64748b;
}

.cost-groups-page__article--compact button:not(:disabled):hover {
  background: #fee2e2;
  color: #b91c1c;
}

.cost-groups-page__article--compact button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.cost-groups-page__skeleton-count {
  min-width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
}

.cost-groups-page__skeleton-fixed strong,
.cost-groups-page__skeleton-row input,
.cost-groups-page__details-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-groups-page__skeleton-fixed strong {
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 900;
}

.cost-groups-page__skeleton-fixed small,
.cost-groups-page__skeleton-row small {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.cost-groups-page__excluded-list {
  border-top: 1px solid #e2e8f0;
  background: #fafafa;
}

.cost-groups-page__excluded-title {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-groups-page__details-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.cost-groups-page__details-count {
  min-height: 1.8rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.62rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 900;
}

.cost-groups-page__details-head div {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.cost-groups-page__details-head span {
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-groups-page__details-head strong {
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 900;
}

.cost-groups-page__section-groups {
  display: grid;
  gap: 0.38rem;
  padding: 0.55rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fbfdff;
}

.cost-groups-page__section-groups .cost-groups-page__skeleton-row {
  min-height: 2.15rem;
}

.cost-groups-page__article-panel {
  display: grid;
}

.cost-groups-page__article-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.58rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.cost-groups-page__article-panel-head div {
  display: grid;
  min-width: 0;
  gap: 0.14rem;
}

.cost-groups-page__article-panel-head span {
  color: #94a3b8;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-groups-page__article-panel-head strong {
  min-width: 0;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-groups-page__article-panel-head select {
  min-width: 8.5rem;
  height: 2rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.55rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
}

.cost-groups-page__subgroups--compact {
  gap: 0.48rem;
  padding: 0.58rem;
  max-height: min(62vh, 42rem);
  overflow: auto;
}

.cost-groups-page__subgroup--compact {
  min-height: auto;
  gap: 0.42rem;
  padding: 0.55rem;
  border-radius: 0.7rem;
}

.cost-groups-page__article--compact {
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 1.15fr) auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.42rem 0.48rem;
  border-radius: 0.58rem;
}

.cost-groups-page__article--compact.is-dragging {
  opacity: 0.55;
}

.cost-groups-page__article-move-select,
.cost-groups-page__group-section-select {
  min-width: 0;
  height: 1.9rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.55rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0 0.35rem;
}

.cost-groups-page__article--compact div {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.expense-groups-page__form {
  margin: 1.05rem 1.75rem 0.65rem;
  padding: 1.05rem;
  border: 1px solid #dbe5f0;
  border-radius: 1.05rem;
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 58%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.expense-groups-page--embedded {
  padding: 0;
}

.expense-groups-page--embedded .costs-page__card {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: none;
}

.expense-groups-page--embedded .expense-groups-page__form {
  margin: 1rem 1.25rem 0.75rem;
}

.expense-groups-page--embedded .expense-groups-page__body {
  margin: 0 1.25rem 1.25rem;
}

.expense-groups-page__form-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.expense-groups-page__form-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 850;
}

.expense-groups-page__form-heading p {
  margin: 0;
  max-width: 32rem;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: right;
}

.expense-groups-page__form .costs-page__form-row--primary {
  grid-template-columns: 10rem minmax(28rem, 1fr) auto;
  align-items: end;
}

.expense-groups-page__form .costs-page__field--category {
  min-width: min(100%, 28rem);
}

.expense-groups-page__table {
  width: 100%;
  table-layout: fixed;
}

.expense-groups-page__header-desc {
  margin: 0.55rem 0 0;
  max-width: 84ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--mpb-gray-500);
}

.expense-groups-page__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.95rem;
}

.expense-groups-page__summary span {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.05rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 750;
}

.expense-groups-page__summary strong {
  color: #1d4ed8;
  font-size: 0.95rem;
  font-weight: 850;
}

.expense-groups-page__alert {
  margin: 0 1.75rem 1rem;
}

.expense-groups-page__body {
  padding: 0.65rem 1.75rem 0;
}

.pnl-page__table.expense-groups-page__table th:first-child,
.pnl-page__table.expense-groups-page__table td:first-child {
  min-width: 150px;
}

.pnl-page__table.expense-groups-page__table th:nth-child(2),
.pnl-page__table.expense-groups-page__table td:nth-child(2) {
  min-width: 130px;
}

.pnl-page__table.expense-groups-page__table th:nth-child(4),
.pnl-page__table.expense-groups-page__table td:nth-child(4) {
  min-width: 180px;
}

.expense-groups-page__actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.expense-groups-page__table .pnl-page__input {
  width: 100%;
  min-width: 0;
}

.expense-groups-page__action {
  min-height: 2.25rem;
  padding: 0.55rem 0.8rem;
  border-radius: 0.68rem;
  background: #f8fafc;
  color: #334155;
  border-color: #dbe5f0;
  box-shadow: none;
}

.expense-groups-page__action--primary {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}

.expense-groups-page__action--danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff7f7;
}

.expense-groups-page__footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 1.75rem 1.5rem;
  margin-top: 0.85rem;
}

@media (max-width: 860px) {
  .expense-groups-page .costs-page__header {
    padding: 1.15rem;
  }

  .expense-groups-page__form,
  .expense-groups-page__alert,
  .expense-groups-page__body,
  .expense-groups-page__footer {
    margin-left: 1rem;
    margin-right: 1rem;
    padding-left: 0;
    padding-right: 0;
  }

  .expense-groups-page__form {
    padding: 0.95rem;
  }

  .expense-groups-page__form-heading {
    display: grid;
    gap: 0.3rem;
  }

  .expense-groups-page__form-heading p {
    max-width: none;
    text-align: left;
  }

  .expense-groups-page__form .costs-page__form-row--primary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .expense-groups-page__form .costs-page__field--category {
    min-width: 0;
  }

  .expense-groups-page__form .costs-page__form-actions,
  .expense-groups-page__form .costs-page__btn-primary {
    width: 100%;
  }

  .expense-groups-page__fixed-head {
    display: none;
  }

  .pnl-page__table.expense-groups-page__table,
  .pnl-page__table.expense-groups-page__table tbody,
  .pnl-page__table.expense-groups-page__table tr,
  .pnl-page__table.expense-groups-page__table td {
    display: block;
    width: 100%;
  }

  .pnl-page__table.expense-groups-page__table colgroup,
  .pnl-page__table.expense-groups-page__table thead {
    display: none;
  }

  .pnl-page__table.expense-groups-page__table {
    background: transparent;
    border-spacing: 0;
  }

  .pnl-page__table.expense-groups-page__table tbody {
    display: grid;
    gap: 0.85rem;
  }

  .pnl-page__table.expense-groups-page__table tr {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 0.95rem;
    background: #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
  }

  .pnl-page__table.expense-groups-page__table td,
  .pnl-page__table.expense-groups-page__table td:first-child {
    position: static;
    min-width: 0;
    padding: 0.78rem 0.9rem;
    border-bottom: 1px solid #edf2f7;
    box-shadow: none;
    display: grid;
    grid-template-columns: minmax(6.7rem, 0.48fr) minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
  }

  .pnl-page__table.expense-groups-page__table td:last-child {
    border-bottom: none;
  }

  .pnl-page__table.expense-groups-page__table td::before {
    content: attr(data-label);
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .expense-groups-page__actions {
    justify-content: flex-start;
  }

  .expense-groups-page__action {
    flex: 1 1 8.5rem;
  }
}

@media (max-width: 520px) {
  .costs-setup-modal__dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    border-radius: 1rem;
  }

  .costs-setup-modal__body {
    padding: 0.95rem;
  }

  .costs-setup-modal__actions {
    display: grid;
  }

  .costs-setup-modal__actions .costs-edit-modal__btn,
  .costs-setup-modal__empty .costs-edit-modal__btn,
  .costs-setup-modal__ready .costs-edit-modal__btn {
    width: 100%;
  }

  .costs-category-manager-modal__dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    border-radius: 1rem;
  }

  .costs-category-editor-modal__dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    border-radius: 1rem;
  }

  .costs-category-editor-modal__body {
    height: calc(100vh - 8rem);
  }

  .costs-category-manager-modal__body {
    padding: 0.95rem;
  }

  .costs-category-manager-modal__actions {
    display: grid;
  }

  .costs-category-manager-modal__actions .costs-edit-modal__btn {
    width: 100%;
  }

  .expense-groups-page__summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pnl-page__table.expense-groups-page__table td,
  .pnl-page__table.expense-groups-page__table td:first-child {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.pnl-page__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.pnl-page__table th,
.pnl-page__table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}

.pnl-page__table th:first-child,
.pnl-page__table td:first-child {
  position: sticky;
  left: 0;
  min-width: 260px;
}

.pnl-page__table th {
  height: 56px;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(8px);
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  text-align: left;
}

.pnl-page__table th:first-child {
  z-index: 4;
  box-shadow: 2px 0 0 #e2e8f0;
}

.pnl-page__table td:first-child {
  z-index: 2;
  box-shadow: 2px 0 0 #eef2f7;
}

.pnl-page__table--fixed-head {
  min-width: 100%;
}

.pnl-page__table--fixed-head th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.pnl-page__table--fixed-head th:first-child {
  z-index: 5;
}

.pnl-page__table tbody tr {
  transition: background var(--pnl-transition), box-shadow var(--pnl-transition);
}

.pnl-page__table tbody tr:hover td {
  background: #f8fafc;
}

.pnl-page__row--interactive {
  cursor: pointer;
}

.pnl-page__row--tax-configurable td:first-child .pnl-page__row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pnl-page__row-action-hint {
  flex-shrink: 0;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #475569;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.pnl-page__row--tax-configurable:hover .pnl-page__row-action-hint {
  color: #1d4ed8;
  background: #dbeafe;
}

.pnl-page__row--revenue td {
  background: linear-gradient(180deg, #f8fffb 0%, #f0fdf4 100%);
}

.pnl-page__row--orders td {
  background: linear-gradient(180deg, #f5f9ff 0%, #eef4ff 100%);
  border-top: 1px solid #dbeafe;
  border-bottom: 1px solid #dbeafe;
}

.pnl-page__row--orders td:first-child {
  box-shadow: inset 2px 0 0 #60a5fa;
}

.pnl-page__row--cogs td,
.pnl-page__row--tax td {
  background: linear-gradient(180deg, #fff9f9 0%, #fef2f2 100%);
}

.pnl-page__row--gross-margin td {
  background: #f7fbf8;
  border-top: 1px solid #e2ece6;
  border-bottom: 1px solid #e2ece6;
}

.pnl-page__row--gross-margin td:first-child {
  box-shadow: inset 2px 0 0 #6b9f7f;
}

.pnl-page__row--marginal-profit td {
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  border-top: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0;
}

.pnl-page__row--marginal-profit td:first-child {
  box-shadow: inset 2px 0 0 #16a34a;
}

.pnl-page__row--marginal-profit td:first-child strong {
  color: var(--pnl-text);
}

.pnl-page__row--marginal-profit .pnl-page__cell-value {
  color: #15803d;
}

.pnl-page__row--marginal-profit .pnl-page__cell-value--negative {
  color: var(--pnl-negative);
}

.pnl-page__table tbody tr.pnl-page__row--marginal-profit:hover td {
  background: #dcfce7;
}

.pnl-page__row--ebitda td {
  background: #f6fafb;
  border-top: 1px solid #e1e9ed;
  border-bottom: 1px solid #e1e9ed;
}

.pnl-page__row--ebitda td:first-child {
  box-shadow: inset 2px 0 0 #5f8f99;
}

.pnl-page__row--interests td {
  background: #f7f7ff;
  border-top: 1px solid #e5e7ff;
  border-bottom: 1px solid #e5e7ff;
}

.pnl-page__row--interests td:first-child {
  box-shadow: inset 2px 0 0 #818cf8;
}

.pnl-page__table tbody tr.pnl-page__row--gross-margin:hover td {
  background: #f1f7f3;
}

.pnl-page__table tbody tr.pnl-page__row--orders:hover td {
  background: #eaf2ff;
}

.pnl-page__table tbody tr.pnl-page__row--ebitda:hover td {
  background: #f0f5f7;
}

.pnl-page__table tbody tr.pnl-page__row--interests:hover td {
  background: #f1f2ff;
}

.pnl-page__row--group td {
  background: #f8fafc;
}

.pnl-page__row--sub td {
  color: #334155;
}

.pnl-page__row--detail td {
  background: #fcfdff;
  color: #64748b;
  font-size: 0.82rem;
}

.pnl-page__row--detail-group td {
  background: #f8fbff;
  color: #475569;
}

.pnl-page__row--detail-subgroup td {
  background: #fbfdff;
  color: #55637a;
}

.pnl-page__row--detail-operation td {
  background: #ffffff;
  color: #64748b;
}

.pnl-page__row--profit td {
  background: linear-gradient(90deg, #effcf5 0%, #ecfdf5 100%);
  border-top: 1px solid #bbf7d0;
  border-bottom: none;
}

/* PnL по товарам: таблица с картинками товаров */
.pnl-products-table-wrap {
  position: relative;
  min-width: 400px;
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 30px -26px rgba(15, 23, 42, 0.6);
  scrollbar-gutter: stable;
}

.pnl-products-table {
  --pnl-products-col-w: 300px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.pnl-products-table .pnl-products-table__product-col {
  width: var(--pnl-products-col-w);
  min-width: var(--pnl-products-col-w);
  max-width: var(--pnl-products-col-w);
  vertical-align: middle;
}

.pnl-products-table .pnl-products-table__product-col--sticky {
  position: sticky;
  left: 0;
  z-index: 6;
  background: #f8fafc;
  box-shadow: 1px 0 0 #dbe3ef;
}

.pnl-products-table .pnl-products-table__period-col {
  text-align: right;
  min-width: 0;
  white-space: nowrap;
}

.pnl-products-table .pnl-products-table__total-col {
  text-align: right;
  min-width: 0;
  white-space: nowrap;
}

.pnl-products-table th {
  height: 52px;
  border-bottom: 1px solid #dbe3ef;
  background: #f8fafc;
  color: #64748b;
}

.pnl-products-table td {
  border-bottom: 1px solid #edf2f7;
}

.pnl-products-table__product-cell {
  width: var(--pnl-products-col-w);
  min-width: var(--pnl-products-col-w);
  max-width: var(--pnl-products-col-w);
  box-sizing: border-box;
  padding: 0.68rem 0.82rem !important;
  vertical-align: middle;
}

.pnl-products-table__product-cell--sticky {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  box-shadow: 1px 0 0 #dbe3ef;
  border-right: none;
  overflow: hidden;
}

.pnl-products-table__row--unallocated .pnl-products-table__product-cell--sticky {
  background: #fef3c7;
}

.pnl-products-table__row--a-summary .pnl-products-table__product-cell--sticky,
.pnl-products-table__row--b-summary .pnl-products-table__product-cell--sticky {
  background: #f8fafc;
}

.pnl-products-table__row--c-summary .pnl-products-table__product-cell--sticky {
  background: #f1f5f9;
}

.pnl-products-table__row--a-summary td {
  background: #f8fbff;
}

.pnl-products-table__row--b-summary td {
  background: #f8fafc;
}

.pnl-products-table__row--c-summary td {
  background: #f1f5f9;
}

.pnl-products-table__row--b-detail .pnl-products-table__product-cell--sticky,
.pnl-products-table__row--c-detail .pnl-products-table__product-cell--sticky {
  background: #fff;
}

.pnl-products-table__row--a-detail .pnl-products-table__product-cell--sticky {
  background: #fff;
}

.pnl-products-table__row--a-detail:hover .pnl-products-table__product-cell--sticky,
.pnl-products-table__row--b-detail:hover .pnl-products-table__product-cell--sticky,
.pnl-products-table__row--c-detail:hover .pnl-products-table__product-cell--sticky {
  background: #f8fafc;
}

.pnl-products-table th.pnl-products-table__product-col--sticky,
.pnl-products-table td.pnl-products-table__product-cell--sticky {
  box-shadow: 1px 0 0 #dbe3ef;
  border-right: none;
}

.pnl-products-table__product-content {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  width: 100%;
}

.pnl-products-table__product-thumb {
  flex-shrink: 0;
  width: 2.08rem;
  height: 2.82rem;
  border-radius: 0.62rem;
  border: 1px solid #d7e3f4;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pnl-products-table__product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pnl-products-table__product-thumb-placeholder {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  border: 1px dashed #d1d5db;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}

.pnl-products-table__product-thumb-placeholder::before,
.pnl-products-table__product-thumb-placeholder::after {
  content: "";
  position: absolute;
  background: #cbd5e1;
  border-radius: 2px;
}

.pnl-products-table__product-thumb-placeholder::before {
  width: 12px;
  height: 2px;
}

.pnl-products-table__product-thumb-placeholder::after {
  width: 2px;
  height: 12px;
}

.pnl-products-table__product-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  overflow: hidden;
}

.pnl-products-table__product-name {
  font-weight: 650;
  font-size: 0.8125rem;
  color: var(--pnl-text, #1e293b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pnl-products-table__group-name-short {
  display: none;
}

.pnl-products-table__product-sku {
  font-size: 0.7rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pnl-products-table__bc-toggle {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.pnl-products-table__bc-toggle:hover {
  color: #2563eb;
}

.pnl-products-table__bc-toggle-icon {
  flex-shrink: 0;
  width: 0.58rem;
  height: 0.58rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(-45deg);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.pnl-products-table__bc-toggle-icon.is-open {
  transform: rotate(45deg);
}

.pnl-products-table__group-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.58rem;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.pnl-products-table__group-badge--b {
  background: #f1f5f9;
  color: #475569;
}

.pnl-products-table__group-badge--c {
  background: #e2e8f0;
  color: #334155;
}

.pnl-products-table__group-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.1rem;
}

.pnl-products-table__group-description {
  overflow: hidden;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pnl-products-table__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding: 0.68rem 0.86rem !important;
  color: #0f172a;
}

.pnl-products-table .pnl-page__cell-value {
  font-size: 0.88rem;
  line-height: 1.06;
}

.pnl-products-table .pnl-page__cell-share {
  font-size: 0.72rem;
  line-height: 1.02;
  margin-top: 0.08rem;
  font-weight: 600;
}

.pnl-products-table__total-cell {
  font-weight: 700;
  border-left: 1px solid #dbe3ef;
  background-image: linear-gradient(90deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0));
}

.pnl-products-table__row--unallocated td {
  background: #fef3c7;
  border-top: 1px solid #fcd34d;
}

.pnl-products-table__row--footer td {
  background: #f8fafc;
}

.pnl-products-table__row--footer .pnl-products-table__product-cell--sticky {
  background: #f8fafc;
}

.pnl-products-table__row--unallocated-detail td {
  background: #fffbeb;
}

.pnl-products-table__row--unallocated-detail .pnl-products-table__product-cell--sticky {
  background: #fffbeb;
}

.pnl-products-table__product-name--indent {
  padding-left: 1.5rem;
  font-weight: 500;
}

.pnl-products-table__row--profit-by-products td {
  background: linear-gradient(90deg, #ecfdf5 0%, #d1fae5 100%);
  border-top: 1px solid #6ee7b7;
  font-weight: 600;
}

.pnl-products-table__row--profit-by-products .pnl-products-table__product-cell--sticky {
  background: linear-gradient(90deg, #ecfdf5 0%, #d1fae5 100%);
}

.pnl-products-table__row--profit-total td {
  background: linear-gradient(90deg, #ecfdf5 0%, #d1fae5 100%);
  border-top: 2px solid #10b981;
  font-weight: 700;
}

.pnl-products-table__row--profit-total .pnl-products-table__product-cell--sticky {
  background: linear-gradient(90deg, #ecfdf5 0%, #d1fae5 100%);
}

/* PnL по товарам: панель в шапке с 5 метриками */
.pnl-products-page .pnl-page__hero-panel-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1200px) {
  .pnl-products-page .pnl-page__hero-panel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Скелетон загрузки */
.pnl-products-skeleton {
  padding: 1rem 0;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.pnl-products-skeleton__head,
.pnl-products-skeleton__row {
  height: 2.75rem;
  margin: 0 1rem;
  border-radius: 0.5rem;
  background: linear-gradient(
    90deg,
    #e2e8f0 0%,
    #f1f5f9 45%,
    #e2e8f0 100%
  );
  background-size: 200% 100%;
  animation: pnl-products-skeleton-shine 1.2s ease-in-out infinite;
}

.pnl-products-skeleton__head {
  height: 3rem;
  margin-bottom: 0.5rem;
  max-width: 100%;
}

.pnl-products-skeleton__row {
  margin-top: 0.35rem;
}

.pnl-products-skeleton__row--short {
  max-width: 70%;
}

@keyframes pnl-products-skeleton-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.pnl-page__cell-title {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.pnl-page__row-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--pnl-text);
}

.pnl-page__row-hint,
.pnl-page__row-meta {
  color: var(--pnl-text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.pnl-page__row-hint-link {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.pnl-page__row-hint-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.pnl-page__row-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 0.45rem;
}

.pnl-page__cell-value,
.pnl-page__cell-share {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pnl-page__cell-value {
  color: var(--pnl-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.pnl-page__cell-value--positive {
  color: var(--pnl-positive);
}

.pnl-page__cell-value--negative {
  color: var(--pnl-negative);
}

.pnl-page__cell-share {
  color: var(--pnl-text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.pnl-page__chevron {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(-45deg);
  transition: transform var(--pnl-transition), border-color var(--pnl-transition);
}

.pnl-page__row--interactive:hover .pnl-page__chevron {
  border-color: #1d4ed8;
}

.pnl-page__chevron.is-open {
  transform: rotate(45deg);
}

.pnl-page__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 4rem 2rem;
  color: var(--pnl-text-muted);
  text-align: center;
}

.pnl-page__empty-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(59,130,246,0.18) 0%, rgba(59,130,246,0.08) 100%);
  position: relative;
}

.pnl-page__empty-icon::before,
.pnl-page__empty-icon::after {
  content: "";
  position: absolute;
  bottom: 0.8rem;
  width: 0.42rem;
  border-radius: 999px;
  background: #3b82f6;
}

.pnl-page__empty-icon::before {
  left: 0.85rem;
  height: 1rem;
  box-shadow: 0.72rem -0.32rem 0 0 #60a5fa, 1.44rem -0.7rem 0 0 #93c5fd;
}

.pnl-page__empty-icon::after {
  display: none;
}

.pnl-page__empty-title {
  color: var(--pnl-text);
  font-size: 1.02rem;
  font-weight: 700;
}

.pnl-page__empty-text {
  max-width: 28rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (max-width: 1120px) {
  .pnl-page__hero-grid,
  .pnl-page__kpi-row,
  .pnl-page__overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .pnl-page__hero,
  .pnl-page__overview,
  .pnl-page__body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pnl-page__kpi-row {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pnl-page__hero-grid,
  .pnl-page__kpi-row,
  .pnl-page__overview-grid {
    grid-template-columns: 1fr;
  }

  .pnl-page__toolbar {
    position: static;
    margin: 1rem 1rem 0;
  }

  .pnl-page__toolbar-main,
  .pnl-page__toolbar-actions,
  .pnl-page__field--wide,
  .pnl-page__period {
    width: 100%;
  }

  .pnl-page__toolbar-actions {
    margin-left: 0;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .pnl-page__btn-refresh,
  .pnl-page__link {
    width: 100%;
    justify-content: center;
  }

  .pnl-page__section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .pnl-page__section-note {
    text-align: left;
    max-width: none;
  }

  .pnl-page__table th,
  .pnl-page__table td {
    padding: 0.82rem 0.8rem;
  }

  /* PnL products mobile: keep first column fully pinned while horizontal scrolling */
  .pnl-products-page .pnl-products-table {
    --pnl-products-col-w: 300px;
  }

  .pnl-products-page__fixed-head .pnl-products-table {
    --pnl-products-col-w: 300px;
  }

  .pnl-products-page .pnl-products-table__product-col--sticky,
  .pnl-products-page .pnl-products-table__product-cell--sticky {
    position: sticky !important;
    left: 0;
    z-index: 24;
    box-sizing: border-box;
    overflow: hidden;
    background-clip: padding-box;
    box-shadow: none;
    border-right: 1px solid #dbe3ef;
    transform: translateZ(0);
  }

  .pnl-products-page .pnl-products-table th.pnl-products-table__product-col--sticky {
    width: var(--pnl-products-col-w);
    min-width: var(--pnl-products-col-w);
    max-width: var(--pnl-products-col-w);
  }

  .pnl-products-page .pnl-products-table th:first-child,
  .pnl-products-page .pnl-products-table td:first-child,
  .pnl-products-page__fixed-head .pnl-products-table th:first-child {
    width: var(--pnl-products-col-w) !important;
    min-width: var(--pnl-products-col-w) !important;
    max-width: var(--pnl-products-col-w) !important;
    box-shadow: none !important;
    border-right: 1px solid #dbe3ef;
  }

  .pnl-products-page .pnl-products-table .pnl-products-table__period-col,
  .pnl-products-page .pnl-products-table .pnl-products-table__total-col,
  .pnl-products-page__fixed-head .pnl-products-table .pnl-products-table__period-col,
  .pnl-products-page__fixed-head .pnl-products-table .pnl-products-table__total-col {
    min-width: 0;
    max-width: none;
  }

  .pnl-products-page .pnl-products-table th.pnl-products-table__product-col--sticky {
    z-index: 28;
    background: #f8fafc;
  }

  .pnl-products-page .pnl-products-table-wrap {
    position: relative;
    isolation: isolate;
    -webkit-overflow-scrolling: touch;
  }

  .pnl-products-page .pnl-products-table__bc-toggle {
    align-items: flex-start;
  }

  .pnl-products-page .pnl-products-table__bc-toggle-icon {
    margin-top: 0.08rem;
  }

  .pnl-products-page .pnl-products-table__product-cell--sticky .pnl-products-table__product-name {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.22;
  }

  .pnl-products-page .pnl-products-table__row--a-summary .pnl-products-table__product-cell--sticky,
  .pnl-products-page .pnl-products-table__row--b-summary .pnl-products-table__product-cell--sticky,
  .pnl-products-page .pnl-products-table__row--c-summary .pnl-products-table__product-cell--sticky {
    z-index: 30;
  }

  .pnl-products-page .pnl-products-table__row--a-detail .pnl-products-table__product-cell--sticky,
  .pnl-products-page .pnl-products-table__row--b-detail .pnl-products-table__product-cell--sticky,
  .pnl-products-page .pnl-products-table__row--c-detail .pnl-products-table__product-cell--sticky {
    justify-content: center;
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
    gap: 0;
  }

  .pnl-products-page .pnl-products-table__group-name-full {
    display: none;
  }

  .pnl-products-page .pnl-products-table__group-name-short {
    display: inline;
    font-weight: 700;
    letter-spacing: 0.01em;
  }

  .pnl-products-page .pnl-products-table__row--a-detail .pnl-products-table__product-name,
  .pnl-products-page .pnl-products-table__row--b-detail .pnl-products-table__product-name,
  .pnl-products-page .pnl-products-table__row--c-detail .pnl-products-table__product-name {
    display: none;
  }

  .pnl-products-page .pnl-products-table__row--a-detail .pnl-products-table__product-meta,
  .pnl-products-page .pnl-products-table__row--b-detail .pnl-products-table__product-meta,
  .pnl-products-page .pnl-products-table__row--c-detail .pnl-products-table__product-meta,
  .pnl-products-page .pnl-products-table__row--a-detail .pnl-products-table__product-sku,
  .pnl-products-page .pnl-products-table__row--b-detail .pnl-products-table__product-sku,
  .pnl-products-page .pnl-products-table__row--c-detail .pnl-products-table__product-sku {
    display: none !important;
  }

  .pnl-products-page .pnl-products-table__row--a-detail .pnl-products-table__product-thumb,
  .pnl-products-page .pnl-products-table__row--b-detail .pnl-products-table__product-thumb,
  .pnl-products-page .pnl-products-table__row--c-detail .pnl-products-table__product-thumb {
    width: 1.8rem;
    height: 2.45rem;
  }

  .pnl-products-page .pnl-products-filters {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .pnl-products-page .pnl-products-filters__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "period search"
      "quick group"
      "metric metric";
  }

  .pnl-products-page .pnl-products-table {
    --pnl-products-col-w: 300px;
  }

  .pnl-products-page__fixed-head .pnl-products-table {
    --pnl-products-col-w: 300px;
  }

  .pnl-products-page .pnl-products-table .pnl-products-table__period-col,
  .pnl-products-page__fixed-head .pnl-products-table .pnl-products-table__period-col {
    min-width: 0;
    max-width: none;
  }

  .pnl-products-page .pnl-products-table .pnl-products-table__total-col,
  .pnl-products-page__fixed-head .pnl-products-table .pnl-products-table__total-col {
    min-width: 0;
    max-width: none;
  }

  .pnl-products-page .pnl-products-table__row--a-detail .pnl-products-table__product-cell--sticky,
  .pnl-products-page .pnl-products-table__row--b-detail .pnl-products-table__product-cell--sticky,
  .pnl-products-page .pnl-products-table__row--c-detail .pnl-products-table__product-cell--sticky {
    justify-content: initial;
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
  }

  .pnl-products-page .pnl-products-table__row--a-detail .pnl-products-table__product-name,
  .pnl-products-page .pnl-products-table__row--b-detail .pnl-products-table__product-name,
  .pnl-products-page .pnl-products-table__row--c-detail .pnl-products-table__product-name {
    display: block;
  }

  .pnl-products-page .pnl-products-table__row--a-detail .pnl-products-table__product-meta,
  .pnl-products-page .pnl-products-table__row--b-detail .pnl-products-table__product-meta,
  .pnl-products-page .pnl-products-table__row--c-detail .pnl-products-table__product-meta {
    display: flex !important;
  }

  .pnl-products-page .pnl-products-table__row--a-detail .pnl-products-table__product-sku,
  .pnl-products-page .pnl-products-table__row--b-detail .pnl-products-table__product-sku,
  .pnl-products-page .pnl-products-table__row--c-detail .pnl-products-table__product-sku {
    display: block !important;
  }
}

@media (max-width: 860px) {
  .pnl-report-page .pnl-page__alert,
  .pnl-report-page .pnl-page__toolbar {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .pnl-report-page .pnl-page__kpi-row,
  .pnl-report-page .pnl-page__overview,
  .pnl-report-page .pnl-page__body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pnl-report-page .pnl-page__toolbar-main {
    width: 100%;
    gap: 0.75rem;
    align-items: stretch;
  }

  .pnl-report-page .pnl-page__field,
  .pnl-report-page .pnl-page__field--wide {
    width: 100%;
    min-width: 0;
  }

  .pnl-report-page .pnl-page__pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
  }

  .pnl-report-page .pnl-page__pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .pnl-report-page .pnl-page__table th:first-child,
  .pnl-report-page .pnl-page__table td:first-child {
    width: 35vw;
    min-width: 35vw;
    max-width: 35vw;
  }

  .pnl-report-page .pnl-page__cell-title {
    min-width: 0;
  }

  .pnl-report-page .pnl-page__cell-title > strong,
  .pnl-report-page .pnl-page__cell-title > span,
  .pnl-report-page .pnl-page__row-main > strong,
  .pnl-report-page .pnl-page__row-main > span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .pnl-report-page .pnl-page__row-meta {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .pnl-products-articles-page .pnl-page__alert,
  .pnl-products-articles-page .pnl-page__toolbar {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .pnl-products-articles-page .pnl-page__kpi-row,
  .pnl-products-articles-page .pnl-page__overview,
  .pnl-products-articles-page .pnl-page__body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pnl-products-articles-page .pnl-page__toolbar-main {
    width: 100%;
    gap: 0.75rem;
    align-items: stretch;
  }

  .pnl-products-articles-page .pnl-page__field,
  .pnl-products-articles-page .pnl-page__field--wide {
    width: 100%;
    min-width: 0;
  }

  .pnl-products-articles-page .pnl-page__pills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0.45rem;
  }

  .pnl-products-articles-page .pnl-page__pill {
    width: 100%;
    text-align: center;
    white-space: nowrap;
  }

  .pnl-products-page .pnl-page__alert,
  .pnl-products-page .pnl-products-filters {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .pnl-products-page .pnl-page__body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pnl-products-page .pnl-products-filters {
    position: static;
    padding: 0.82rem;
  }

  .pnl-products-page .pnl-products-filters__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "period"
      "quick"
      "group"
      "search"
      "metric";
  }

  .pnl-products-page .pnl-products-filters .pnl-page__pills,
  .pnl-products-page .pnl-products-filters__card--metric .pnl-page__pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pnl-products-page .pnl-products-table,
  .pnl-products-page__fixed-head .pnl-products-table {
    --pnl-products-col-w: calc((100vw - 2rem) * 0.25);
  }

  .pnl-products-page .pnl-products-table th.pnl-products-table__product-col--sticky,
  .pnl-products-page__fixed-head .pnl-products-table th.pnl-products-table__product-col--sticky {
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .pnl-products-page .pnl-products-table__product-cell {
    padding: 0.48rem 0.32rem !important;
  }

  .pnl-products-page .pnl-products-table__product-content {
    justify-content: center;
    gap: 0;
  }

  .pnl-products-page .pnl-products-table__row--a-detail .pnl-products-table__product-meta,
  .pnl-products-page .pnl-products-table__row--b-detail .pnl-products-table__product-meta,
  .pnl-products-page .pnl-products-table__row--c-detail .pnl-products-table__product-meta,
  .pnl-products-page .pnl-products-table__group-text,
  .pnl-products-page .pnl-products-table__group-description {
    display: none !important;
  }

  .pnl-products-page .pnl-products-table__bc-toggle {
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
  }

  .pnl-products-page .pnl-products-table__bc-toggle-icon {
    width: 0.46rem;
    height: 0.46rem;
    margin-top: 0;
  }

  .pnl-products-page .pnl-products-table__group-badge {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
  }

  .pnl-products-page .pnl-products-table__product-thumb {
    width: min(2rem, calc(var(--pnl-products-col-w) - 0.72rem));
    height: min(2.45rem, calc((var(--pnl-products-col-w) - 0.72rem) * 1.34));
    border-radius: 0.52rem;
  }

  .pnl-products-articles-page .pnl-page__products-strip {
    gap: 0.55rem;
    padding: 0.35rem;
  }

  .pnl-products-articles-page .pnl-page__product-card {
    min-width: 76px;
    max-width: 84px;
    padding: 0.38rem;
  }

  .pnl-products-articles-page .pnl-page__product-card--top6 {
    min-width: 66px;
    max-width: 72px;
    padding: 0.32rem;
    gap: 0.22rem;
  }

  .pnl-products-articles-page .pnl-page__product-card-name {
    font-size: 0.68rem;
  }

  .pnl-products-articles-page .pnl-page__product-card-sku {
    font-size: 0.64rem;
  }

  .pnl-products-articles-page .pnl-page__products-more {
    min-width: 0;
    padding: 0.38rem 0.72rem;
    font-size: 0.74rem;
  }

  .pnl-products-articles-page .pnl-page__products-more--top6 {
    min-width: 84px;
    padding: 0.32rem 0.56rem;
    font-size: 0.72rem;
  }

  .pnl-products-articles-page .pnl-page__table th,
  .pnl-products-articles-page .pnl-page__table td {
    padding: 0.72rem 0.65rem;
  }

  .pnl-products-articles-page__fixed-head .pnl-page__table--fixed-head th {
    padding: 0.72rem 0.65rem;
  }

  .pnl-products-articles-page .pnl-page__table th:first-child,
  .pnl-products-articles-page .pnl-page__table td:first-child {
    width: 35vw;
    min-width: 35vw;
    max-width: 35vw;
  }

  .pnl-products-articles-page__fixed-head .pnl-page__table--fixed-head th:first-child {
    width: 35vw;
    min-width: 35vw;
    max-width: 35vw;
  }

  .pnl-products-articles-page .pnl-page__cell-value {
    font-size: 0.82rem;
  }

  .pnl-products-articles-page .pnl-page__cell-share {
    font-size: 0.72rem;
  }

  .pnl-products-articles-page .pnl-page__row--tax-configurable td:first-child .pnl-page__row-main {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.28rem;
  }

  .pnl-products-articles-page .pnl-page__row--tax-configurable td:first-child .pnl-page__row-main > strong {
    width: 100%;
    min-width: 0;
  }

  .pnl-products-articles-page .pnl-page__row-action-hint {
    font-size: 0.64rem;
    line-height: 1;
    padding: 0.23rem 0.45rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #f8fafc;
  }

  .pnl-modal__dialog {
    width: min(96vw, 960px);
    margin: 2vh auto;
    padding: 1rem 1rem 1.1rem;
    max-height: 95vh;
  }

  .pnl-modal__grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 0.65rem;
  }

  .pnl-products-articles-page .pnl-modal__dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: calc(0.9rem + env(safe-area-inset-top)) 0.92rem calc(0.92rem + env(safe-area-inset-bottom));
    gap: 0.75rem;
  }

  .pnl-products-articles-page .pnl-modal__header {
    align-items: center;
  }

  .pnl-products-articles-page .pnl-modal__title {
    font-size: 1.08rem;
  }

  .pnl-products-articles-page .pnl-modal__subtitle {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .pnl-products-articles-page .pnl-modal__close {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    font-size: 1.32rem;
  }

  .pnl-products-articles-page .pnl-modal__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.62rem;
    padding-bottom: 1.1rem;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .pnl-report-page .costs-page__header {
    padding: 1.2rem 0.84rem 0.8rem;
  }

  .pnl-report-page .pnl-page__alert,
  .pnl-report-page .pnl-page__toolbar {
    margin-left: 0.84rem;
    margin-right: 0.84rem;
  }

  .pnl-report-page .pnl-page__kpi-row,
  .pnl-report-page .pnl-page__overview,
  .pnl-report-page .pnl-page__body {
    padding-left: 0.84rem;
    padding-right: 0.84rem;
  }

  .pnl-report-page .pnl-page__toolbar-block--period .pnl-page__period {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .pnl-report-page .pnl-page__toolbar-block--period .pnl-page__sep {
    display: none;
  }

  .pnl-report-page .pnl-page__table th:first-child,
  .pnl-report-page .pnl-page__table td:first-child {
    width: 35vw;
    min-width: 35vw;
    max-width: 35vw;
  }

  .pnl-report-page .pnl-page__table th,
  .pnl-report-page__fixed-head .pnl-page__table--fixed-head th {
    font-size: 0.66rem;
    letter-spacing: 0.07em;
  }

  .pnl-report-page .pnl-page__table td,
  .pnl-report-page .pnl-page__cell-value,
  .pnl-report-page .pnl-page__cell-share,
  .pnl-report-page .pnl-page__row-meta,
  .pnl-report-page .pnl-page__row-badge {
    font-size: 0.66rem;
    line-height: 1.25;
  }

  .pnl-products-articles-page .pnl-page__toolbar-block--period .pnl-page__period {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .pnl-products-articles-page .pnl-page__toolbar-block--period .pnl-page__sep {
    display: none;
  }

  .pnl-products-articles-page .pnl-page__table th:first-child,
  .pnl-products-articles-page .pnl-page__table td:first-child {
    width: 35vw;
    min-width: 35vw;
    max-width: 35vw;
  }

  .pnl-products-articles-page__fixed-head .pnl-page__table--fixed-head th:first-child {
    width: 35vw;
    min-width: 35vw;
    max-width: 35vw;
  }

  .pnl-products-articles-page .pnl-page__table th {
    font-size: 0.66rem;
    letter-spacing: 0.07em;
  }

  .pnl-products-articles-page .pnl-page__table td,
  .pnl-products-articles-page .pnl-page__cell-value,
  .pnl-products-articles-page .pnl-page__cell-share,
  .pnl-products-articles-page .pnl-page__row-meta,
  .pnl-products-articles-page .pnl-page__row-badge {
    font-size: 0.66rem;
    line-height: 1.25;
  }

  .pnl-products-articles-page__fixed-head .pnl-page__table--fixed-head th {
    font-size: 0.66rem;
    letter-spacing: 0.07em;
  }

  .pnl-products-articles-page .pnl-page__row-action-hint {
    font-size: 0.6rem;
    padding: 0.2rem 0.38rem;
    border-radius: 0.45rem;
  }
}

/* ========== Dashboard Ref (референс главной) ========== */
.ref-wrap {
  --ref-blue: #2563eb;
  --ref-blue-light: #3b82f6;
  --ref-bg: #f4f4f5;
  --ref-card-radius: 24px;
  --ref-small-radius: 12px;
  --ref-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --ref-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  min-height: 100%;
  background: var(--ref-bg);
}

.ref-card {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--mpb-white);
  border-radius: var(--ref-card-radius);
  box-shadow: var(--ref-shadow);
  overflow: hidden;
}

.ref-hero {
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, #1e3a8a 0%, var(--ref-blue) 50%, #3b82f6 100%);
  color: white;
}

.ref-hero-inner { max-width: 42rem; }

.ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.95;
  margin-bottom: 1rem;
}

.ref-badge svg { width: 1rem; height: 1rem; }

.ref-hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.ref-hero-desc {
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  opacity: 0.95;
}

.ref-hero-desc strong { font-weight: 700; }

.ref-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.ref-cta:hover { background: rgba(255, 255, 255, 0.35); }

.ref-cta svg { width: 1.125rem; height: 1.125rem; }

.ref-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--mpb-gray-100);
  flex-wrap: wrap;
}

.ref-tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: 10px;
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-700);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ref-tab:hover { background: var(--mpb-gray-200); }

.ref-tab.is-active {
  background: var(--mpb-gray-900);
  color: white;
}

.ref-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  padding: 1.5rem 2rem;
}

@media (max-width: 768px) {
  .ref-cards { grid-template-columns: 1fr; }
}

.ref-small-card {
  background: var(--mpb-white);
  border-radius: var(--ref-small-radius);
  padding: 1.25rem;
  box-shadow: var(--ref-shadow-card);
  border: 1px solid var(--mpb-gray-100);
}

.ref-small-card--wide { grid-column: 1 / -1; }

.ref-small-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.ref-small-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--mpb-gray-900);
  margin: 0;
  letter-spacing: -0.02em;
}

.ref-small-card-about {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mpb-gray-500);
}

.ref-small-card-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ref-blue);
}

.ref-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--mpb-gray-900);
  margin: 0 0 0.25rem;
}

.ref-value--big { font-size: 1.5rem; font-weight: 700; }

.ref-meta {
  font-size: 0.8125rem;
  color: var(--mpb-gray-500);
  margin: 0 0 1rem;
}

.ref-chart-inline {
  height: 220px;
  margin: 0.5rem 0 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.ref-placeholder {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--mpb-gray-400);
  background: var(--mpb-gray-50);
  border-radius: 8px;
  margin: 0.5rem 0 1rem;
}

.ref-card-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.ref-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.ref-btn--primary {
  background: #2563eb;
  color: white;
}

.ref-btn--primary:hover:not(:disabled) { background: #1d4ed8; }

.ref-btn--primary:disabled { opacity: 0.7; cursor: not-allowed; }

.ref-btn--secondary {
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-700);
}

.ref-btn--secondary:hover { background: var(--mpb-gray-200); }

.ref-btn--full { width: 100%; justify-content: center; margin-top: 0.5rem; }

.ref-btn svg { width: 1rem; height: 1rem; }

.ref-progress-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--mpb-gray-800);
  margin: 0 0 0.5rem;
}

.ref-progress-bar {
  height: 8px;
  background: var(--mpb-gray-100);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.ref-progress-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.ref-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.ref-tag {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-700);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ref-tag:hover { background: var(--mpb-gray-200); }

.ref-tag.is-active {
  background: var(--mpb-gray-900);
  color: white;
}

.ref-tag--grey {
  background: var(--mpb-gray-100);
  color: var(--mpb-gray-600);
  cursor: default;
}

.ref-circle-wrap { text-align: center; padding: 0.5rem 0; }

.ref-circle {
  --p: 0;
  width: 120px;
  height: 120px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: conic-gradient(#2563eb calc(var(--p) * 3.6deg), var(--mpb-gray-200) 0);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ref-circle::after {
  content: "";
  position: absolute;
  inset: 10px;
  background: var(--mpb-white);
  border-radius: 50%;
}

.ref-circle-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--mpb-gray-900);
  z-index: 1;
}

.ref-circle-label { font-size: 0.8125rem; color: var(--mpb-gray-500); margin: 0; }

.ref-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #2563eb;
  color: white;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.ref-icon-btn:hover { background: #1d4ed8; }

.ref-main-chart {
  border-top: 1px solid var(--mpb-gray-100);
  padding: 1.5rem 2rem;
}

.ref-main-chart-head { margin-bottom: 1rem; }

.ref-main-chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--mpb-gray-900);
  margin: 0 0 0.25rem;
}

.ref-main-chart-desc { font-size: 0.8125rem; color: var(--mpb-gray-500); margin: 0; }

.ref-main-chart-body { min-height: 200px; }

.ref-chart-wrap { border-radius: var(--ref-small-radius); overflow: hidden; }

.ref-alert { padding: 0.875rem 1rem; border-radius: 10px; font-size: 0.875rem; }

.ref-alert--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.ref-alert--empty {
  background: var(--mpb-gray-50);
  color: var(--mpb-gray-600);
  border: 1px solid var(--mpb-gray-200);
}

.ref-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--mpb-gray-100);
}

.ref-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--mpb-white);
  border: 1px solid var(--mpb-gray-200);
  border-radius: 10px;
  color: var(--mpb-gray-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ref-quick-link:hover {
  background: var(--mpb-gray-50);
  border-color: #2563eb;
  color: #2563eb;
}

.ref-quick-link svg { width: 1.125rem; height: 1.125rem; }

/* ═══════════════════════════════════════════════════
   DATA UPDATES PAGE  /account/data-updates
   ═══════════════════════════════════════════════════ */

.du-page {
  min-height: 100vh;
  background: #f8fafc;
}

.data-updates-page.du-page {
  min-height: 0;
  background: transparent;
}

.data-updates-page .du-body {
  padding: 1.1rem 0 2rem;
}

.data-updates-page .du-settings-bar {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.data-updates-page .du-table-wrap {
  background: transparent;
  border: none;
  border-radius: 0;
}

.data-updates-page__header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.data-updates-page__header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* ── Hero ── */
.du-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  padding: 2rem 2.5rem 1.75rem;
}
.du-hero__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.du-hero__title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.3rem;
}
.du-hero__sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin: 0;
}
.du-hero__actions {
  display: flex;
  gap: 0.625rem;
  flex-shrink: 0;
}

/* ── Buttons ── */
.du-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s;
}
.du-btn--primary {
  background: #2563eb;
  color: #fff;
}
.du-btn--primary:hover { background: #1d4ed8; }
.du-btn--primary:disabled { opacity: 0.55; cursor: not-allowed; }
.du-btn--ghost {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.2);
}
.du-btn--ghost:hover { background: rgba(255,255,255,0.18); }

/* ── Body ── */
.du-body {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.75rem 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* ── Config bar ── */
.du-config-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
}
.du-config-bar__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}
.du-config-bar__select {
  flex: 1;
  max-width: 420px;
  padding: 0.4rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #1f2937;
  background: #f9fafb;
}

/* ── Alert ── */
.du-alert {
  padding: 0.875rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
}
.du-alert--warn {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}

/* ── Section ── */
.du-section {}
.du-section__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.du-section__cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}

/* ── Table ── */
.du-table-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.du-table {
  width: 100%;
  border-collapse: collapse;
}
.du-th {
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  background: #f9fafb;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}
.du-th--name  { width: 18%; }
.du-th--freq  { width: 14%; }
.du-th--ts    { width: 17%; }
.du-th--count { width: 9%; text-align: right; }
.du-th--action { width: 18%; text-align: right; }

.du-tr {
  transition: background 0.1s;
}
.du-tr:hover { background: #fafafa; }
.du-tr--ok    { background: #f0fdf4 !important; }
.du-tr--error { background: #fff5f5 !important; }
.du-tr + .du-tr { border-top: 1px solid #f3f4f6; }

.du-td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}
.du-td--name  { font-weight: 600; }
.du-td--desc  { color: #6b7280; font-size: 0.825rem; }
.du-td--count { text-align: right; }
.du-td--action { text-align: right; }

/* ── Name + badge ── */
.du-method-name { display: inline; margin-right: 0.4rem; }
.du-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.du-badge--api {
  background: #eff6ff;
  color: #2563eb;
}

/* ── Freq / timestamp ── */
.du-freq {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 0.775rem;
  color: #6b7280;
  font-weight: 500;
}
.du-ts {
  font-size: 0.825rem;
  color: #374151;
  font-variant-numeric: tabular-nums;
}
.du-ts--none {
  color: #d1d5db;
  font-size: 0.825rem;
}
.du-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: #374151;
}

/* ── Action cell ── */
.du-action-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.du-run-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: none;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s, opacity 0.15s;
  white-space: nowrap;
}
.du-run-btn--idle {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
}
.du-run-btn--idle:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}
.du-run-btn--running {
  background: #e5e7eb;
  color: #6b7280;
  cursor: wait;
}
.du-run-btn--ok {
  background: #dcfce7;
  color: #16a34a;
}
.du-run-btn--error {
  background: #fee2e2;
  color: #dc2626;
}
.du-run-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.du-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #9ca3af;
  border-top-color: #374151;
  border-radius: 50%;
  animation: du-spin 0.7s linear infinite;
}
@keyframes du-spin { to { transform: rotate(360deg); } }

.du-msg {
  font-size: 0.775rem;
  font-weight: 500;
  max-width: 160px;
  text-align: right;
}
.du-msg--ok    { color: #16a34a; }
.du-msg--error { color: #dc2626; }

/* ── Settings bar (du-page) ── */
.du-settings-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  align-items: flex-end;
}
.du-settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.du-settings-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}
.du-settings-select {
  padding: 0.45rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  font-size: 0.875rem;
  color: #1f2937;
  background: #f9fafb;
  min-width: 260px;
}
.du-settings-input {
  padding: 0.45rem 0.7rem;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  font-size: 0.875rem;
  color: #1f2937;
  background: #f9fafb;
}
.du-file-input {
  font-size: 0.8125rem;
  max-width: 100%;
  cursor: pointer;
  color: transparent; /* скрываем стандартный текст "Файл не выбран" */
}
.du-file-input::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.du-file-input:hover::file-selector-button {
  background: #eef2ff;
  border-color: #c4b5fd;
  box-shadow: 0 2px 6px rgba(129, 140, 248, 0.25);
  transform: translateY(-0.5px);
}

.du-upload-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
.du-upload-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.du-file-label {
  font-size: 0.75rem;
  color: #6b7280;
}
.du-file-hint {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
}
.du-file-hint--ready {
  color: #2563eb;
}
.du-file-hint--error {
  color: #dc2626;
}
.du-settings-empty {
  font-size: 0.875rem;
  color: #9ca3af;
  padding: 0.45rem 0;
}
.du-date-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.du-date-sep { color: #9ca3af; font-size: 0.875rem; }

/* ── Name with badges ── */
.du-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.du-badges { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.du-badge--dates {
  background: #f0fdf4;
  color: #15803d;
}

/* ── Run button loading state ── */
.du-run-btn--running {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 980px) {
  .data-updates-page .du-body {
    padding: 0.9rem 0 1.35rem;
    gap: 1rem;
  }

  .data-updates-page__header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .data-updates-page__header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .data-updates-page__header-actions .mpb-btn-primary,
  .data-updates-page__header-actions .mpb-btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .du-settings-bar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    padding: 0.65rem 0;
  }

  .du-settings-group {
    width: 100%;
  }

  .du-date-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
  }

  .du-settings-input {
    width: 100%;
    min-width: 0;
  }

  .data-updates-page .du-table-wrap {
    overflow: visible !important;
  }

  .data-updates-page .du-table {
    width: 100% !important;
    table-layout: auto !important;
  }

  .data-updates-page .du-table thead {
    display: none;
  }

  .data-updates-page .du-table tbody {
    display: block;
  }

  .data-updates-page .du-tr {
    display: block;
    margin-bottom: 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    overflow: hidden;
    background: #fff;
  }

  .data-updates-page .du-tr + .du-tr {
    border-top: 1px solid #e2e8f0;
  }

  .data-updates-page .du-td {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.24rem;
    padding: 0.62rem 0.72rem;
    border-top: 1px solid #f1f5f9;
    text-align: left !important;
  }

  .data-updates-page .du-td:first-child {
    border-top: none;
  }

  .data-updates-page .du-td::before {
    content: attr(data-label);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    line-height: 1.15;
  }

  .data-updates-page .du-td--desc {
    font-size: 0.79rem;
    line-height: 1.38;
  }

  .data-updates-page .du-action-cell {
    width: 100%;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.45rem;
  }

  .data-updates-page .du-upload-cell,
  .data-updates-page .du-upload-main {
    width: 100%;
  }

  .data-updates-page .du-upload-main {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .data-updates-page .du-file-input {
    width: 100%;
  }

  .data-updates-page .du-run-btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .data-updates-page .du-msg {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .data-updates-page__header-actions {
    grid-template-columns: 1fr;
  }

  .du-date-row {
    grid-template-columns: 1fr;
    gap: 0.42rem;
  }

  .du-date-sep {
    display: none;
  }
}

/* ── Inventory movement: unified hero color ── */
.sup-page .costs-page__header {
  background: var(--mpb-inventory-hero-bg);
}

.sup-page .costs-page__header::before {
  display: none;
}

.suppliers-page .costs-header,
.warehouse-page .costs-header,
.suppliers-detail-page .costs-header,
.supplies-bundles-page .costs-header,
.supplies-details-page .costs-header {
  position: relative;
  padding: 2rem 2.25rem 1.75rem;
  background: var(--mpb-inventory-hero-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  overflow: hidden;
}

.suppliers-page .costs-header::before,
.warehouse-page .costs-header::before,
.suppliers-detail-page .costs-header::before,
.supplies-bundles-page .costs-header::before,
.supplies-details-page .costs-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 55%);
  pointer-events: none;
}

.suppliers-page .costs-header > *,
.warehouse-page .costs-header > *,
.suppliers-detail-page .costs-header > *,
.supplies-bundles-page .costs-header > *,
.supplies-details-page .costs-header > * {
  position: relative;
  z-index: 1;
}

.suppliers-page .costs-header .mpb-section-title,
.warehouse-page .costs-header .mpb-section-title,
.suppliers-detail-page .costs-header .mpb-section-title,
.supplies-bundles-page .costs-header .mpb-section-title,
.supplies-details-page .costs-header .mpb-section-title {
  color: #fff;
}

.suppliers-page .costs-header .mpb-section-desc,
.warehouse-page .costs-header .mpb-section-desc,
.suppliers-detail-page .costs-header .mpb-section-desc,
.supplies-bundles-page .costs-header .mpb-section-desc,
.supplies-details-page .costs-header .mpb-section-desc,
.suppliers-detail-page .costs-header .mpb-muted {
  color: rgba(255, 255, 255, 0.84);
}

.suppliers-detail-page .costs-header .mpb-btn-secondary {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.suppliers-detail-page .costs-header .mpb-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
}

.suppliers-detail-page {
  margin: 0;
}

.suppliers-detail-page__shell {
  overflow: hidden;
  border: none;
  border-radius: 0;
  background: #f6f8fb;
  box-shadow: none;
}

.suppliers-detail-page__hero {
  padding-bottom: 2.15rem;
}

.suppliers-detail-page__hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 0.55rem;
}

.suppliers-detail-page__eyebrow {
  margin: 0 0 0.25rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.suppliers-detail-page__title {
  margin: 0;
  letter-spacing: 0;
}

.suppliers-detail-page__notes {
  max-width: 58rem;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
  line-height: 1.55;
}

.suppliers-detail-page__back-link {
  flex-shrink: 0;
  text-decoration: none;
}

.suppliers-detail-page__alert {
  margin: 1rem 1.75rem 0;
}

.suppliers-detail-page__overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(18rem, 1.2fr);
  gap: 0.75rem;
  padding: 1rem 1.75rem 0;
}

.suppliers-detail-page__stat,
.suppliers-detail-page__processing {
  min-height: 5.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.9rem 1rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.suppliers-detail-page__stat span,
.suppliers-detail-page__processing span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.suppliers-detail-page__stat strong,
.suppliers-detail-page__processing strong {
  display: block;
  margin-top: 0.3rem;
  color: #0f172a;
  font-size: 1.2rem;
  line-height: 1.2;
}

.suppliers-detail-page__processing {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.suppliers-detail-page__processing-edit {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.suppliers-detail-page__processing-edit input {
  width: 5.2rem;
  min-height: 2.18rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.48rem;
  padding: 0.4rem 0.55rem;
  color: #0f172a;
  font-weight: 800;
  text-align: right;
}

.suppliers-detail-page__section {
  margin: 1rem 1.75rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.suppliers-detail-page__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  border-bottom: 1px solid #e8eef6;
  padding: 0.9rem 1rem;
  background: #fbfdff;
}

.suppliers-detail-page__section-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.25;
}

.suppliers-detail-page__section-head p {
  margin: 0.22rem 0 0;
  color: #64748b;
  font-size: 0.8rem;
}

.suppliers-detail-page__attach-panel {
  margin: 0.85rem 1rem;
  border: 1px solid #dbeafe;
  border-radius: 0.65rem;
  background: #f8fbff;
  padding: 0.75rem;
}

.suppliers-detail-page__attach-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.suppliers-detail-page__attach-toolbar input {
  width: min(100%, 24rem);
  min-height: 2.25rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: #fff;
  color: #0f172a;
}

.suppliers-detail-page__attach-list {
  max-height: 18rem;
  overflow: auto;
  border: 1px solid #e5edf6;
  border-radius: 0.55rem;
  background: #fff;
}

.suppliers-detail-page__attach-list .mpb-table,
.suppliers-detail-page__table-wrap .mpb-table {
  min-width: 42rem;
}

.suppliers-detail-page__table-wrap {
  max-height: 22rem;
  overflow: auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.suppliers-detail-page__section .costs-table-wrap {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.suppliers-detail-page__section .mpb-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fbff;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.suppliers-detail-page__section .mpb-table td {
  vertical-align: middle;
}

.suppliers-detail-page__section .mpb-table th:first-child,
.suppliers-detail-page__section .mpb-table td:first-child {
  width: 5.2rem;
}

.suppliers-detail-page__section .mpb-table th:last-child,
.suppliers-detail-page__section .mpb-table td:last-child {
  width: 9rem;
  text-align: right;
}

.suppliers-detail-page__check {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  cursor: pointer;
}

.suppliers-detail-page__product-photo,
.suppliers-detail-page__product-placeholder {
  width: 2.4rem;
  height: 3.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.48rem;
  background: #f8fafc;
  object-fit: cover;
}

.suppliers-detail-page__product-placeholder {
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 800;
}

.suppliers-detail-page__product-photo--large,
.suppliers-detail-page__product-placeholder--large {
  width: 2.8rem;
  height: 3.55rem;
}

.suppliers-detail-page__hint {
  margin: 0.5rem 0 0;
  padding: 0 0.5rem 0.5rem;
  font-size: 0.78rem;
}

.suppliers-detail-page__status {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  border-radius: 999px;
  padding: 0.25rem 0.58rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.suppliers-detail-page__status--ordered,
.suppliers-detail-page__status--in_transit {
  background: #eff6ff;
  color: #1d4ed8;
}

.suppliers-detail-page__status--received {
  background: #ecfdf5;
  color: #047857;
}

.suppliers-detail-page__status--cancelled,
.suppliers-detail-page__status--written_off {
  background: #fef2f2;
  color: #b91c1c;
}

.suppliers-detail-page__purchase-link {
  display: inline-flex;
  text-decoration: none;
}

.suppliers-page .costs-toolbar .mpb-btn-primary {
  background: #047857;
  border-color: #047857;
}

.suppliers-page .costs-toolbar .mpb-btn-primary:hover {
  background: #065f46;
  border-color: #065f46;
}

.suppliers-partner-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.suppliers-partner-link__open,
.suppliers-partner-link__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.95rem;
  padding: 0 0.72rem;
  border-radius: 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.suppliers-partner-link__open {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.suppliers-partner-link__open:hover {
  background: #d1fae5;
}

.suppliers-partner-link__copy {
  border: 1px solid #dbe5f0;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.suppliers-partner-link__copy:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.supplier-partner-page {
  position: relative;
  min-height: 100vh;
  padding: 2rem 1rem 2.2rem;
  background: var(--mpb-gray-50);
}

.supplier-partner-page__bg {
  position: absolute;
  inset: 0 0 auto 0;
  height: 20rem;
  background:
    radial-gradient(58rem 22rem at 12% -18%, rgba(59, 130, 246, 0.09), transparent 58%),
    radial-gradient(46rem 18rem at 96% -14%, rgba(148, 163, 184, 0.14), transparent 62%),
    linear-gradient(180deg, #eef2f7, var(--mpb-gray-50) 52%, var(--mpb-gray-50));
  pointer-events: none;
}

.supplier-partner-page__container {
  position: relative;
  width: min(1100px, 100%);
  margin: 0 auto;
  z-index: 1;
}

.supplier-partner-page__hero {
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--mpb-gray-200);
  border-radius: 1.15rem;
  background: var(--mpb-white);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.supplier-partner-page__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mpb-primary);
}

.supplier-partner-page__title {
  margin: 0.55rem 0 0;
  color: var(--mpb-gray-900);
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.supplier-partner-page__notes {
  margin: 0.7rem 0 0;
  color: var(--mpb-gray-600);
  font-size: 0.93rem;
  line-height: 1.45;
}

.supplier-partner-page__meta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.supplier-partner-page__meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mpb-gray-700);
  background: var(--mpb-gray-50);
  border: 1px solid var(--mpb-gray-200);
}

.supplier-partner-page__state {
  margin-top: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: 0.95rem;
  background: var(--mpb-white);
  border: 1px solid var(--mpb-gray-200);
  color: var(--mpb-gray-600);
}

.supplier-partner-page__state--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.supplier-partner-page__content {
  margin-top: 1rem;
}

.supplier-partner-page__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.9rem;
}

.supplier-partner-card {
  grid-column: span 12;
  border: 1px solid var(--mpb-gray-200);
  border-radius: 1rem;
  background: var(--mpb-white);
  padding: 1rem 1.05rem;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}

.supplier-partner-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.supplier-partner-card__head h2 {
  margin: 0;
  color: var(--mpb-gray-900);
  font-size: 1rem;
}

/* Как у списка закупок (.purchases-page__status) */
.supplier-partner-card__status {
  display: inline-flex;
  align-items: center;
  min-height: 1.95rem;
  height: auto;
  padding: 0.36rem 0.62rem;
  border-radius: 0.62rem;
  border: none;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.supplier-partner-card__status--draft {
  background: #f1f5f9;
  color: #475569;
}

.supplier-partner-card__status--ordered,
.supplier-partner-card__status--in_transit {
  background: #eff6ff;
  color: #1d4ed8;
}

.supplier-partner-card__status--received {
  background: #ecfdf5;
  color: #047857;
}

.supplier-partner-card__status--paid {
  background: #fef9c3;
  color: #854d0e;
}

.supplier-partner-card__status--cancelled,
.supplier-partner-card__status--written_off {
  background: #ffe4e6;
  color: #be123c;
}

.supplier-partner-card__kpis {
  margin-top: 0.72rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 1.15rem;
}

.supplier-partner-card__kpis > div {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.supplier-partner-card__kpis > div:not(:first-child) {
  padding-left: 1rem;
  margin-left: 0.1rem;
  border-left: 1px solid #e2e8f0;
}

.supplier-partner-card__kpis .label {
  display: inline;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

.supplier-partner-card__kpis .label::after {
  content: "\00a0";
}

.supplier-partner-card__kpis .value {
  display: inline;
  margin-top: 0;
  font-size: 0.9rem;
  color: #0f172a;
  font-weight: 650;
}

.supplier-partner-card__products {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e5edf7;
}

.supplier-partner-card__products-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.supplier-partner-card__products-head h3 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.02em;
}

.supplier-partner-card__products-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
}

.supplier-partner-card__products-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.38rem 0.75rem;
  border-radius: 0.55rem;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.supplier-partner-card__products-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.supplier-partner-card__products-btn--primary {
  border-color: #93c5fd;
  background: var(--mpb-primary-light);
  color: var(--mpb-primary-hover);
}

.supplier-partner-card__products-btn--primary:hover {
  background: #bfdbfe;
  border-color: var(--mpb-primary);
  color: #1e3a8a;
}

.supplier-partner-card__products-copy-hint {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--mpb-primary-hover);
}

.supplier-partner-card__products-empty {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.supplier-partner-card__closing-section {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e5edf7;
}

.supplier-partner-card__closing-title {
  margin: 0 0 0.55rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.02em;
}

.supplier-partner-card__closing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.supplier-partner-card__closing-grid > .purchase-files__item {
  min-width: 0;
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
}

.supplier-partner-card__closing-payment-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  margin-top: 0.1rem;
  min-height: 0;
}

.supplier-partner-card__closing-other {
  margin-top: 0.75rem;
}

.supplier-partner-card__closing-grid .supplier-partner-card__payment-list {
  grid-template-columns: 1fr;
  max-height: 14rem;
}

.supplier-partner-card__payment-empty {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.supplier-partner-card__payment-badges {
  margin-bottom: 0.55rem;
}

.supplier-partner-card__payment-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.supplier-partner-card__payment-badge--ok {
  color: var(--mpb-primary-hover);
  background: var(--mpb-primary-light);
  border: 1px solid #bfdbfe;
}

.supplier-partner-card__payment-badge--plan {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.supplier-partner-card__payment-summary {
  margin: 0 0 0.5rem;
}

.supplier-partner-card__payment-list {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  max-height: 20rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
}

.supplier-partner-card__payment-list .purchase-files__payments-row {
  min-height: 2.45rem;
  align-items: start;
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(3.25rem, 4.8rem) 2.35rem;
  gap: 0.35rem;
}

.supplier-partner-card__payment-list .purchase-files__payments-amount {
  font-size: 0.74rem;
  text-align: right;
}

.supplier-partner-card__payment-list .purchase-files__payments-state {
  font-size: 0.68rem;
  padding: 0.12rem 0.28rem;
  border-radius: 0.35rem;
  justify-self: end;
}

.supplier-partner-card__payment-date-line {
  display: block;
}

.supplier-partner-card__payment-service {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.supplier-partner-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.5rem;
}

.supplier-partner-product {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-radius: 0.85rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.supplier-partner-product:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* Миниатюра: компактная (доп. −15% к предыдущему размеру) */
.supplier-partner-product__visual {
  position: relative;
  flex: 0 0 5.81rem;
  width: 5.81rem;
  aspect-ratio: 3 / 4;
  align-self: center;
  background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 55%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.supplier-partner-product__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0.36rem;
}

.supplier-partner-product__placeholder {
  width: 40%;
  height: 40%;
  border-radius: 0.45rem;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  opacity: 0.55;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) inset;
}

.supplier-partner-product__body {
  padding: 0.55rem 0.72rem 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: rgba(255, 255, 255, 0.72);
  border-left: 1px solid rgba(226, 232, 240, 0.95);
}

.supplier-partner-product__name {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  color: #0f172a;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}

.supplier-partner-product__stats {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.supplier-partner-product__qty {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mpb-primary);
  letter-spacing: 0.01em;
}

.supplier-partner-product__qty-unit {
  font-weight: 600;
  color: #64748b;
  font-size: 0.72rem;
}

.supplier-partner-product__amount {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

.supplier-partner-card__closing-section a.supplier-partner-doc-path-link {
  color: var(--mpb-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.supplier-partner-card__closing-section a.supplier-partner-doc-path-link:hover {
  color: var(--mpb-primary-hover);
  text-decoration: underline;
}

.supplier-partner-page__generated {
  margin: 0.8rem 0 0;
  font-size: 0.78rem;
  color: var(--mpb-gray-500);
}

.purchase-detail-page .purchase-detail-header {
  background: #fff;
  border-bottom: 1px solid var(--mpb-gray-100);
}

.purchase-detail-page .purchase-detail-header .costs-page__crumbs {
  color: var(--mpb-gray-500);
}

.purchase-detail-page .purchase-detail-header .costs-page__crumb-item {
  color: var(--mpb-gray-500);
}

.purchase-detail-page .purchase-detail-header .costs-page__crumb-item--current {
  color: var(--mpb-gray-700);
}

.purchase-detail-page .purchase-detail-header .costs-page__crumb-sep {
  color: var(--mpb-gray-400);
}

.purchase-detail-page .purchase-detail-header__title,
.purchase-detail-page .purchase-detail-header__kpi-item .value {
  color: var(--mpb-gray-900);
}

.purchase-detail-page .purchase-detail-header__subtitle,
.purchase-detail-page .purchase-detail-header__field .label,
.purchase-detail-page .purchase-detail-header__status-label,
.purchase-detail-page .purchase-detail-header__kpi-item .label,
.purchase-detail-page .purchase-detail-header__back {
  color: var(--mpb-gray-500);
}

.purchase-detail-page .purchase-detail-header__field input,
.purchase-detail-page .purchase-detail-header__field select {
  border-color: var(--mpb-gray-200);
  background: var(--mpb-white);
  color: var(--mpb-gray-800);
}

.purchase-detail-page .purchase-detail-header__status-select option,
.purchase-detail-page .purchase-detail-header__field select option {
  color: var(--mpb-gray-800);
}

.soc-page .soc-page__header-card {
  background: var(--mpb-inventory-hero-bg);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.soc-page .soc-page__order-number,
.soc-page .soc-page__order-id,
.soc-page .soc-page__meta-value,
.soc-page .soc-page__meta-value--accent {
  color: #fff;
}

.soc-page .soc-page__meta-label {
  color: rgba(255, 255, 255, 0.74);
}

/* Inventory hero titles: same scale as finance hero titles */
.suppliers-page .costs-header .mpb-section-title,
.warehouse-page .costs-header .mpb-section-title,
.supplies-bundles-page .costs-header .mpb-section-title,
.supplies-details-page .costs-header .mpb-section-title,
.purchases-page__title,
.supplies-availability-page .avail-hero__title,
.ibc-page__title {
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.warehouse-page__body {
  padding: 1.35rem 1.5rem 1.5rem;
  background:
    linear-gradient(180deg, rgba(241, 245, 249, 0.8), rgba(255, 255, 255, 0) 28%),
    #fff;
}

.warehouse-page__alert {
  margin: 0 0 1rem;
}

.warehouse-page__table-card {
  border: 1px solid #dbe5f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.warehouse-page__table-card--results {
  overflow: visible;
}

.warehouse-page__table-card--results .warehouse-page__table-head {
  border-bottom: 0;
  padding-bottom: 0.85rem;
  background: #fff;
}

.warehouse-page__table-card--results .warehouse-page__table-wrap {
  border-top: 1px solid #e5edf7;
}

.warehouse-page__table-card--results .warehouse-page__table thead th {
  border-radius: 0 !important;
}

.warehouse-page__table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem 1rem;
  border-bottom: 1px solid #e5edf7;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.9)),
    #fff;
}

.warehouse-page__table-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.warehouse-page__table-desc {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
}

.warehouse-page__table-count {
  flex-shrink: 0;
  align-self: center;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.8125rem;
  font-weight: 700;
}

.warehouse-page__header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.warehouse-page__header-main .mpb-section-title {
  margin-bottom: 0;
}

.warehouse-page__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.warehouse-page__table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.warehouse-page__import-card {
  margin: 0;
  padding: 1rem 1.05rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.9rem;
  background:
    radial-gradient(120% 120% at 8% -20%, rgba(56, 189, 248, 0.12), transparent 58%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 72%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.warehouse-page__import-card--offset {
  margin-top: 0.75rem;
}

.warehouse-page__import-head {
  display: grid;
  gap: 0.32rem;
}

.warehouse-page__import-title {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}

.warehouse-page__import-fields-inline {
  margin-top: 0.62rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.warehouse-page__import-field-chip {
  display: inline-flex;
  align-items: center;
  height: 1.55rem;
  padding: 0 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid #dbe5f0;
  background: #fff;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.warehouse-page__import-controls {
  margin-top: 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.warehouse-page__import-choose-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.34rem;
  padding: 0 0.95rem;
  border-radius: 0.62rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.warehouse-page__import-choose-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.warehouse-page__import-file-input-hidden {
  display: none;
}

.warehouse-page__import-selected-name {
  flex: 1 1 auto;
  min-width: 0;
  color: #64748b;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.warehouse-page__import-btn {
  height: 2.38rem;
  min-width: 10rem;
  margin-left: auto;
}

.warehouse-page__import-note {
  margin: 0.65rem 0 0;
  color: #475569;
  font-size: 0.79rem;
  line-height: 1.45;
}

.warehouse-calibration-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.42);
}

.warehouse-calibration-modal__panel {
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 2.5rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.warehouse-calibration-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem 0.9rem;
  border-bottom: 1px solid #e2e8f0;
}

.warehouse-calibration-modal__head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
}

.warehouse-calibration-modal__head p {
  margin: 0.38rem 0 0;
  max-width: 680px;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.45;
}

.warehouse-calibration-modal__close {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0.55rem;
  background: #f1f5f9;
  color: #334155;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.warehouse-calibration-modal__body {
  min-height: 0;
  padding: 0.95rem 1.2rem;
  overflow: auto;
}

.warehouse-calibration-modal__table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
}

.warehouse-calibration-modal__table {
  min-width: 760px;
}

.warehouse-calibration-modal__table th,
.warehouse-calibration-modal__table td {
  padding: 0.5rem 0.58rem;
}

.warehouse-calibration-modal__note {
  margin: 0.7rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.warehouse-calibration-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.95rem 1.2rem 1.1rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.warehouse-calibration-result-table {
  width: 100%;
  min-width: 760px;
}

.warehouse-import-preview-modal__dialog {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.warehouse-import-preview-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e5edf7;
}

.warehouse-import-preview-modal__head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 800;
}

.warehouse-import-preview-modal__head p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

.warehouse-import-preview-modal__head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.warehouse-import-preview-modal__close {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.7rem;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.warehouse-import-preview-modal__close:hover:not(:disabled) {
  background: #e2e8f0;
  color: #334155;
}

.warehouse-import-preview-modal__close:disabled {
  cursor: default;
  opacity: 0.55;
}

.warehouse-import-preview-modal__table-wrap {
  margin-top: 0;
  border: 1px solid #e5edf7;
  border-radius: 0.9rem;
}

.warehouse-import-preview-modal__table {
  min-width: 760px;
}

.warehouse-import-preview-modal__table th {
  background: #f8fbff;
}

.warehouse-import-preview-modal__table th:first-child,
.warehouse-import-preview-modal__table td:first-child {
  width: 72px;
}

.warehouse-import-preview-modal__photo-cell {
  text-align: center;
}

.warehouse-import-preview-modal__photo,
.warehouse-import-preview-modal__photo-placeholder {
  width: 46px;
  height: 62px;
  display: inline-block;
  border: 1px solid #d8e5f6;
  border-radius: 12px;
  background: #f8fbff;
  object-fit: cover;
  vertical-align: middle;
}

.warehouse-import-preview-modal__photo-placeholder {
  background: linear-gradient(135deg, #f8fbff, #edf4ff);
}

.warehouse-import-preview-modal__product {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.warehouse-import-preview-modal__product strong {
  color: #0f172a;
  font-size: 0.92rem;
  line-height: 1.25;
}

.warehouse-import-preview-modal__product span {
  color: #94a3b8;
  font-size: 0.78rem;
}

.warehouse-import-preview-modal__article {
  display: inline-flex;
  max-width: 190px;
  padding: 0.32rem 0.48rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.warehouse-import-preview-modal__qty-cell {
  width: 150px;
  text-align: right;
}

.warehouse-import-preview-modal__qty-input {
  width: 100%;
  height: 2.35rem;
  padding: 0 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #0f172a;
  font-weight: 800;
  text-align: right;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px rgba(37, 99, 235, 0.08);
  outline: none;
}

.warehouse-import-preview-modal__qty-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16), 0 8px 20px rgba(37, 99, 235, 0.1);
}

.warehouse-adjustments-modal__table {
  min-width: 1060px;
}

.warehouse-adjustments-modal__table .warehouse-import-preview-modal__article {
  width: fit-content;
  max-width: 220px;
}

.warehouse-adjustments-modal__table th:nth-child(n + 3),
.warehouse-adjustments-modal__table td:nth-child(n + 3) {
  text-align: center;
  vertical-align: middle;
}

.warehouse-adjustments-modal__num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .warehouse-import-preview-modal__head {
    flex-direction: column;
    align-items: stretch;
  }

  .warehouse-import-preview-modal__head-actions {
    justify-content: space-between;
  }
}

.warehouse-ps-calib__products {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem 1.15rem;
}

.warehouse-ps-calib__product {
  border: 1px solid #dbe5f0;
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
}

.warehouse-ps-calib__product-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  border: 0;
  background: #f8fafc;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.warehouse-ps-calib__product-head strong {
  display: block;
  font-size: 0.95rem;
}

.warehouse-ps-calib__product-head small {
  display: block;
  margin-top: 0.22rem;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.warehouse-ps-calib__badge {
  flex: 0 0 auto;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.warehouse-ps-calib__badge.is-ok {
  background: #dcfce7;
  color: #166534;
}

.warehouse-ps-calib__badge.is-warn {
  background: #fff7ed;
  color: #9a3412;
}

.warehouse-ps-calib__product-body {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem 0.95rem 1rem;
}

.warehouse-ps-calib__kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.warehouse-ps-calib__kpis div {
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  background: #ffffff;
}

.warehouse-ps-calib__kpis span {
  display: block;
  color: #64748b;
  font-size: 0.76rem;
}

.warehouse-ps-calib__kpis strong {
  display: block;
  margin-top: 0.22rem;
  color: #0f172a;
  font-size: 0.95rem;
}

.warehouse-ps-calib__match-table {
  min-width: 900px;
}

.warehouse-ps-calib__ledger-table {
  width: 100%;
  min-width: 1040px;
}

.warehouse-ps-calib__ledger-table tr.warehouse-ps-calib__ledger-row--new-purchase td {
  background: #f0fdf4;
}

.warehouse-ps-calib__ledger-table tr.warehouse-ps-calib__ledger-row--new-purchase:hover td {
  background: #ecfccb;
}

.warehouse-ps-calib__remainders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.warehouse-ps-calib__remainders > div {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  background: #f8fafc;
}

.warehouse-ps-calib__remainders h3 {
  margin: 0 0 0.45rem;
  color: #0f172a;
  font-size: 0.88rem;
}

.warehouse-ps-calib__remainders p {
  margin: 0.28rem 0;
  color: #475569;
  font-size: 0.8rem;
}

.warehouse-page__table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.warehouse-page__table thead th {
  white-space: normal;
  line-height: 1.2;
}

.warehouse-page__table th,
.warehouse-page__table td {
  padding: 0.52rem 0.58rem;
  vertical-align: top;
}

.warehouse-page__table th:nth-child(1),
.warehouse-page__table td:nth-child(1) {
  width: 13%;
}

.warehouse-page__table th:nth-child(2),
.warehouse-page__table td:nth-child(2) {
  width: 6%;
  text-align: center;
}

.warehouse-page__table th:nth-child(3),
.warehouse-page__table td:nth-child(3) {
  width: 8%;
}

.warehouse-page__table th:nth-child(4),
.warehouse-page__table td:nth-child(4) {
  width: 15%;
}

.warehouse-page__table th:nth-child(5),
.warehouse-page__table td:nth-child(5) {
  width: 8%;
}

.warehouse-page__table th:nth-child(6),
.warehouse-page__table td:nth-child(6) {
  width: 25%;
}

.warehouse-page__table th:nth-child(7),
.warehouse-page__table td:nth-child(7) {
  width: 25%;
}

.warehouse-page__product-img-vertical {
  width: 44px;
  height: 58px;
  object-fit: cover;
  border: 1px solid #d7e3f4;
  border-radius: 10px;
  background: #f8fbff;
}

.warehouse-page__sources-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  max-width: 100%;
}

.warehouse-page__movement-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  max-width: 100%;
}

.warehouse-page__source-pill {
  display: block;
  width: 100%;
  padding: 0.22rem 0.48rem;
  border-radius: 10px;
  border: 1px solid #cfe0f5;
  background: #f8fbff;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-page__movement-item {
  display: block;
  width: 100%;
  padding: 0.22rem 0.48rem;
  border-radius: 10px;
  border: 1px solid #d6e6f7;
  background: #f8fbff;
  color: #334155;
  font-size: 0.74rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-page__movement-item strong {
  color: #1e3a8a;
  font-weight: 700;
  margin-right: 0.2rem;
}

.warehouse-page__product-name-cell {
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.warehouse-page__sources-more-btn {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 0.18rem 0.58rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.warehouse-page__sources-more-btn:hover {
  background: #dbeafe;
}

.warehouse-page__sources-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.warehouse-page__sources-modal {
  width: min(980px, 100%);
  max-height: min(88vh, 860px);
  background: #fff;
  border: 1px solid #d7e3f4;
  border-radius: 20px;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.warehouse-page__sources-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fbff;
}

.warehouse-page__sources-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.warehouse-page__sources-modal-head h3 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.warehouse-page__sources-modal-head p {
  margin: 0.28rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
}

.warehouse-page__sources-modal-close {
  border: 1px solid #d7e3f4;
  background: #fff;
  color: #475569;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.warehouse-page__sources-modal-body {
  padding: 0.95rem 1.15rem 1.1rem;
  overflow: auto;
}

.warehouse-page__sources-modal-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.warehouse-page__sources-modal-kpis span {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7e3f4;
  border-radius: 10px;
  padding: 0.3rem 0.56rem;
  background: #f8fbff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

.warehouse-page__sources-modal-body h4 {
  margin: 0.65rem 0 0.4rem;
  color: #334155;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.warehouse-page__sources-modal-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: auto;
  margin-bottom: 0.8rem;
}

.warehouse-page__sources-modal-table {
  min-width: 620px;
}

.warehouse-page__sources-modal-table td,
.warehouse-page__sources-modal-table th {
  white-space: nowrap;
}

.warehouse-page__modal-link {
  color: #1d4ed8;
  text-decoration: none;
  border-bottom: 1px dashed rgba(29, 78, 216, 0.35);
  font-weight: 600;
}

.warehouse-page__modal-link:hover {
  color: #1e40af;
  border-bottom-color: rgba(30, 64, 175, 0.55);
}

.warehouse-page__manual-modal {
  width: min(980px, calc(100vw - 2rem));
}

.warehouse-page__manual-import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.95rem;
  padding: 0.72rem;
  border: 1px solid #d7e7ff;
  border-radius: 0.9rem;
  background:
    radial-gradient(130% 100% at 0% 0%, rgba(59, 130, 246, 0.12), transparent 54%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.warehouse-page__manual-import-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.62rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
}

.warehouse-page__manual-import-summary strong {
  margin-left: 0.25rem;
  color: #1d4ed8;
}

.warehouse-page__manual-comment {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.warehouse-page__manual-comment textarea {
  min-height: 76px;
  resize: vertical;
  border: 1px solid #dbe3ef;
  border-radius: 0.75rem;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 0.92rem;
  color: #0f172a;
  background: #fff;
  outline: none;
}

.warehouse-page__manual-comment textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.warehouse-page__manual-table {
  min-width: 720px;
}

.warehouse-page__manual-table th:nth-child(1),
.warehouse-page__manual-table td:nth-child(1) {
  width: 52%;
}

.warehouse-page__manual-table th:nth-child(3),
.warehouse-page__manual-table td:nth-child(3),
.warehouse-page__manual-table th:nth-child(4),
.warehouse-page__manual-table td:nth-child(4) {
  text-align: center;
}

.warehouse-page__manual-product {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.warehouse-page__manual-product img,
.warehouse-page__manual-product span {
  width: 42px;
  height: 56px;
  border-radius: 0.65rem;
  background: #eef4ff;
  object-fit: cover;
  flex-shrink: 0;
}

.warehouse-page__manual-product strong {
  font-size: 0.9rem;
  line-height: 1.25;
  color: #0f172a;
  white-space: normal;
}

.warehouse-page__manual-qty {
  width: 7rem;
  max-width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  padding: 0.48rem 0.7rem;
  text-align: center;
  font-weight: 700;
  color: #0f172a;
  outline: none;
}

.warehouse-page__manual-qty:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.warehouse-page__manual-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 1rem;
}

.warehouse-page__import-guide-backdrop {
  z-index: 1010;
}

.warehouse-page__import-guide-modal {
  width: min(720px, calc(100vw - 2rem));
}

.warehouse-page__import-guide-hero {
  position: relative;
  padding: 1.35rem 1.45rem 1.2rem;
  border-bottom: 1px solid #dbe7f6;
  background:
    radial-gradient(110% 120% at 92% 0%, rgba(37, 99, 235, 0.16), transparent 48%),
    linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.warehouse-page__import-guide-hero .warehouse-page__sources-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.warehouse-page__import-guide-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0 0.62rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #2563eb;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.warehouse-page__import-guide-hero h3 {
  margin: 0.78rem 2.6rem 0 0;
  color: #0f172a;
  font-size: 1.28rem;
  line-height: 1.15;
}

.warehouse-page__import-guide-hero p {
  margin: 0.55rem 2.4rem 0 0;
  max-width: 560px;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.5;
}

.warehouse-page__import-guide-body {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.45rem 0.1rem;
}

.warehouse-page__import-guide-format {
  padding: 0.92rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.warehouse-page__import-guide-format strong {
  display: block;
  margin-bottom: 0.65rem;
  color: #0f172a;
  font-size: 0.94rem;
}

.warehouse-page__import-guide-format p {
  margin: 0.65rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.warehouse-page__import-guide-format b {
  color: #0f172a;
}

.warehouse-page__import-guide-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.warehouse-page__import-guide-columns span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.62rem;
  border: 1px solid #dbeafe;
  border-radius: 0.65rem;
  background: #f8fbff;
  color: #1e3a8a;
  font-size: 0.8rem;
  font-weight: 800;
}

.warehouse-page__import-guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.warehouse-page__import-guide-steps span {
  min-height: 3rem;
  padding: 0.65rem 0.72rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.85rem;
  background: #f8fafc;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.warehouse-page__import-guide-footer {
  padding: 1rem 1.45rem 1.25rem;
}

.warehouse-page__fixed-head {
  position: fixed;
  z-index: 70;
  display: none;
  overflow: hidden;
  pointer-events: none;
  border: 1px solid #dbe5f0;
  border-bottom: 0;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.12);
}

.warehouse-page__table--fixed-head {
  margin: 0;
}

.warehouse-page__table--fixed-head thead th {
  position: relative;
  z-index: 2;
  background: #f8fafc;
}

.warehouse-page__state {
  padding: 1.15rem 1.2rem 1.25rem;
}

.warehouse-calib-fifo__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.warehouse-calib-fifo__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.72rem;
  background: #f8fafc;
}

.warehouse-calib-fifo__toggle button {
  border: 1px solid transparent;
  background: transparent;
  color: #334155;
  border-radius: 0.58rem;
  padding: 0.42rem 0.78rem;
  font-size: 0.81rem;
  font-weight: 700;
  cursor: pointer;
}

.warehouse-calib-fifo__toggle button.is-active {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.warehouse-calib-fifo__meta {
  color: #64748b;
  font-size: 0.82rem;
}

.warehouse-calib-fifo__parent-row {
  cursor: pointer;
}

.warehouse-calib-fifo__parent-row:hover td {
  background: #f8fafc;
}

.warehouse-calib-fifo__caret {
  display: inline-block;
  width: 1rem;
  color: #64748b;
}

.warehouse-calib-fifo__details-row td {
  padding: 0 !important;
  background: #fcfdff;
}

.warehouse-calib-fifo__inner-table {
  width: 100%;
  border-collapse: collapse;
}

.warehouse-calib-fifo__inner-table thead th {
  position: static;
  background: #eef4fb;
  border-top: 1px solid #dbe5f0;
  border-bottom: 1px solid #dbe5f0;
  font-size: 0.78rem;
  color: #334155;
  padding: 0.55rem 0.7rem;
}

.warehouse-calib-fifo__inner-table tbody td {
  font-size: 0.83rem;
  color: #0f172a;
  padding: 0.56rem 0.7rem;
  border-bottom: 1px solid #edf2f7;
}

.warehouse-fifo-hub .warehouse-page__table-head {
  border-bottom: 1px solid #e5edf7;
  padding-bottom: 1rem;
}

.warehouse-fifo-hub__body {
  padding: 1rem 1.2rem 1.2rem;
  display: grid;
  gap: 0.9rem;
}

.warehouse-fifo-hub__simple-grid {
  display: grid;
  gap: 0.75rem;
}

.warehouse-fifo-hub__kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0 0.78rem 0.9rem;
}

.warehouse-fifo-hub__kpi-card {
  border: 1px solid #dbe5f0;
  border-radius: 0.62rem;
  background: #f8fafc;
  padding: 0.46rem 0.55rem;
  display: grid;
  gap: 0.16rem;
}

.warehouse-fifo-hub__kpi-card span {
  color: #475569;
  font-size: 0.73rem;
}

.warehouse-fifo-hub__kpi-card strong {
  color: #0f172a;
  font-size: 0.87rem;
}

.warehouse-fifo-hub__stock-card-body {
  padding: 0.8rem 0.78rem 0.95rem;
  display: grid;
  gap: 0.28rem;
}

.warehouse-fifo-hub__stock-value {
  color: #0f172a;
  font-size: 1.15rem;
  line-height: 1.15;
}

.warehouse-fifo-hub__stock-meta {
  color: #64748b;
  font-size: 0.8rem;
}

.warehouse-fifo-hub__grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.warehouse-fifo-hub__metric {
  border: 1px solid #dbe5f0;
  border-radius: 0.82rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.72rem 0.78rem;
  display: grid;
  gap: 0.3rem;
}

.warehouse-fifo-hub__metric-label {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.warehouse-fifo-hub__metric-value {
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.2;
}

.warehouse-fifo-hub__metric-meta {
  color: #475569;
  font-size: 0.79rem;
}

.warehouse-fifo-hub__checks {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.warehouse-fifo-hub__check {
  border: 1px solid #dbe5f0;
  border-radius: 0.82rem;
  padding: 0.68rem 0.78rem;
  background: #fff;
  display: grid;
  gap: 0.26rem;
}

.warehouse-fifo-hub__check--ok {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f7fff9 0%, #ffffff 100%);
}

.warehouse-fifo-hub__check--warn {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffdf4 0%, #ffffff 100%);
}

.warehouse-fifo-hub__check-title {
  color: #334155;
  font-size: 0.79rem;
  font-weight: 700;
}

.warehouse-fifo-hub__check strong {
  color: #0f172a;
  font-size: 0.96rem;
}

.warehouse-fifo-hub__check > span:not(.warehouse-fifo-hub__check-title) {
  color: #64748b;
  font-size: 0.77rem;
}

.warehouse-fifo-hub__issues {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.warehouse-fifo-hub__issues-card {
  border: 1px solid #dbe5f0;
  border-radius: 0.82rem;
  overflow: hidden;
  background: #fff;
}

.warehouse-fifo-hub__issues-card h3 {
  margin: 0;
  padding: 0.68rem 0.78rem;
  border-bottom: 1px solid #e5edf7;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
}

.warehouse-fifo-hub__issues-empty {
  margin: 0;
  padding: 0.9rem 0.78rem 1rem;
  color: #64748b;
  font-size: 0.82rem;
}

.warehouse-fifo-hub__issues-table {
  width: 100%;
  border-collapse: collapse;
}

.warehouse-fifo-hub__issues-table thead th {
  position: static;
  background: #f8fafc;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.52rem 0.64rem;
  border-bottom: 1px solid #e5edf7;
  white-space: nowrap;
}

.warehouse-fifo-hub__issues-table tbody td {
  color: #0f172a;
  font-size: 0.79rem;
  padding: 0.5rem 0.64rem;
  border-bottom: 1px solid #edf2f7;
}

.warehouse-fifo-hub__issues-table tbody tr:last-child td {
  border-bottom: 0;
}

.warehouse-fifo-hub__links-card {
  margin-top: 0.1rem;
}

.warehouse-fifo-hub__rpsp-card {
  border-color: #d6e4f5;
}

.warehouse-fifo-hub__rpsp-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.65rem 0.78rem 0.7rem;
  border-bottom: 1px solid #e5edf7;
}

.warehouse-fifo-hub__rpsp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 0.65rem 0.78rem 0.78rem;
}

.warehouse-fifo-hub__rpsp-samples {
  border: 1px solid #dbe5f0;
  border-radius: 0.68rem;
  overflow: hidden;
  background: #fff;
}

.warehouse-fifo-hub__rpsp-samples h4 {
  margin: 0;
  padding: 0.52rem 0.64rem;
  border-bottom: 1px solid #e5edf7;
  background: #f8fafc;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
}

.warehouse-fifo-hub__filter-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.62rem 0.78rem 0.58rem;
  border-bottom: 1px solid #e5edf7;
  background: #f8fafc;
}

.warehouse-fifo-hub__filter-row--top {
  border: 1px solid #dbe5f0;
  border-radius: 0.82rem;
  border-bottom: 1px solid #dbe5f0;
}

.warehouse-fifo-hub__filter-label {
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.warehouse-fifo-hub__filter-select {
  min-width: 17rem;
  max-width: 100%;
  height: 2rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.8rem;
  padding: 0 0.6rem;
}

.warehouse-fifo-hub__links-note {
  margin: 0;
  padding: 0.52rem 0.78rem 0.56rem;
  color: #475569;
  font-size: 0.78rem;
  border-bottom: 1px solid #e5edf7;
}

.warehouse-fifo-hub__reason-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.62rem 0.78rem 0.58rem;
  border-bottom: 1px solid #e5edf7;
  background: #f8fafc;
}

.warehouse-fifo-hub__reason-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #dbe5f0;
  background: #fff;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.warehouse-fifo-hub__links-wrap {
  max-height: 21rem;
  overflow: auto;
}

.warehouse-fifo-hub__links-table th:nth-child(1) {
  min-width: 8rem;
}

.warehouse-fifo-hub__links-table th:nth-child(2) {
  min-width: 7.2rem;
}

.warehouse-fifo-hub__links-table th:nth-child(3) {
  min-width: 7.6rem;
}

.warehouse-fifo-hub__links-table th:nth-child(4) {
  min-width: 7.2rem;
}

.warehouse-fifo-hub__links-table th:nth-child(5) {
  min-width: 7rem;
}

.warehouse-fifo-hub__links-table th:nth-child(6) {
  min-width: 8.2rem;
}

.warehouse-fifo-hub__links-table th:nth-child(7) {
  min-width: 6rem;
}

.warehouse-fifo-hub__links-table {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}

.warehouse-fifo-hub__links-table td,
.warehouse-fifo-hub__links-table th {
  vertical-align: middle;
}

@media (max-width: 768px) {
  .suppliers-page .costs-header,
  .warehouse-page .costs-header,
  .suppliers-detail-page .costs-header,
  .supplies-bundles-page .costs-header,
  .supplies-details-page .costs-header {
    padding: 1.5rem 1rem 1.2rem;
  }

  .warehouse-page__body {
    padding: 1rem;
  }

  .warehouse-page__table-head {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .warehouse-page__table-count {
    align-self: flex-start;
  }

  .warehouse-page__sources-cell {
    max-width: 100%;
  }

  .warehouse-page__movement-cell {
    max-width: 100%;
  }

  .warehouse-page__table {
    min-width: 980px;
  }

  .warehouse-page__table th:nth-child(4),
  .warehouse-page__table td:nth-child(4) {
    width: 170px;
  }

  .warehouse-page__import-card {
    padding: 0.9rem 0.85rem;
  }

  .warehouse-page__import-btn {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .warehouse-page__import-controls {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .warehouse-page__sources-modal {
    max-height: 92vh;
    border-radius: 16px;
  }

  .warehouse-page__sources-modal-head {
    padding: 0.86rem 0.9rem 0.76rem;
  }

  .warehouse-page__sources-modal-body {
    padding: 0.8rem 0.9rem 0.95rem;
  }

  .warehouse-fifo-hub__grid,
  .warehouse-fifo-hub__checks,
  .warehouse-fifo-hub__issues,
  .warehouse-fifo-hub__kpi-grid,
  .warehouse-fifo-hub__rpsp-metrics,
  .warehouse-fifo-hub__rpsp-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-fifo-hub__links-wrap {
    max-height: none;
  }

  .warehouse-fifo-hub__filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .warehouse-fifo-hub__filter-select {
    min-width: 0;
    width: 100%;
  }

  .supplier-partner-page {
    padding: 1rem 0.7rem 1.5rem;
  }

  .supplier-partner-page__hero {
    padding: 1.15rem 1rem;
  }

  .supplier-partner-page__grid {
    grid-template-columns: 1fr;
  }

  .supplier-partner-card {
    grid-column: auto;
  }

  .supplier-partner-card__kpis {
    gap: 0.4rem 0.75rem;
  }

  .supplier-partner-card__kpis > div:not(:first-child) {
    padding-left: 0.75rem;
  }

  .supplier-partner-product__visual {
    flex-basis: 4.97rem;
    width: 4.97rem;
  }

  .supplier-partner-card__closing-grid {
    grid-template-columns: 1fr;
  }

  .supplier-partner-card__payment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supplier-partner-card__closing-grid .supplier-partner-card__payment-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .supplier-partner-card__payment-list {
    grid-template-columns: 1fr;
  }
}

/* Партнёрский кабинет поставщика — мобильная вёрстка */
@media (max-width: 640px) {
  .supplier-partner-page {
    padding: max(0.65rem, env(safe-area-inset-top, 0px)) max(0.6rem, env(safe-area-inset-right, 0px))
      max(1.35rem, env(safe-area-inset-bottom, 0px)) max(0.6rem, env(safe-area-inset-left, 0px));
    overflow-x: clip;
  }

  .supplier-partner-page__bg {
    height: 13rem;
  }

  .supplier-partner-page__container {
    width: 100%;
    max-width: 100%;
  }

  .supplier-partner-page__hero {
    padding: 1.05rem 0.9rem;
    border-radius: 0.88rem;
  }

  .supplier-partner-page__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  .supplier-partner-page__title {
    font-size: clamp(1.22rem, 5.8vw, 1.55rem);
    line-height: 1.12;
  }

  .supplier-partner-page__notes {
    font-size: 0.88rem;
  }

  .supplier-partner-page__meta {
    gap: 0.4rem;
  }

  .supplier-partner-page__meta span {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    min-height: 2.35rem;
    justify-content: center;
    text-align: center;
    padding: 0.34rem 0.5rem;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .supplier-partner-page__state {
    padding: 0.95rem 0.85rem;
    font-size: 0.9rem;
  }

  .supplier-partner-page__content {
    margin-top: 0.75rem;
  }

  .supplier-partner-page__grid {
    gap: 0.65rem;
  }

  .supplier-partner-card {
    padding: 0.82rem 0.72rem;
    border-radius: 0.85rem;
  }

  .supplier-partner-card__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .supplier-partner-card__head h2 {
    font-size: 0.95rem;
    line-height: 1.25;
    padding-right: 0;
  }

  .supplier-partner-card__status {
    align-self: flex-start;
    height: auto;
    min-height: 2.1rem;
    padding: 0.28rem 0.65rem;
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }

  .supplier-partner-card__kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-top: 0.6rem;
  }

  .supplier-partner-card__kpis > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.18rem;
    min-width: 0;
    padding: 0.48rem 0.52rem;
    margin: 0;
    border: 1px solid var(--mpb-gray-200);
    border-radius: 0.55rem;
    background: var(--mpb-gray-50);
  }

  .supplier-partner-card__kpis > div:not(:first-child) {
    padding-left: 0.52rem;
    margin-left: 0;
    border-left: none;
  }

  .supplier-partner-card__kpis .label {
    font-size: 0.65rem;
    white-space: normal;
    line-height: 1.2;
  }

  .supplier-partner-card__kpis .label::after {
    content: "";
  }

  .supplier-partner-card__kpis .value {
    font-size: 0.84rem;
    word-break: break-word;
  }

  .supplier-partner-card__products-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
  }

  .supplier-partner-card__products-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .supplier-partner-card__products-btn {
    width: 100%;
    min-height: 2.75rem;
    font-size: 0.82rem;
  }

  .supplier-partner-card__products-copy-hint {
    text-align: center;
    width: 100%;
  }

  .supplier-partner-products {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .supplier-partner-product {
    flex-direction: column;
    align-items: stretch;
  }

  .supplier-partner-product__visual {
    width: min(7.5rem, 42vw);
    flex: 0 0 auto;
    align-self: center;
    margin: 0.35rem 0 0;
  }

  .supplier-partner-product__body {
    border-left: none;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    padding: 0.62rem 0.72rem 0.72rem;
  }

  .supplier-partner-product__name {
    font-size: 0.84rem;
  }

  .supplier-partner-card__payment-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
  }

  .supplier-partner-card__payment-list {
    grid-template-columns: 1fr;
    max-height: 24rem;
  }

  .supplier-partner-card__payment-list .purchase-files__payments-row {
    grid-template-columns: minmax(0, 1fr) minmax(3.5rem, 1fr) auto;
  }

  .supplier-partner-card__closing-grid > .purchase-files__item {
    padding: 0.88rem 0.82rem;
  }

  .supplier-partner-card__closing-grid .purchase-files__header {
    gap: 0.6rem;
  }

  .supplier-partner-card__closing-section a.supplier-partner-doc-path-link {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    max-width: 100%;
    padding: 0.2rem 0;
    line-height: 1.25;
    white-space: normal;
    word-break: break-word;
  }

  .supplier-partner-page__generated {
    padding: 0 0.15rem;
    text-align: center;
  }
}

/* ── Account settings page ── */
.account-settings-page__card {
  max-width: 980px;
  margin: 0 auto;
  padding-bottom: 1.5rem;
  border-radius: 1.25rem;
  border: none;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.account-settings-page__hero {
  padding: 1.2rem 1.75rem 1rem;
  border-bottom: 1px solid #e5edf7;
}

.account-settings-page__hero-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-settings-page__hero-main {
  min-width: 0;
  flex: 1 1 auto;
}

.account-settings-page__hero-top {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.72rem;
}

.account-settings-page__badge {
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(4, 120, 87, 0.24);
  background: rgba(4, 120, 87, 0.08);
  color: #047857;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-settings-page__back {
  font-size: 0.85rem;
  color: #475569;
}

.account-settings-page__title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.account-settings-page__subtitle {
  max-width: 56ch;
  margin: 0;
  color: #475569;
}

.account-settings-page__avatar-card {
  width: min(28.5rem, 100%);
  border: none;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.95rem;
  box-shadow: none;
}

.account-settings-page__avatar-head {
  margin-bottom: 0.7rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.account-settings-page__avatar-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #334155;
}

.account-settings-page__avatar-subtitle {
  margin-top: 0.28rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #64748b;
}

.account-settings-page__avatar-status {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.14rem 0.58rem;
  border-radius: 999px;
  border: 1px solid #dbe5f1;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.account-settings-page__avatar-status--ready {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.account-settings-page__avatar-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.82rem;
  align-items: flex-start;
}

.account-settings-page__avatar-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  flex: 0 0 auto;
}

.account-settings-page__avatar-preview {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 999px;
  border: 1px solid #dbe5f0;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  overflow: hidden;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 3px rgba(248, 250, 252, 0.95),
    0 10px 20px rgba(30, 64, 175, 0.18);
}

.account-settings-page__avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-settings-page__avatar-placeholder {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

.account-settings-page__avatar-preview-note {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.account-settings-page__avatar-controls {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.5rem;
}

.account-settings-page__avatar-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.account-settings-page__avatar-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.28rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 1px solid #dbe5f1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-settings-page__avatar-picker {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.42rem 0.52rem;
  border: 1px solid #d5e1ef;
  border-radius: 0.7rem;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.account-settings-page__avatar-picker:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.account-settings-page__avatar-picker:focus-within {
  border-color: #047857;
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.14);
}

.account-settings-page__avatar-picker-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.58rem;
  padding: 0 0.58rem;
  border-radius: 999px;
  border: 1px solid #cfd9e6;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.77rem;
  font-weight: 700;
  white-space: nowrap;
}

.account-settings-page__avatar-picker-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: #334155;
}

.account-settings-page__avatar-file-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.account-settings-page__avatar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.account-settings-page__alert {
  margin: 1rem 1.75rem 0;
}

.account-settings-page__top-grid {
  margin: 1rem 1.75rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.account-settings-page__zone {
  background: transparent;
  border: none;
  border-radius: 0.95rem;
  padding: 0;
  box-shadow: none;
}

.account-settings-page__zone-title {
  margin: 0 0 0.65rem;
}

.account-settings-page__account-card {
  border-radius: 0.85rem;
  border: none;
  background: #f8fafc;
  padding: 0.9rem 1rem;
}

.account-settings-page__account-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.42rem;
}

.account-settings-page__account-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 700;
}

.account-settings-page__account-status {
  font-size: 0.74rem;
  font-weight: 600;
  color: #1d4ed8;
  background: #dbeafe;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
}

.account-settings-page__company-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.account-settings-page__company-desc {
  margin-top: 0.42rem;
  font-size: 0.9rem;
  color: #64748b;
}

.account-settings-page__manager-row {
  margin-top: 0.65rem;
  padding-top: 0.56rem;
  border-top: 1px dashed #dbe5f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #334155;
}

.account-settings-page__manager-meta {
  display: grid;
  gap: 0;
}

.account-settings-page__manager-add {
  margin-top: 0.38rem;
  padding-top: 0.38rem;
  border-top: 1px dashed #dbe5f0;
  font-size: 0.9rem;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
}
.account-settings-page__manager-add::before {
  content: "+";
  color: #94a3b8;
  font-weight: 700;
  line-height: 1;
}

.account-settings-page__manager-name {
  font-weight: 500;
}

.account-settings-page__logout-btn {
  margin-top: 0.9rem;
}

.account-settings-page__zone--help {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #64748b;
}

.account-settings-page__mini-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.account-settings-page__list {
  margin: 0;
  padding-left: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.account-settings-page__hint-card {
  padding: 0.82rem 0.95rem;
  border-radius: 0.85rem;
  border: none;
  background: #f8fafc;
}

.account-settings-page__hint-card--info {
  background: #f8fafc;
  border-color: #dbe5f0;
}

.account-settings-page__hint-card--updates {
  background: #f8fafc;
}

.account-settings-page__section--data .account-settings-page__hint-card + .account-settings-page__hint-card {
  margin-top: 0.75rem;
}

.account-settings-page__quick-link {
  padding: 1.14rem 1.2rem;
  border-radius: 1.25rem;
  background: #f8fafc;
  border: 1px solid transparent;
}

.account-settings-page__hint-title {
  font-size: 0.76rem;
  color: #0f172a;
  font-weight: 800;
  margin-bottom: 0.42rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.account-settings-page__hint-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.38;
  color: #0f172a;
}

.account-settings-page__hint-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.95rem;
}

.account-settings-page__hint-main {
  min-width: 0;
}

.account-settings-page__hint-icon-badge {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.72rem;
  background: #e8eeff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-settings-page__hint-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.account-settings-page__hint-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.account-settings-page__hint-link:hover,
.account-settings-page__hint-link:focus-visible {
  border-color: #d7deea;
  background: #eceff5;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.16);
}

.account-settings-page__hint-arrow {
  flex: 0 0 auto;
  width: 1.28rem;
  height: 1.28rem;
  color: #64748b;
  transition: transform 0.16s ease, color 0.16s ease;
}

.account-settings-page__hint-link:hover .account-settings-page__hint-arrow,
.account-settings-page__hint-link:focus-visible .account-settings-page__hint-arrow {
  color: #475569;
  transform: translateX(2px);
}

.account-settings-page__section {
  margin: 1rem 1.75rem 0;
  padding: 1rem 1.05rem;
  background: transparent;
  border: none;
  border-radius: 0.95rem;
}

.account-settings-page__section--data {
  background: #ffffff;
  border-color: #e5edf7;
}

.account-settings-page__data-subsection {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.account-settings-page__section-title {
  margin: 0 0 0.4rem;
}

.account-settings-page__section-desc {
  margin: 0 0 0.78rem;
  font-size: 0.88rem;
  color: #64748b;
}

.account-settings-page__trial-banner {
  margin: 0.9rem 0 0;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.95rem;
}

.account-settings-page__legal-note-btn {
  width: 100%;
  margin: 0 0 0.78rem;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #334155;
  cursor: pointer;
}

.account-settings-page__legal-note-btn:hover {
  color: #0f172a;
  text-decoration: underline;
}

.account-settings-page__legal-modal .summary-modal__dialog {
  max-width: 680px;
}

.account-settings-page__legal-modal-text {
  margin: 0;
  color: #334155;
  line-height: 1.5;
}

.account-settings-page__legal-doc {
  margin: 0.9rem 0 0;
  white-space: pre-wrap;
  color: #0f172a;
  line-height: 1.5;
  font-size: 0.9rem;
}

.account-settings-page__legal-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
}

.account-settings-page__legal-link {
  color: #2563eb;
  text-decoration: underline;
}

.account-settings-page__inline-alert {
  margin: 0 0 0.75rem;
  max-width: 560px;
}

.account-settings-page__shop-composer {
  margin-bottom: 0.95rem;
  padding: 0.85rem 0.95rem;
  border: none;
  border-radius: 0.8rem;
  background: #f8fafc;
}

.account-settings-page__shop-composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.account-settings-page__shop-primary-btn {
  min-width: 10.5rem;
}

.account-settings-page__shop-field {
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
  margin-top: 0.72rem;
  max-width: 36rem;
}

.account-settings-page__shop-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
}

.account-settings-page__shop-field input {
  height: 2.35rem;
  padding: 0.55rem 0.72rem;
  border: 1px solid #cfd9e6;
  border-radius: 0.62rem;
  background: #fff;
  font-size: 0.9rem;
  color: #0f172a;
}

.account-settings-page__shop-field input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.account-settings-page__shop-help {
  font-size: 0.78rem;
}

.account-settings-page__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.9rem;
}

.account-settings-page__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 190px;
  font-size: 0.9rem;
}

.account-settings-page__field--wide {
  min-width: 260px;
  flex: 1 1 260px;
}

.account-settings-page__field-help {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
}

.account-settings-page__form-btn {
  white-space: nowrap;
}

.account-settings-page__table-wrap {
  margin-top: 0.25rem;
}

.account-settings-page__table-wrap.transactions-table-wrap {
  border: none;
  border-radius: 0;
  background: transparent;
}

.account-settings-page__tax-select {
  width: 100%;
  max-width: 240px;
  padding: 0.4rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

.account-settings-page__vat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.account-settings-page__vat-option {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.22rem 0.46rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.account-settings-page__vat-option input {
  margin: 0;
  width: 0.85rem;
  height: 0.85rem;
}

.account-settings-page__saving-note {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

.account-settings-page__vat-help {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

.account-settings-page__warehouse-card {
  margin-top: 0.95rem;
  padding: 0.9rem 0.95rem;
  border: none;
  border-radius: 0.8rem;
  background: #f8fafc;
}

.account-settings-page__warehouse-text {
  margin-bottom: 0;
}

.account-settings-page__warehouse-controls {
  margin-top: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  align-items: flex-end;
}

.account-settings-page__warehouse-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 260px;
  flex: 1 1 340px;
}

.account-settings-page__warehouse-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
}

.account-settings-page__warehouse-field input {
  height: 2.35rem;
  padding: 0.55rem 0.72rem;
  border: 1px solid #cfd9e6;
  border-radius: 0.62rem;
  background: #fff;
  font-size: 0.9rem;
  color: #0f172a;
}

.account-settings-page__warehouse-field input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.account-settings-page__warehouse-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.account-settings-page__warehouse-info {
  margin-top: 0.55rem;
  font-size: 0.82rem;
}

.account-settings-page__section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.account-settings-page__primary-action {
  white-space: nowrap;
}

.account-settings-page__ozon-form {
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border: none;
  background: #f8fafc;
  box-shadow: none;
}

.account-settings-page__form-title {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.account-settings-page__form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.account-settings-page__form-actions {
  display: flex;
  gap: 0.5rem;
}

.account-settings-page__delete-btn {
  font-size: 0.9rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(254, 242, 242, 0.9);
}

.account-settings-page__total {
  margin-top: 0.45rem;
  font-size: 0.8rem;
}

@media (max-width: 980px) {
  .account-settings-page__top-grid {
    grid-template-columns: 1fr;
  }

  .account-settings-page__hero-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .account-settings-page__avatar-card {
    width: 100%;
  }

  .account-settings-page__section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .account-settings-page__primary-action {
    align-self: flex-start;
  }

  .account-settings-page__shop-field {
    max-width: none;
  }
}

.account-settings-page__billing-gateway {
  padding: 0.12rem 0;
}

.account-settings-page__billing-gateway-head {
  align-items: center;
  margin-bottom: 0;
}

.account-settings-page__billing-settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.48rem;
  min-height: 2.35rem;
  padding: 0.48rem 0.7rem 0.48rem 0.9rem;
  border-radius: 999px;
  color: #64748b;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.account-settings-page__billing-settings-link svg {
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
}

.account-settings-page__billing-settings-link:hover,
.account-settings-page__billing-settings-link:focus-visible {
  color: #334155;
  background: #f1f5f9;
  outline: none;
}

.account-settings-page__billing-settings-link:hover svg,
.account-settings-page__billing-settings-link:focus-visible svg {
  color: #64748b;
  transform: translateX(2px);
}

.payment-settings-page {
  --payment-blue: #2563eb;
  --payment-blue-strong: #1d4ed8;
  --payment-text: #0f172a;
  --payment-muted: #64748b;
  --payment-border: #dbe4ef;
  color: var(--payment-text);
}

.payment-settings-page__shell {
  max-width: 1240px;
  margin: 0 auto;
}

.payment-settings-page__header {
  margin-bottom: 1rem;
}

.payment-settings-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  margin-bottom: 0.72rem;
  color: #64748b;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.payment-settings-page__back:hover {
  color: #334155;
}

.payment-settings-page__title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
  line-height: 1.12;
}

.payment-settings-page__subtitle {
  margin: 0;
  color: #7a8497;
}

.payment-settings-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.95fr);
  gap: 1.6rem;
  align-items: start;
}

.payment-settings-page__main {
  display: grid;
  gap: 0.62rem;
  min-width: 0;
}

.payment-settings-page__panel,
.payment-settings-page__summary,
.payment-settings-page__accept-panel,
.payment-settings-page__assurance-grid {
  border: 1px solid rgba(219, 228, 239, 0.92);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.payment-settings-page__panel {
  padding: 1rem 1.05rem;
}

.payment-settings-page__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.74rem;
}

.payment-settings-page__panel-title,
.payment-settings-page__summary-title,
.payment-settings-page__features h3,
.payment-settings-page__seller h3 {
  margin: 0;
  color: #111827;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.payment-settings-page__panel-title {
  margin-bottom: 0.74rem;
  font-size: 1.05rem;
}

.payment-settings-page__panel-head .payment-settings-page__panel-title {
  margin-bottom: 0;
}

.payment-settings-page__text-btn {
  min-height: 2.05rem;
  padding: 0.34rem 0.72rem;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  color: #475569;
  background: #f8fafc;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.payment-settings-page__text-btn:hover,
.payment-settings-page__text-btn:focus-visible {
  border-color: #b8c6d8;
  color: #1f2937;
  background: #ffffff;
  outline: none;
}

.payment-settings-page__plan-summary {
  padding: 0.35rem;
  border: 1px solid #dfe7f1;
  border-radius: 1.05rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.payment-settings-page__plan-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
}

.payment-settings-page__plan-tab {
  min-height: 4.4rem;
  border: 0;
  border-radius: 0.86rem;
  color: #64748b;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  font-size: 1.04rem;
  font-weight: 850;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.payment-settings-page__plan-tab:hover,
.payment-settings-page__plan-tab:focus-visible {
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
  outline: none;
}

.payment-settings-page__plan-tab--active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.payment-settings-page__plan-tab--active:hover,
.payment-settings-page__plan-tab--active:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.payment-settings-page__plan-tab-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.72);
}

.payment-settings-page__plan-tab-icon svg {
  width: 1.12rem;
  height: 1.12rem;
}

.payment-settings-page__plan-tab--active .payment-settings-page__plan-tab-icon {
  color: #1d4ed8;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(30, 64, 175, 0.18);
}

.payment-settings-page__support-panel {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.payment-settings-page__support-btn {
  min-height: 2.45rem;
  padding: 0.52rem 0.78rem 0.52rem 0.95rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.72rem;
  color: #334155;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.payment-settings-page__support-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  color: #94a3b8;
}

.payment-settings-page__support-btn:hover,
.payment-settings-page__support-btn:focus-visible {
  border-color: #b8c6d8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  outline: none;
}

.payment-settings-page__support-btn:hover svg,
.payment-settings-page__support-btn:focus-visible svg {
  transform: translateX(2px);
}

.payment-settings-page__choice-grid {
  display: grid;
  gap: 0.74rem;
}

.payment-settings-page__choice-grid--period {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-settings-page__choice-grid--payer {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-settings-page__promo-price {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.7fr) minmax(0, 1.45fr) minmax(8rem, 0.62fr);
  gap: 0.74rem;
  margin-top: 0.84rem;
  padding-top: 0.84rem;
  border-top: 1px solid #e2e8f0;
}

.payment-settings-page__promo-gift,
.payment-settings-page__promo-copy,
.payment-settings-page__promo-card {
  min-height: 5.1rem;
  border: 1px solid #cfe0f6;
  border-radius: 0.95rem;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.payment-settings-page__promo-gift {
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-settings-page__promo-gift img {
  width: min(5rem, 78%);
  height: min(5rem, 78%);
  object-fit: contain;
  border-radius: 0.85rem;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.payment-settings-page__promo-copy {
  display: grid;
  align-content: center;
  gap: 0.38rem;
  padding: 0.9rem 1rem;
  color: #0f172a;
}

.payment-settings-page__promo-copy strong {
  font-size: 1rem;
  line-height: 1.25;
}

.payment-settings-page__promo-copy span {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.payment-settings-page__promo-copy em {
  margin-top: 0.12rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid #bfd2ee;
  border-radius: 0.7rem;
  color: #0f172a;
  background: #ffffff;
  text-align: center;
  font-style: normal;
  font-size: 0.88rem;
  font-weight: 850;
}

.payment-settings-page__promo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  padding: 0.8rem;
}

.payment-settings-page__promo-card span {
  color: #2563eb;
  font-size: 1.06rem;
  font-weight: 900;
  line-height: 1.05;
  text-decoration: line-through;
}

.payment-settings-page__promo-card strong {
  color: #2563eb;
  font-size: 1.28rem;
  line-height: 1.05;
}

.payment-settings-page__choice {
  position: relative;
  min-width: 0;
  min-height: 3.2rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #dfe6f0;
  border-radius: 0.78rem;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.payment-settings-page__choice:hover {
  border-color: #b8c6d8;
  background: #f8fafc;
}

.payment-settings-page__choice--selected {
  border-color: #4f86ff;
  background: #f8fbff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.55);
}

.payment-settings-page__choice svg {
  flex: 0 0 auto;
  width: 1.18rem;
  height: 1.18rem;
  color: #64748b;
}

.payment-settings-page__choice--selected svg {
  color: var(--payment-blue);
}

.payment-settings-page__choice strong {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 0.94rem;
  color: #111827;
}

.payment-settings-page__choice small {
  display: block;
  color: #7a8497;
  font-size: 0.84rem;
  font-weight: 700;
}

.payment-settings-page__radio {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  flex: 0 0 auto;
}

.payment-settings-page__choice--selected .payment-settings-page__radio {
  border: 0.32rem solid var(--payment-blue);
}

.payment-settings-page__form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.74rem;
  align-items: start;
}

.payment-settings-page__field {
  display: grid;
  gap: 0.34rem;
  min-width: 0;
  align-content: start;
}

.payment-settings-page__field span {
  color: #475569;
  font-size: 0.83rem;
  font-weight: 700;
}

.payment-settings-page__field small {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.payment-settings-page__field input {
  width: 100%;
  min-height: 2.58rem;
  padding: 0.56rem 0.76rem;
  box-sizing: border-box;
  border: 1px solid #d8e1ec;
  border-radius: 0.66rem;
  color: #1f2937;
  background: #ffffff;
  font-size: 0.95rem;
}

.payment-settings-page__field input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.payment-settings-page__field input:placeholder-shown {
  color: #94a3b8;
}

.payment-settings-page__field select {
  width: 100%;
  min-height: 2.58rem;
  padding: 0.56rem 0.76rem;
  border: 1px solid #d8e1ec;
  border-radius: 0.66rem;
  color: #1f2937;
  background: #ffffff;
  font-size: 0.95rem;
}

.payment-settings-page__field input:focus,
.payment-settings-page__field select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.payment-settings-page__assurance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.86rem 1rem;
}

.payment-settings-page__assurance {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.62rem;
  align-items: start;
}

.payment-settings-page__assurance svg {
  width: 2rem;
  height: 2rem;
  padding: 0.38rem;
  border-radius: 0.55rem;
  color: #16a34a;
  background: #dcfce7;
}

.payment-settings-page__assurance:nth-child(2) svg {
  color: #2563eb;
  background: #dbeafe;
}

.payment-settings-page__assurance:nth-child(3) svg {
  color: #9333ea;
  background: #f3e8ff;
}

.payment-settings-page__assurance strong {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 0.82rem;
  color: #111827;
}

.payment-settings-page__assurance span {
  display: block;
  font-size: 0.76rem;
  line-height: 1.34;
  color: #475569;
}

.payment-settings-page__accept-panel {
  display: grid;
  gap: 0.82rem;
  padding: 0.9rem 1rem 1rem;
}

.payment-settings-page__accept {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.62rem;
  align-items: start;
  color: #334155;
  line-height: 1.4;
}

.payment-settings-page__accept input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.08rem;
  accent-color: var(--payment-blue);
}

.payment-settings-page__accept a {
  color: var(--payment-blue);
  font-weight: 700;
  text-decoration: none;
}

.payment-settings-page__accept a:hover {
  text-decoration: underline;
}

.payment-settings-page__submit {
  min-height: 3.1rem;
  border: 0;
  border-radius: 0.68rem;
  color: #ffffff;
  background: linear-gradient(135deg, #1479ff, #075bea);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.payment-settings-page__submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.payment-settings-page__widget-panel {
  display: grid;
  gap: 0.85rem;
}

.payment-settings-page__widget-container {
  min-height: 420px;
  border: 1px solid #dbe4ef;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #ffffff;
}

.payment-settings-page__summary {
  position: sticky;
  top: 5.25rem;
  padding: 1.55rem 1.7rem;
}

.payment-settings-page__summary-title {
  margin-bottom: 1.4rem;
  font-size: 1.2rem;
}

.payment-settings-page__summary-list,
.payment-settings-page__seller dl {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.payment-settings-page__summary-list div,
.payment-settings-page__seller dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
}

.payment-settings-page__summary-list dt,
.payment-settings-page__seller dt {
  color: #334155;
  font-weight: 700;
}

.payment-settings-page__summary-list dd,
.payment-settings-page__seller dd {
  margin: 0;
  color: #1f2937;
  text-align: right;
}

.payment-settings-page__total {
  margin-top: 1.6rem;
  padding-top: 1.55rem;
  border-top: 1px solid #dbe4ef;
}

.payment-settings-page__total strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
  color: #0f172a;
}

.payment-settings-page__total span {
  display: block;
  margin-top: 0.72rem;
  color: #667085;
  font-weight: 700;
}

.payment-settings-page__features {
  margin-top: 2rem;
}

.payment-settings-page__features h3,
.payment-settings-page__seller h3 {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.payment-settings-page__features ul {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.payment-settings-page__features li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  color: #334155;
}

.payment-settings-page__features li svg {
  width: 0.62rem;
  height: 0.62rem;
  color: var(--payment-blue);
  stroke-width: 3;
}

.payment-settings-page__seller {
  margin-top: 1.7rem;
  padding-top: 1.55rem;
  border-top: 1px solid #dbe4ef;
}

.payment-settings-page__seller p {
  margin: 0 0 1rem;
  color: #334155;
  line-height: 1.45;
}

.payment-settings-page__seller dl {
  gap: 0.7rem;
}

.payment-settings-page__seller a {
  color: var(--payment-blue);
  text-decoration: none;
  font-weight: 700;
}

.payment-settings-page__seller a:hover {
  text-decoration: underline;
}

.payment-settings-page__modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-settings-page__modal {
  width: min(100%, 1040px);
  max-height: min(88vh, 820px);
  border: 1px solid rgba(219, 228, 239, 0.95);
  border-radius: 1.2rem;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.payment-settings-page__consult-modal {
  width: min(100%, 520px);
}

.payment-settings-page__modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.payment-settings-page__modal-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
}

.payment-settings-page__modal-header p {
  margin: 0.26rem 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

.payment-settings-page__modal-header button {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  color: #64748b;
  background: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.payment-settings-page__tariffs-scroll {
  max-height: calc(min(88vh, 820px) - 5rem);
  padding: 0 1rem 1rem;
  overflow: auto;
}

.payment-settings-page__tariffs-scroll [class*="tariffsTable"] {
  margin-top: 1rem;
}

.payment-settings-page__consult-form {
  display: grid;
  gap: 0.82rem;
  padding: 1.05rem 1.15rem 1.15rem;
}

.payment-settings-page__modal-alert {
  padding: 0.7rem 0.8rem;
  border-radius: 0.72rem;
  font-size: 0.88rem;
  line-height: 1.4;
}

.payment-settings-page__modal-alert--error {
  border: 1px solid #fecaca;
  color: #991b1b;
  background: #fff1f2;
}

.payment-settings-page__modal-alert--success {
  border: 1px solid #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.payment-settings-page__invoice-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.35rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 72%);
  text-align: center;
}

.payment-settings-page__invoice-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  color: #15803d;
  background: #dcfce7;
}

.payment-settings-page__invoice-success-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.payment-settings-page__invoice-success-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: #14532d;
}

.payment-settings-page__invoice-success-text {
  margin: 0;
  max-width: 28rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #166534;
}

@media (max-width: 1060px) {
  .payment-settings-page__layout {
    grid-template-columns: 1fr;
  }

  .payment-settings-page__summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .account-settings-page__card {
    border-radius: 1rem;
    padding-bottom: 1rem;
  }

  .account-settings-page__alert,
  .account-settings-page__top-grid,
  .account-settings-page__section {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .account-settings-page__hero {
    padding: 1rem 1rem 0.9rem;
  }

  .account-settings-page__title {
    font-size: 1.26rem;
    line-height: 1.2;
  }

  .account-settings-page__subtitle {
    max-width: none;
    font-size: 0.88rem;
  }

  .account-settings-page__zone,
  .account-settings-page__section {
    padding: 0.85rem;
    border-radius: 0.8rem;
  }

  .account-settings-page__hint-card,
  .account-settings-page__shop-composer,
  .account-settings-page__warehouse-card,
  .account-settings-page__ozon-form {
    padding: 0.75rem;
    border-radius: 0.75rem;
  }

  .account-settings-page__avatar-body {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .account-settings-page__avatar-head {
    flex-direction: column;
    gap: 0.45rem;
  }

  .account-settings-page__avatar-status {
    align-self: flex-start;
  }

  .account-settings-page__manager-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .account-settings-page__section-head {
    margin-bottom: 0.6rem;
  }

  .account-settings-page__primary-action {
    width: 100%;
    justify-content: center;
  }

  .account-settings-page__shop-composer-actions,
  .account-settings-page__form-actions,
  .account-settings-page__warehouse-actions {
    width: 100%;
  }

  .account-settings-page__shop-composer-actions .mpb-btn-primary,
  .account-settings-page__shop-composer-actions .mpb-btn-secondary,
  .account-settings-page__form-actions .mpb-btn-primary,
  .account-settings-page__form-actions .mpb-btn-secondary,
  .account-settings-page__warehouse-actions .mpb-btn-primary,
  .account-settings-page__warehouse-actions .mpb-btn-secondary {
    flex: 1 1 0;
    justify-content: center;
  }

  .account-settings-page__form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .account-settings-page__field,
  .account-settings-page__field--wide,
  .account-settings-page__warehouse-field {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }

  .account-settings-page__table-wrap {
    border: none;
    overflow: visible;
    background: transparent;
  }

  .account-settings-page__table-wrap .transactions-table {
    width: 100%;
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
  }

  .account-settings-page__table-wrap .transactions-table colgroup,
  .account-settings-page__table-wrap .transactions-table thead {
    display: none;
  }

  .account-settings-page__table-wrap .transactions-table tbody {
    display: block;
  }

  .account-settings-page__table-wrap .transactions-table tbody tr {
    display: block;
    margin-bottom: 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #ffffff;
  }

  .account-settings-page__table-wrap .transactions-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .account-settings-page__table-wrap .transactions-table tbody td {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.28rem;
    padding: 0.55rem 0.65rem;
    border-top: 1px solid #f1f5f9;
    white-space: normal !important;
  }

  .account-settings-page__table-wrap .transactions-table tbody td:first-child {
    border-top: none;
  }

  .account-settings-page__table-wrap .transactions-table tbody td::before {
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
  }

  .account-settings-page__table-wrap .transactions-table tbody td[colspan] {
    border-top: none;
  }

  .account-settings-page__table-wrap .transactions-table tbody td[colspan]::before {
    content: none;
  }

  .account-settings-page__table-wrap .transactions-table tbody td[data-label="Действия"] {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .account-settings-page__table-wrap .transactions-table tbody td[data-label="Действия"]::before {
    content: none;
  }

  .account-settings-page__table-wrap .transactions-table tbody tr:nth-child(even) td,
  .account-settings-page__table-wrap .transactions-table tbody tr:hover td {
    background: transparent;
  }

  .account-settings-page__tax-select {
    max-width: none;
  }

  .account-settings-page__total {
    margin-top: 0.6rem;
  }

  .account-settings-page__billing-gateway-head {
    align-items: stretch;
  }

  .account-settings-page__billing-settings-link {
    justify-content: space-between;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #f8fafc;
  }

  .payment-settings-page__choice-grid--period,
  .payment-settings-page__choice-grid--payer,
  .payment-settings-page__form-grid,
  .payment-settings-page__assurance-grid {
    grid-template-columns: 1fr;
  }

  .payment-settings-page__promo-price {
    grid-template-columns: 1fr;
  }

  .payment-settings-page__promo-gift {
    display: none;
  }

  .payment-settings-page__summary {
    padding: 1.15rem;
  }

  .payment-settings-page__panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .payment-settings-page__text-btn,
  .payment-settings-page__support-btn {
    width: 100%;
    justify-content: center;
  }

  .payment-settings-page__modal-backdrop {
    padding: 0.75rem;
  }

  .payment-settings-page__modal {
    max-height: 92vh;
  }
}

@media (max-width: 560px) {
  .account-settings-page__avatar-actions {
    width: 100%;
    flex-direction: column;
  }

  .account-settings-page__avatar-actions .mpb-btn-primary,
  .account-settings-page__avatar-actions .mpb-btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .account-settings-page__vat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-settings-page__vat-option {
    justify-content: center;
  }
}

.sales-onepager-table th,
.sales-onepager-table td {
  vertical-align: top;
}

.sales-onepager-table__product-col {
  min-width: 280px;
}

.sales-onepager-table:not(.sales-onepager-table--transposed) .sales-onepager-table__product-col {
  min-width: 200px;
  width: 200px;
  max-width: 200px;
}

.costs-page .costs-form-card.sales-onepager-filters {
  margin: 0 2.25rem 1.25rem 0;
  padding: 0;
  border: none;
  border-left-width: 0;
  background: transparent;
  box-shadow: none;
}

.sales-onepager-filters {
  display: grid;
  gap: 0.9rem;
}

.sales-onepager-filters-grid {
  display: grid;
  gap: 0.75rem;
  align-items: stretch;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.sales-onepager-filter-group--period { grid-column: span 6; }
.sales-onepager-filter-group--quick { grid-column: span 3; }
.sales-onepager-filter-group--group { grid-column: span 3; }
.sales-onepager-filter-group--search { grid-column: span 2; }
.sales-onepager-filter-group--options { grid-column: span 4; }
.sales-onepager-filter-group--sort { grid-column: span 3; }
.sales-onepager-filter-group--view { grid-column: span 3; }

.sales-onepager-filter-group {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
  padding: 0.62rem 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.sales-onepager-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  line-height: 1.2;
}

.sales-onepager-filter-hint {
  font-size: 0.72rem;
  line-height: 1.2;
  color: #94a3b8;
}

.sales-onepager-date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.42rem;
}

.sales-onepager-date-sep {
  color: #64748b;
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1;
}

.sales-onepager-filter-group input[type="text"],
.sales-onepager-filter-group input[type="date"] {
  height: 2.15rem;
  border: 1px solid #d1d5db;
  border-radius: 0.52rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.82rem;
  padding: 0.45rem 0.68rem;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sales-onepager-filter-group input[type="text"]:focus,
.sales-onepager-filter-group input[type="date"]:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.sales-onepager-quick-buttons,
.sales-onepager-group-buttons {
  display: grid;
  gap: 0.4rem;
}

.sales-onepager-quick-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sales-onepager-group-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sales-onepager-quick-buttons .mpb-btn-secondary,
.sales-onepager-group-buttons .mpb-btn-secondary {
  width: 100%;
  justify-content: center;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.sales-onepager-quick-buttons .mpb-btn-secondary.is-active,
.sales-onepager-group-buttons .mpb-btn-secondary.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.24);
}

.sales-onepager-options-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: center;
}

.sales-onepager-options-list:empty::before {
  content: "Нет доступных опций";
  font-size: 0.74rem;
  color: #94a3b8;
  grid-column: 1 / -1;
}

.sales-onepager-metrics {
  margin-top: 0.8rem;
  border: none;
  border-radius: 0;
  padding: 0.55rem 0 0;
  background: transparent;
}

.sales-onepager-metrics__head {
  margin-bottom: 0.75rem;
}

.sales-onepager-metrics__groups {
  display: grid;
  gap: 0.7rem;
}

.sales-onepager-metrics-group {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.55rem;
}

.sales-onepager-metrics-group:first-child {
  border-top: none;
  padding-top: 0;
}

.sales-onepager-metrics-group__title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.38rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sales-onepager-metrics-group__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.sales-onepager-metrics-group__toggle .sales-onepager-metrics-group__title {
  margin-bottom: 0;
}

.sales-onepager-metrics-group__chevron {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1;
}

.sales-onepager-metrics-group__toggle + .sales-onepager-metrics__box,
.sales-onepager-metrics-group__toggle + .sales-onepager-metrics-subgroup {
  margin-top: 0.45rem;
}

.sales-onepager-metrics-subgroup + .sales-onepager-metrics-subgroup {
  margin-top: 0.45rem;
}

.sales-onepager-metrics-subgroup__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.34rem;
}

.sales-onepager-metrics__box {
  max-height: 8.25rem;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.4rem;
  padding-right: 0.15rem;
}

.sales-onepager-metric-chip {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 0.6rem;
  padding: 0.43rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-start;
  font-size: 0.8rem;
  font-weight: 600;
}

.sales-onepager-metric-chip:hover {
  border-color: #94a3b8;
}

.sales-onepager-metric-chip.is-active {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

@media (max-width: 1320px) {
  .sales-onepager-filter-group--period { grid-column: span 6; }
  .sales-onepager-filter-group--quick { grid-column: span 3; }
  .sales-onepager-filter-group--group { grid-column: span 3; }
  .sales-onepager-filter-group--search { grid-column: span 2; }
  .sales-onepager-filter-group--options { grid-column: span 4; }
  .sales-onepager-filter-group--sort { grid-column: span 3; }
  .sales-onepager-filter-group--view { grid-column: span 3; }

  .sales-onepager-quick-buttons,
  .sales-onepager-group-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sales-onepager-total-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #475569;
  white-space: nowrap;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 999px;
  padding: 0.27rem 0.62rem 0.27rem 0.5rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.sales-onepager-total-toggle:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.sales-onepager-total-toggle input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: #2563eb;
}

.sales-onepager-total-toggle__label {
  font-weight: 600;
  color: #334155;
}

.sales-onepager-total-toggle input:checked + .sales-onepager-total-toggle__label {
  color: #1d4ed8;
}

.sales-onepager-layout-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.sales-onepager-layout-toggle {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 0.5rem;
  padding: 0.25rem;
  gap: 0.2rem;
  width: 100%;
  min-width: 0;
}

.sales-onepager-layout-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  flex: 1 1 0;
  padding: 0.35rem 0.75rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: #6b7280;
  background: transparent;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
  text-align: center;
}

.sales-onepager-layout-btn:hover {
  color: #374151;
  background: #e9eef5;
}

.sales-onepager-layout-btn:disabled,
.sales-onepager-layout-btn:disabled:hover {
  color: #9ca3af;
  background: transparent;
  box-shadow: none;
  cursor: not-allowed;
}

.sales-onepager-layout-btn.is-active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}

.sales-onepager-fixed-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  z-index: 260;
  display: none;
  pointer-events: none;
}

.sales-onepager-fixed-head__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border-left: 1px solid var(--mpb-gray-200);
  border-right: 1px solid var(--mpb-gray-200);
  border-bottom: 1px solid var(--mpb-gray-200);
  box-shadow: 0 10px 18px -14px rgba(15, 23, 42, 0.45);
  scrollbar-width: none;
}

.sales-onepager-fixed-head__viewport::-webkit-scrollbar {
  display: none;
}

.sales-onepager-table--fixed-head {
  min-width: 100%;
}

.sales-onepager-table--fixed-head th {
  background: var(--mpb-gray-50);
}

.sales-onepager-table--rows th,
.sales-onepager-table--rows td {
  padding: 0.42rem 0.55rem;
  font-size: 0.79rem;
}

.sales-onepager-table--rows .sales-onepager-period-th,
.sales-onepager-table--rows .sales-onepager-total-th,
.sales-onepager-table--rows .sales-onepager-value-cell,
.sales-onepager-table--rows .sales-onepager-compare-th,
.sales-onepager-table--rows .sales-onepager-compare-cell {
  min-width: 82px;
}

.sales-onepager-table--rows .sales-onepager-compare-th,
.sales-onepager-table--rows .sales-onepager-compare-cell {
  min-width: 72px;
  width: 72px;
  max-width: 72px;
  padding-left: 0.32rem;
  padding-right: 0.32rem;
}

.sales-onepager-table--rows .sales-onepager-metric-block-start {
  border-left: 2px solid #cbd5e1 !important;
}

.sales-onepager-metric-head-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.15;
  max-height: 2.3em;
}

.sales-onepager-compare-tone.is-empty {
  color: #94a3b8;
}

.sales-onepager-compare-tone.is-pos {
  color: #059669;
  font-weight: 700;
}

.sales-onepager-compare-tone.is-neg {
  color: #dc2626;
  font-weight: 700;
}

.sales-onepager-compare-tone.is-zero {
  color: #475569;
  font-weight: 600;
}

.sales-onepager-table--transposed .sales-onepager-table__product-col {
  min-width: 150px;
  width: 150px;
  max-width: 150px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.sales-onepager-table--transposed th.sales-onepager-transposed-th {
  min-width: 108px;
  width: 108px;
  max-width: 108px;
  padding-left: 0.45rem !important;
  padding-right: 0.45rem !important;
}

.sales-onepager-transposed-col-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  padding: 0.26rem 0 0.42rem;
  text-align: left;
}

.sales-onepager-transposed-col-head .sales-onepager-product__thumb {
  width: 1.2rem;
  height: 1.72rem;
}

.sales-onepager-transposed-col-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
  text-align: left;
  width: 100%;
}

.sales-onepager-transposed-col-sku {
  font-size: 0.63rem;
  color: #94a3b8;
  line-height: 1.1;
  text-align: left;
  width: 100%;
  max-width: 86px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-onepager-transposed-metric-main td {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.sales-onepager-transposed-period-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.sales-onepager-transposed-compare-label {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

.sales-onepager-transposed-value {
  text-align: center;
}

.sales-onepager-transposed-period-value {
  line-height: 1.15;
}

.sales-onepager-transposed-period-delta {
  margin-top: 0.12rem;
  font-size: 0.72rem;
  line-height: 1.1;
}

.sales-onepager-transposed-metric-title {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.2;
}

.sales-onepager-transposed-metric-title strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.2;
  max-height: 2.4em;
}

.sales-onepager-table .sales-onepager-table__product-col {
  position: sticky;
  left: 0;
  z-index: 6;
  background: #fff;
  box-shadow: 2px 0 0 var(--mpb-gray-100);
}

.sales-onepager-table thead .sales-onepager-table__product-col {
  z-index: 12;
  background: var(--mpb-gray-50);
}

.sales-onepager-table--rows tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.sales-onepager-table--rows tbody tr:nth-child(even) .sales-onepager-table__product-col {
  background: #f8fafc;
}

.sales-onepager-table--rows tbody tr:nth-child(odd) .sales-onepager-table__product-col {
  background: #fff;
}

.sales-onepager-product {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sales-onepager-product__thumb {
  width: 2.08rem;
  height: 2.82rem;
  border-radius: 0.62rem;
  border: 1px solid #d7e3f4;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  flex: 0 0 auto;
}

.sales-onepager-product__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sales-onepager-product__name {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.sales-onepager-product__meta {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #64748b;
}

.sales-onepager-product--head {
  align-items: flex-start;
}

.sales-onepager-table--transposed th {
  min-width: 118px;
}

.sales-onepager-table--transposed th,
.sales-onepager-table--transposed td {
  padding: 0.34rem 0.38rem;
}

@media (max-width: 980px) {
  .sales-onepager-table__product-col {
    min-width: 230px;
  }

  .sales-onepager-filters-grid {
    grid-template-columns: 1fr;
  }

  .sales-onepager-filter-group--period,
  .sales-onepager-filter-group--quick,
  .sales-onepager-filter-group--search,
  .sales-onepager-filter-group--group,
  .sales-onepager-filter-group--options,
  .sales-onepager-filter-group--sort,
  .sales-onepager-filter-group--view {
    grid-column: 1 / -1;
  }

  .sales-onepager-filter-group--period input[type="date"] {
    min-width: 0;
    width: 100%;
  }

  .sales-onepager-date-range {
    grid-template-columns: 1fr;
  }

  .sales-onepager-date-sep {
    display: none;
  }

  .sales-onepager-quick-buttons,
  .sales-onepager-group-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-onepager-options-list {
    grid-template-columns: 1fr;
  }

  .sales-onepager-table:not(.sales-onepager-table--transposed) .sales-onepager-table__product-col {
    min-width: 176px;
    width: 176px;
    max-width: 176px;
  }

  .sales-onepager-product__name {
    max-width: 220px;
  }

  .sales-onepager-metrics__box {
    grid-template-columns: 1fr;
  }

  .sales-onepager-table--transposed .sales-onepager-table__product-col {
    min-width: 132px;
    width: 132px;
    max-width: 132px;
  }

  .sales-onepager-table--transposed th.sales-onepager-transposed-th {
    min-width: 96px;
    width: 96px;
    max-width: 96px;
  }
}

/* Sales today (hourly compare) */
.sales-today-page__date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.sales-today-page__date-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.26rem 0.6rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-size: 0.77rem;
  font-weight: 700;
}

.sales-today-page__controls {
  margin-top: 1rem;
}

.sales-today-page__kpis-caption {
  margin: 0 0 0.45rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@keyframes sales-today-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.sales-today-page__skeleton-line {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 45%, #eef2f7 100%);
  background-size: 200% 100%;
  animation: sales-today-shimmer 1.35s ease-in-out infinite;
}

.sales-today-page__kpi--skeleton {
  pointer-events: none;
}

.sales-today-page__kpi--skeleton span,
.sales-today-page__kpi--skeleton strong {
  visibility: hidden;
}

.sales-today-page__kpi--skeleton .sales-today-page__skeleton-line {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
}

.sales-today-page__kpi--skeleton .sales-today-page__skeleton-line--label {
  top: 0.72rem;
  height: 0.62rem;
  width: 42%;
}

.sales-today-page__kpi--skeleton .sales-today-page__skeleton-line--value {
  bottom: 0.72rem;
  height: 1.05rem;
  width: 58%;
}

.sales-today-page__chart-skeleton {
  position: relative;
  min-height: 280px;
  border-radius: 12px;
  border: 1px solid #e8eef5;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
  overflow: hidden;
}

.sales-today-page__chart-skeleton-grid {
  position: absolute;
  inset: 1.25rem 1rem 2.5rem 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sales-today-page__chart-skeleton-grid span {
  display: block;
  height: 1px;
  background: #e8eef5;
}

.sales-today-page__chart-skeleton-wave {
  position: absolute;
  inset: 1.25rem 1rem 2.5rem 2.75rem;
  opacity: 0.55;
}

.sales-today-page__chart-skeleton-wave svg {
  width: 100%;
  height: 100%;
}

.sales-today-page__chart-skeleton-status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.sales-today-page__chart-skeleton-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
  animation: sales-today-pulse 1.1s ease-in-out infinite;
}

@keyframes sales-today-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.sales-today-page__chart-topbar--skeleton {
  opacity: 0.92;
}

.dashboard-page .sales-today-page--account .sales-today-page__controls,
.dashboard-page .sales-today-page--account .sales-today-page__chart-card {
  margin-left: 2.25rem;
  margin-right: 2.25rem;
}

.sales-today-page__kpis {
  display: flex;
  gap: 0.72rem;
}

.sales-today-page__mode-switch {
  display: flex;
  align-items: stretch;
}

.sales-today-page__mode-switch .ue2-layout-toggle {
  height: 100%;
}

.sales-today-page__mode-switch--chart {
  margin-left: auto;
}

.sales-today-page__mode-switch--chart .ue2-layout-btn {
  padding-left: 0.62rem;
  padding-right: 0.62rem;
}

.sales-today-page__kpi {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.72rem;
  border-radius: 0.7rem;
  border: 1px solid #dbe5f0;
  background: #fff;
  position: relative;
}

.sales-today-page__kpi span {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.sales-today-page__kpi strong {
  font-size: 1.08rem;
  color: #0f172a;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.sales-today-page__chart-card {
  margin-top: 0.75rem;
}

.sales-today-page__chart-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.sales-today-page__chart-legend {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
  min-width: 0;
}

.sales-today-page__chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.sales-today-page__chart-legend-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.sales-today-page__chart-legend-dot--today {
  background: #2563eb;
}

.sales-today-page__chart-legend-dot--yesterday {
  background: #0ea5e9;
}

.sales-today-page__chart-legend-dot--week-ago {
  background: #22c55e;
}

.sales-today-page__chart-wrap {
  width: 100%;
  height: 430px;
}

.sales-today-page__chart-mode {
  display: block;
}

.sales-today-page__chart-mode.is-orders {
  height: 430px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sales-today-page__chart-mode.is-products {
  height: 430px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sales-today-page__orders-inline-head {
  display: grid;
  gap: 0.08rem;
}

.sales-today-page__orders-inline-head strong {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
}

.sales-today-page__orders-inline-head span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.sales-today-page__orders-inline-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  height: 100%;
  min-height: 0;
}

.sales-today-page__chart-mode.is-orders .sales-today-page__orders-inline-list {
  flex: 1 1 auto;
  min-height: 0;
}

.sales-today-page__products-inline-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.sales-today-page__orders-inline-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.sales-today-page__orders-inline-table {
  border: 1px solid #dbe5f0;
  border-radius: 0.82rem;
  overflow: hidden;
  background: #fff;
}

.sales-today-page__orders-inline-head-row,
.sales-today-page__orders-inline-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.65fr)
    minmax(120px, 0.78fr)
    minmax(0, 0.98fr)
    minmax(110px, 0.7fr)
    minmax(130px, 0.82fr);
  align-items: center;
  gap: 0.7rem;
  padding: 0.48rem 0.62rem;
}

.sales-today-page__orders-inline-head-row {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.sales-today-page__orders-inline-head-row span {
  color: #64748b;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.sales-today-page__orders-inline-head-row span:nth-last-child(-n + 2) {
  text-align: right;
  justify-self: end;
}

.sales-today-page__orders-inline-row {
  border-bottom: 1px solid #eef2f7;
}

.sales-today-page__orders-inline-row:last-child {
  border-bottom: none;
}

.sales-today-page__orders-inline-product {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 0.52rem;
  min-width: 0;
}

.sales-today-page__orders-inline-photo-wrap {
  width: 48px;
}

.sales-today-page__orders-inline-photo {
  width: 48px;
  height: 62px;
  border-radius: 0.42rem;
  background: #f1f5f9;
  object-fit: cover;
  object-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sales-today-page__orders-inline-product-text {
  min-width: 0;
}

.sales-today-page__orders-inline-name {
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-today-page__orders-inline-sku {
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.67rem;
  font-weight: 600;
}

.sales-today-page__orders-inline-row > span,
.sales-today-page__orders-inline-row > strong {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-today-page__orders-inline-row > span {
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
}

.sales-today-page__orders-inline-row > strong {
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: right;
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.sales-today-page__orders-inline-metric {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.sales-today-page__orders-inline-metric.is-positive {
  color: #047857;
}

.sales-today-page__orders-inline-metric.is-negative {
  color: #b91c1c;
}

.sales-today-page__orders-more-wrap {
  display: flex;
  justify-content: center;
}

.sales-today-page__orders-more-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.sales-today-page__orders-more-btn:hover {
  background: #f8fafc;
}

.sales-today-page__orders-more-btn:disabled {
  opacity: 0.62;
  cursor: default;
}

.sales-today-page__products-card {
  margin-top: 0.75rem;
}

.sales-today-page__orders-card {
  margin-top: 0.75rem;
}

.sales-today-page__products-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.sales-today-page__products-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.sales-today-page__products-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 700;
}

.sales-today-page__products-list {
  display: grid;
  gap: 0.6rem;
}

.sales-today-page__product-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  border: 1px solid #dbe5f0;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.55rem;
}

.sales-today-page__product-photo-wrap {
  width: 64px;
}

.sales-today-page__product-photo {
  width: 64px;
  height: 88px;
  border-radius: 0.55rem;
  background: #f1f5f9;
  object-fit: cover;
  object-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sales-today-page__product-photo--empty {
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
}

.sales-today-page__product-main {
  min-width: 0;
}

.sales-today-page__product-name {
  margin: 0;
  color: #0f172a;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sales-today-page__product-sku {
  margin-top: 0.16rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.sales-today-page__product-metrics {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.sales-today-page__product-metric {
  border: 1px solid #dbe5f0;
  border-radius: 0.6rem;
  padding: 0.35rem 0.4rem;
  background: #f8fafc;
}

.sales-today-page__product-metric span {
  display: block;
  color: #64748b;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.sales-today-page__product-metric strong {
  display: block;
  margin-top: 0.12rem;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.sales-today-page__product-metric-sub {
  display: block;
  margin-top: 0.14rem;
  color: #94a3b8;
  font-size: 0.61rem;
  font-weight: 600;
  line-height: 1.2;
}

.sales-today-page__orders-groups {
  display: grid;
  gap: 0.7rem;
}

.sales-today-page__order-group {
  border: 1px solid #dbe5f0;
  border-radius: 0.8rem;
  background: #fff;
  overflow: hidden;
}

.sales-today-page__order-group-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.sales-today-page__order-group-main {
  min-width: 0;
}

.sales-today-page__order-group-total {
  text-align: right;
  display: grid;
  gap: 0.1rem;
}

.sales-today-page__order-group-total span {
  color: #64748b;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.sales-today-page__order-group-total strong {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.sales-today-page__orders-table {
  display: grid;
}

.sales-today-page__orders-table-head,
.sales-today-page__orders-table-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.85fr) minmax(0, 1.6fr) minmax(96px, 0.75fr);
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
}

.sales-today-page__orders-table-head {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.sales-today-page__orders-table-head span {
  color: #64748b;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.sales-today-page__orders-table-row {
  border-bottom: 1px solid #eef2f7;
}

.sales-today-page__orders-table-row:last-child {
  border-bottom: none;
}

.sales-today-page__orders-table-row span,
.sales-today-page__orders-table-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-today-page__orders-table-row span {
  color: #334155;
  font-size: 0.76rem;
  font-weight: 600;
}

.sales-today-page__orders-table-row strong {
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sales-actions-page__table th,
.sales-actions-page__table td {
  vertical-align: top;
}

.sales-actions-page .mpb-card {
  border: none;
}

.sales-actions-page .costs-table-wrap.sales-actions-page__table-wrap {
  margin-top: 0.85rem;
  border: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.sales-actions-page__header-desc {
  margin: 0.55rem 0 0;
  max-width: 88ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mpb-gray-500);
}

.sales-actions-page__header-desc code {
  font-size: 0.82em;
}

.sales-actions-page__table thead th {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.sales-actions-page__row-clickable {
  cursor: pointer;
}

.sales-actions-page__row-clickable:hover {
  background: #f8fbff;
}

.sales-actions-page__id-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.sales-actions-page__participation-dot {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 1px #bbf7d0;
  flex: 0 0 auto;
}

.sales-actions-page__description {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-action-products-page__header {
  display: block;
  padding: 1.35rem 2.25rem 0.75rem 0;
}

.sales-action-products-page .mpb-card {
  border: none;
}

.sales-action-products-page__back-link-wrap {
  margin: 0 0 0.9rem;
}

.sales-action-products-page__meta {
  margin: 0.55rem 0 0;
  max-width: 88ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mpb-gray-500);
}

.sales-action-products-page__alert {
  margin: 1rem 1.75rem 0;
}

.sales-action-products-page__loading {
  margin: 1.25rem 1.75rem 2rem;
}

.sales-action-products-page .costs-table-wrap.sales-action-products-page__table-wrap {
  margin: 0;
  padding-top: 0.8rem;
  border: none;
}

.sales-action-products-page__sections {
  display: grid;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem 1.9rem;
}

.sales-action-products-page__auto-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 600;
}

.sales-action-products-page__auto-legend-mark {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 2px #fef3c7;
}

.sales-action-products-page__table-title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
}

.sales-action-products-page__table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.sales-action-products-page__table-head .sales-action-products-page__table-title {
  margin: 0;
}

.sales-action-products-page__batch-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.sales-action-products-page__batch-count {
  font-size: 0.8rem;
  color: #64748b;
}

.sales-action-products-page__batch-btn {
  border-radius: 999px;
  border: 1px solid #dbe5f0;
  background: #ffffff;
  color: #334155;
  padding: 0.34rem 0.78rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.sales-action-products-page__batch-btn--remove {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff5f5;
}

.sales-action-products-page__batch-btn--add {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.sales-action-products-page__batch-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.sales-action-products-page__table th,
.sales-action-products-page__table td {
  vertical-align: top;
}

.sales-action-products-page__row--auto td {
  background: #fffbeb;
}

.sales-action-products-page__row--auto:hover td {
  background: #fef3c7;
}

.sales-action-products-page__margin {
  font-weight: 700;
  white-space: nowrap;
}

.sales-action-products-page__margin-btn {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.sales-action-products-page__margin--pos {
  color: #166534;
}

.sales-action-products-page__margin--neg {
  color: #b91c1c;
}

.sales-action-products-page__select-col {
  width: 36px;
  min-width: 36px;
}

.sales-action-products-page__select-cell {
  width: 36px;
  text-align: center;
}

.sales-action-products-page__select-col input,
.sales-action-products-page__select-cell input {
  width: 14px;
  height: 14px;
  accent-color: #2563eb;
}

.sales-action-products-page__price-input {
  width: 100%;
  min-width: 112px;
  max-width: 132px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.26rem 0.44rem;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #0f172a;
  background: #ffffff;
}

.sales-action-products-page__price-input::placeholder {
  color: #94a3b8;
}

.sales-action-products-page__price-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.16);
}

.sales-action-products-page__photo-col {
  width: 56px;
  min-width: 56px;
}

.sales-action-products-page__photo-cell {
  text-align: center;
}

.sales-action-products-page__photo {
  width: 2.08rem;
  height: 2.82rem;
  object-fit: cover;
  border: 1px solid #d7e3f4;
  border-radius: 0.62rem;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.sales-action-products-page__photo--empty {
  background: #f1f5f9;
}

.sales-action-products-page__action-col {
  width: 52px;
}

.sales-action-products-page__action-cell {
  text-align: right;
}

.sales-action-products-page__deactivate-btn {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #dc2626;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
}

.sales-action-products-page__deactivate-btn:hover {
  background: #fee2e2;
}

.sales-action-products-page__deactivate-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.sales-action-products-page__activate-btn {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
}

.sales-action-products-page__activate-btn:hover {
  background: #dcfce7;
}

.sales-action-products-page__activate-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.sales-action-products-page__confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.sales-action-products-page__confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(3px);
}

.sales-action-products-page__confirm-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 2rem));
  border: 1px solid #dbe5f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:
    0 30px 60px rgba(15, 23, 42, 0.28),
    0 8px 18px rgba(15, 23, 42, 0.12);
  padding: 1.2rem 1.25rem 1.25rem;
}

.sales-action-products-page__profit-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 2rem));
  border: 1px solid #dbe5f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:
    0 30px 60px rgba(15, 23, 42, 0.28),
    0 8px 18px rgba(15, 23, 42, 0.12);
  padding: 1.2rem 1.25rem 1.25rem;
}

.sales-action-products-page__confirm-head {
  display: grid;
  gap: 0.45rem;
}

.sales-action-products-page__confirm-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #fed7d7;
  background: #fff1f2;
  color: #be123c;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sales-action-products-page__confirm-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  color: #0f172a;
}

.sales-action-products-page__confirm-subtitle {
  margin: 0;
  color: #475569;
  line-height: 1.5;
  font-size: 0.92rem;
}

.sales-action-products-page__confirm-product {
  margin-top: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid #dce8f8;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.7rem 0.75rem;
}

.sales-action-products-page__confirm-photo {
  width: 40px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #d7e3f4;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}

.sales-action-products-page__confirm-photo--empty {
  background: #f1f5f9;
}

.sales-action-products-page__confirm-meta {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.sales-action-products-page__confirm-meta strong {
  color: #0f172a;
  font-size: 0.96rem;
}

.sales-action-products-page__confirm-meta span {
  color: #64748b;
  font-size: 0.84rem;
}

.sales-action-products-page__profit-table {
  margin-top: 0.9rem;
  border: 1px solid #dce8f8;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.sales-action-products-page__profit-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.3fr) minmax(120px, 1fr) minmax(84px, 0.8fr);
  align-items: center;
  gap: 0.6rem;
  padding: 0.58rem 0.7rem;
  border-top: 1px solid #edf2f7;
}

.sales-action-products-page__profit-row:first-child {
  border-top: 0;
}

.sales-action-products-page__profit-row span:nth-child(2),
.sales-action-products-page__profit-row span:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sales-action-products-page__profit-row--head {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sales-action-products-page__profit-row--accent {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

.sales-action-products-page__confirm-actions {
  margin-top: 1.05rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.62rem;
}

.sales-action-products-page__confirm-cancel,
.sales-action-products-page__confirm-submit {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.58rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.sales-action-products-page__confirm-cancel {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.sales-action-products-page__confirm-cancel:hover {
  background: #f8fafc;
}

.sales-action-products-page__confirm-submit {
  border-color: #fecaca;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.25);
}

.sales-action-products-page__confirm-submit:hover {
  filter: brightness(0.98);
}

.sales-action-products-page__confirm-cancel:disabled,
.sales-action-products-page__confirm-submit:disabled {
  opacity: 0.65;
  cursor: default;
  box-shadow: none;
}

@media (max-width: 980px) {
  .dashboard-page .sales-today-page--account .sales-today-page__controls,
  .dashboard-page .sales-today-page--account .sales-today-page__chart-card {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }

  .sales-today-page__kpis {
    gap: 0.5rem;
  }

  .sales-action-products-page__header {
    flex-direction: column;
    align-items: stretch;
  }

  .sales-action-products-page__sections {
    padding: 1rem 1.1rem 1.4rem;
    gap: 1.1rem;
  }

  .sales-action-products-page__table-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .sales-action-products-page .costs-table-wrap.sales-action-products-page__table-wrap {
    padding-top: 0.7rem;
  }

  .sales-action-products-page__alert,
  .sales-action-products-page__loading {
    margin-left: 1.1rem;
    margin-right: 1.1rem;
  }

  .sales-action-products-page__confirm-dialog {
    width: min(520px, calc(100vw - 1.25rem));
    padding: 1rem 1rem 1.05rem;
    border-radius: 14px;
  }

  .sales-action-products-page__profit-dialog {
    width: min(520px, calc(100vw - 1.25rem));
    padding: 1rem 1rem 1.05rem;
    border-radius: 14px;
  }

  .sales-action-products-page__confirm-actions {
    justify-content: stretch;
  }

  .sales-action-products-page__confirm-cancel,
  .sales-action-products-page__confirm-submit {
    flex: 1 1 0;
  }

  .sales-action-products-page__profit-row {
    grid-template-columns: minmax(110px, 1fr) minmax(100px, 0.9fr) minmax(76px, 0.75fr);
  }
}

@media (max-width: 640px) {
  .dashboard-page .sales-today-page--account .sales-today-page__controls,
  .dashboard-page .sales-today-page--account .sales-today-page__chart-card {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .dashboard-page .sales-today-page--account .costs-form-card {
    padding: 0.58rem 0.4rem;
  }

  .sales-today-page__chart-wrap {
    height: 315px;
  }

  .sales-today-page__chart-mode.is-orders {
    height: 315px;
  }

  .sales-today-page__chart-mode.is-products {
    height: 315px;
  }

  .sales-today-page__kpi {
    padding: 0.28rem 0.24rem;
    align-items: center;
    text-align: center;
    border-radius: 0.56rem;
  }

  .sales-today-page__kpis-caption {
    margin-bottom: 0.24rem;
    font-size: 0.54rem;
    letter-spacing: 0.02em;
  }

  .sales-today-page__kpis {
    gap: 0.28rem;
  }

  .sales-today-page__kpi span {
    font-size: 0.52rem;
    letter-spacing: 0.01em;
    line-height: 1.08;
  }

  .sales-today-page__kpi strong {
    font-size: 0.74rem;
    line-height: 1.05;
  }

  .sales-today-page__chart-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .sales-today-page__chart-legend {
    gap: 0.3rem;
    order: 2;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
  }

  .sales-today-page__chart-legend-item {
    gap: 0.18rem;
    font-size: 0.54rem;
    line-height: 1.1;
  }

  .sales-today-page__chart-legend-dot {
    width: 0.44rem;
    height: 0.44rem;
  }

  .sales-today-page__orders-inline-head {
    order: 2;
    justify-items: center;
    text-align: center;
  }

  .sales-today-page__mode-switch--chart {
    margin-left: 0;
    width: 100%;
    order: 1;
  }

  .sales-today-page__mode-switch--chart .ue2-layout-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 0.9fr);
    gap: 0.08rem;
    padding: 0.08rem;
  }

  .sales-today-page--with-products .sales-today-page__mode-switch--chart .ue2-layout-toggle {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.28fr) minmax(0, 0.9fr) minmax(0, 0.94fr);
  }

  .sales-today-page__mode-switch--chart .ue2-layout-btn {
    min-height: 1.86rem;
    padding: 0.12rem 0.1rem;
    font-size: 0.54rem;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }

  .sales-today-page__orders-inline-head-row,
  .sales-today-page__orders-inline-row {
    grid-template-columns: 30px minmax(86px, 1fr) minmax(70px, auto) minmax(76px, auto);
    gap: 0.26rem;
    padding: 0.24rem 0.3rem;
  }

  .sales-today-page__orders-inline-head-row span {
    font-size: 0.52rem;
    letter-spacing: 0.02em;
    white-space: normal;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .sales-today-page__orders-inline-head-row span:nth-child(3),
  .sales-today-page__orders-inline-row > span:nth-child(3) {
    display: none;
  }

  .sales-today-page__orders-inline-head-row span:nth-child(2),
  .sales-today-page__orders-inline-row > span:first-of-type {
    padding-left: 0.28rem;
  }

  .sales-today-page__orders-inline-product {
    grid-template-columns: 30px;
    gap: 0;
  }

  .sales-today-page__orders-inline-photo-wrap {
    width: 30px;
  }

  .sales-today-page__orders-inline-photo {
    width: 30px;
    height: 39px;
    border-radius: 0.32rem;
  }

  .sales-today-page__orders-inline-product-text {
    display: none;
  }

  .sales-today-page__orders-inline-name {
    font-size: 0.69rem;
  }

  .sales-today-page__orders-inline-sku {
    font-size: 0.6rem;
  }

  .sales-today-page__orders-inline-row > span {
    font-size: 0.66rem;
  }

  .sales-today-page__orders-inline-row > strong {
    font-size: 0.69rem;
  }

  .sales-today-page__orders-inline-list {
    padding-right: 0;
  }

  .sales-today-page__orders-inline-scroll {
    padding-right: 0;
  }

  .sales-today-page__products-inline-list {
    padding-right: 0;
  }

  .sales-today-page__order-group-head {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0.6rem;
    padding: 0.48rem;
  }

  .sales-today-page__order-group-total {
    grid-column: 1 / -1;
    text-align: left;
    padding-top: 0.2rem;
  }

  .sales-today-page__orders-table-head,
  .sales-today-page__orders-table-row {
    grid-template-columns: minmax(88px, 0.9fr) minmax(0, 1.45fr) minmax(84px, 0.75fr);
    gap: 0.4rem;
    padding: 0.38rem 0.42rem;
  }

  .sales-today-page__orders-table-head span {
    font-size: 0.56rem;
    letter-spacing: 0.02em;
  }

  .sales-today-page__orders-table-row span {
    font-size: 0.68rem;
  }

  .sales-today-page__orders-table-row strong {
    font-size: 0.72rem;
  }

  .sales-today-page__product-row {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0.6rem;
    padding: 0.48rem;
  }

  .sales-today-page__product-photo-wrap {
    width: 56px;
  }

  .sales-today-page__product-photo {
    width: 56px;
    height: 78px;
  }

  .sales-today-page__product-metrics {
    gap: 0.32rem;
  }

  .sales-today-page__product-metric {
    padding: 0.3rem 0.3rem;
  }

  .sales-today-page__product-metric span {
    font-size: 0.58rem;
    letter-spacing: 0.02em;
  }

  .sales-today-page__product-metric strong {
    font-size: 0.72rem;
    margin-top: 0.08rem;
  }

  .sales-today-page__product-metric-sub {
    font-size: 0.56rem;
    margin-top: 0.1rem;
  }
}

/* Blog */
.blog-page .costs-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.25rem;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 30%),
    linear-gradient(135deg, #091321 0%, #10243f 48%, #16345b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.blog-page__header-mark {
  flex: 0 0 auto;
  width: 4rem;
  border-radius: 0.65rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 32px rgba(8, 18, 36, 0.22);
}

.blog-page__header-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.blog-page__header-body {
  flex: 1 1 14rem;
  min-width: 0;
}

.blog-page .costs-header .mpb-section-title,
.blog-page .costs-header .mpb-section-desc {
  color: #fff;
}

.blog-page .costs-header .mpb-section-desc {
  color: rgba(255, 255, 255, 0.82);
}

.blog-site-shell {
  --blog-layout-max: 1180px;
  --blog-layout-gutter: 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
}

.blog-site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  background: rgba(255, 255, 255, 0.78);
}

.blog-site-header__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.blog-site-brand {
  color: #0f172a;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.blog-site-nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: 0.4rem;
}

.blog-site-nav a {
  color: #334155;
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.34rem 0.6rem;
  border-radius: 999px;
  transition: background 0.16s ease, color 0.16s ease;
}

.blog-site-nav a:hover {
  background: #eef2ff;
  color: #0f172a;
}

.blog-site-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-site-auth__link {
  color: #334155;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.32rem 0.56rem;
  border-radius: 999px;
}

.blog-site-auth__link:hover {
  background: #f1f5f9;
}

.blog-site-auth__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.72rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 700;
  color: #fff;
  background: #047857;
}

.blog-site-main {
  flex: 1;
  width: 100%;
  padding: 0 var(--blog-layout-gutter);
}

.blog-site-main .blog-page {
  width: min(var(--blog-layout-max), 100%);
  max-width: none;
  margin: 0 auto;
  padding: 1.1rem 0 1.5rem;
}

.blog-site-footer {
  border-top: 1px solid rgba(226, 232, 240, 0.88);
  background: #f3f4f6;
  padding: 0 var(--blog-layout-gutter);
}

.blog-site-footer__inner {
  width: min(var(--blog-layout-max), 100%);
  max-width: none;
  margin: 0 auto;
  padding: 1.05rem 0 1.2rem;
}

.blog-site-footer__main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.blog-site-footer__brand {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
}

.blog-site-footer__text {
  margin-top: 0.32rem;
  max-width: 48ch;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.blog-site-footer__links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.blog-site-footer__links a {
  color: #334155;
  text-decoration: none;
  font-size: 0.83rem;
}

.blog-site-footer__links a:hover {
  text-decoration: underline;
}

.blog-site-footer__legal {
  display: flex;
  gap: 0.35rem 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(226, 232, 240, 0.86);
  color: rgba(100, 116, 139, 0.72);
  font-size: 0.74rem;
  line-height: 1.45;
}

.blog-page__body {
  padding: 1.5rem 1.75rem 1.9rem;
  display: grid;
  gap: 1.15rem;
}

.blog-page__body--hub {
  gap: 1.35rem;
}

.blog-page__card-shell {
  overflow: hidden;
}

.blog-page__banner--image {
  display: block;
  padding: 0;
  line-height: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  background: #fff;
  overflow: hidden;
}

.blog-page__banner-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center top;
}

.blog-page__new {
  display: grid;
  gap: 0.9rem;
}

.blog-page__new-head h2 {
  margin: 0;
  font-size: 1.28rem;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.blog-page__new-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.blog-page__new-banner {
  min-height: 11.5rem;
  padding: 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(219, 229, 240, 0.92);
  text-decoration: none;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 0.45rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.blog-page__new-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.blog-page__new-banner--sky {
  background: linear-gradient(160deg, #eff6ff 0%, #dbeafe 100%);
}

.blog-page__new-banner--indigo {
  background: linear-gradient(160deg, #eef2ff 0%, #e0e7ff 100%);
}

.blog-page__new-banner--emerald {
  background: linear-gradient(160deg, #ecfdf5 0%, #d1fae5 100%);
}

.blog-page__new-banner--amber {
  background: linear-gradient(160deg, #fffbeb 0%, #fde68a 100%);
}

.blog-page__new-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.blog-page__new-banner-meta {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.blog-page__new-banner-title {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.blog-page__new-banner-text {
  margin: 0;
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.5;
}

.blog-page__new-banner-link {
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
}

.blog-page__catalog {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.blog-page__filters {
  position: sticky;
  top: 5.5rem;
  border: 1px solid rgba(219, 229, 240, 0.88);
  border-radius: 1rem;
  background: #fff;
  padding: 0.95rem;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.04);
}

.blog-page__filters-title {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  color: #0f172a;
}

.blog-page__filters-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.blog-page__filter-btn {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  background: transparent;
  padding: 0.55rem 0.62rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.blog-page__filter-btn:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.blog-page__filter-btn--active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.blog-page__filter-count {
  min-width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.blog-page__filter-btn--active .blog-page__filter-count {
  background: #dbeafe;
  color: #1d4ed8;
}

.blog-page__catalog-main {
  min-width: 0;
}

.blog-page__catalog-empty {
  margin: 0;
  padding: 1.2rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.9rem;
  color: #64748b;
  font-size: 0.9rem;
  text-align: center;
}

.blog-page__tiles {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.blog-page__tile {
  height: 100%;
  border: 1px solid rgba(219, 229, 240, 0.92);
  border-radius: 1rem;
  background: #fff;
  text-decoration: none;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.blog-page__tile:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.08);
}

.blog-page__tile-cover {
  min-height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
}

.blog-page__tile-cover--finance {
  background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 100%);
}

.blog-page__tile-cover--operations {
  background: linear-gradient(145deg, #d1fae5 0%, #a7f3d0 100%);
}

.blog-page__tile-cover--guides {
  background: linear-gradient(145deg, #e0e7ff 0%, #c7d2fe 100%);
}

.blog-page__tile-mark {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.blog-page__tile-mark img {
  display: block;
  width: 2.2rem;
  height: auto;
}

.blog-page__tile-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-page__tile-body {
  padding: 0.85rem 0.9rem 1rem;
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.blog-page__tile-title {
  margin: 0;
  color: #0f172a;
  font-size: 0.92rem;
  line-height: 1.38;
  letter-spacing: -0.015em;
}

.blog-page__tile-meta {
  margin: 0;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}

.blog-page__section {
  border: 1px solid rgba(219, 229, 240, 0.88);
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at top left, rgba(224, 242, 254, 0.34), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 1.15rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.05);
}

.blog-page__section-head h2 {
  margin: 0;
  font-size: 1.18rem;
  color: #0f172a;
}

.blog-page__section-head p {
  margin: 0.34rem 0 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.55;
}

.blog-page__section-head--inline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.blog-page__grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.9rem;
}

.blog-page__grid--spotlight {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.blog-page__card {
  border: 1px solid rgba(219, 229, 240, 0.92);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.94) 100%);
  padding: 1.05rem;
  display: grid;
  gap: 0.64rem;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.blog-page__card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.08);
}

.blog-page__card--spotlight {
  padding: 1.15rem;
}

.blog-page__tag {
  display: inline-flex;
  width: fit-content;
  padding: 0.24rem 0.48rem;
  border-radius: 0.45rem;
  background: #ecfeff;
  color: #155e75;
  border: 1px solid #bae6fd;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.blog-page__card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.blog-card__meta {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.blog-page__card-kicker {
  margin: 0;
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-page__card-title {
  margin: 0;
  font-size: 1.08rem;
  color: #0f172a;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.blog-page__card-text {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.62;
}

.blog-page__card-link {
  font-size: 0.87rem;
  font-weight: 700;
  color: #1d4ed8;
  text-decoration: none;
}

.blog-page__card-link:hover {
  text-decoration: underline;
}

.blog-card__bullet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.blog-card__bullet-list span {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.5rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  color: #334155;
  font-size: 0.76rem;
  line-height: 1.35;
}

.blog-page__section-link-row {
  margin-top: 0.9rem;
}

.blog-page__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-items: center;
  color: #64748b;
  font-size: 0.82rem;
}

.blog-page__breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.blog-page__breadcrumbs a {
  color: #1d4ed8;
  text-decoration: none;
}

.blog-page__breadcrumbs a:hover {
  text-decoration: underline;
}

.blog-article {
  padding: 1.2rem 1.75rem 1.75rem;
  display: grid;
  gap: 1.05rem;
}

.blog-article__hero {
  border: 1px solid #dbe5f0;
  border-radius: 1rem;
  padding: 1.05rem 1.1rem;
  background:
    radial-gradient(120% 120% at 8% -20%, rgba(14, 165, 233, 0.16), transparent 58%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 84%);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.85rem 1.05rem;
}

.blog-article__hero .blog-page__header-mark {
  width: 3.75rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.blog-article__hero-stack {
  flex: 1 1 13rem;
  min-width: 0;
  display: grid;
  gap: 0.7rem;
}

.blog-article__hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.blog-article__meta-item {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 0.45rem;
  border: 1px solid #dbe5f0;
  background: #fff;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
}

.blog-article__hero-title {
  margin: 0;
  font-size: clamp(1.2rem, 2.6vw, 1.62rem);
  line-height: 1.22;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.blog-hub__title,
.blog-article__hero-title {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.blog-article__hero-text {
  margin: 0;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.58;
}

.blog-article__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.blog-article__toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.45rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.85rem;
  padding: 0.7rem;
  background: #f8fafc;
}

.blog-article__toc a {
  display: block;
  padding: 0.44rem 0.58rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #1e3a8a;
  font-size: 0.83rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid #dbe5f0;
}

.blog-article__toc a:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.blog-article__section {
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.95rem 1rem;
}

.blog-article__section h2 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  color: #0f172a;
}

.blog-article__section p,
.blog-article__section li {
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.6;
}

.blog-article__section ul,
.blog-article__section ol {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.34rem;
}

.blog-article__note {
  margin-top: 0.7rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.6rem;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.84rem;
  line-height: 1.52;
}

.blog-article__note code {
  margin-left: 0.2rem;
  margin-right: 0.2rem;
}

.blog-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0.55rem;
  align-items: stretch;
}

.blog-flow__step {
  border: 1px solid #dbe5f0;
  border-radius: 0.7rem;
  padding: 0.65rem 0.7rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.blog-flow__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  font-size: 0.73rem;
  font-weight: 700;
}

.blog-flow__step h3 {
  margin: 0.45rem 0 0.28rem;
  font-size: 0.88rem;
  color: #0f172a;
}

.blog-flow__step p {
  margin: 0;
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.45;
}

.blog-flow__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 800;
  font-size: 0.98rem;
}

.blog-article__hint {
  margin: 0 0 0.65rem;
  color: #334155;
  font-size: 0.86rem;
}

.blog-runbook {
  display: grid;
  gap: 0.46rem;
}

.blog-runbook__item {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.68rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.62rem 0.7rem;
  background: #fff;
}

.blog-runbook__item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.65rem;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
}

.blog-runbook__item h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.9rem;
}

.blog-runbook__item p {
  margin: 0.2rem 0 0;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.45;
}

.blog-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.62rem;
}

.blog-check-card {
  border: 1px solid #dbe5f0;
  border-radius: 0.68rem;
  padding: 0.68rem 0.75rem;
  background: #fff;
}

.blog-check-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.88rem;
}

.blog-check-card p {
  margin: 0.35rem 0 0;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.45;
}

.blog-article__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  overflow: hidden;
}

.blog-article__table th,
.blog-article__table td {
  padding: 0.58rem 0.65rem;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  font-size: 0.82rem;
  color: #334155;
  vertical-align: top;
}

.blog-article__table th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

.blog-article__table tbody tr:last-child td {
  border-bottom: none;
}

.blog-article__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.blog-hub__eyebrow {
  margin: 0 0 0.55rem;
  color: rgba(191, 219, 254, 0.9);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blog-hub__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
}

.blog-hub__lead,
.blog-hub__panel {
  border: 1px solid rgba(219, 229, 240, 0.88);
  border-radius: 1.3rem;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.06);
}

.blog-hub__lead {
  padding: 1.3rem;
  background:
    radial-gradient(circle at top left, rgba(186, 230, 253, 0.4), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.blog-hub__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.blog-hub__title {
  margin: 0.95rem 0 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  max-width: 13ch;
  color: #0f172a;
}

.blog-hub__text {
  margin: 1rem 0 0;
  max-width: 58ch;
  color: #334155;
  font-size: 1rem;
  line-height: 1.72;
}

.blog-hub__actions {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.blog-hub__panel {
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
  color: #e2e8f0;
}

.blog-hub__panel-label {
  margin: 0;
  color: rgba(191, 219, 254, 0.88);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.blog-hub__signal-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.55rem;
}

.blog-hub__signal-list span {
  display: block;
  padding: 0.7rem 0.78rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.blog-hub__panel-note {
  margin: 0.9rem 0 0;
  color: rgba(191, 219, 254, 0.88);
  font-size: 0.86rem;
  line-height: 1.55;
}

.blog-audit-cta {
  margin-top: 1.1rem;
  margin-bottom: var(--lp-section-gap);
  scroll-margin-top: 6.2rem;
  border-radius: 2rem;
  border: 1px solid #d5e2f8;
  background: #f8f8fd;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  min-height: 25rem;
}

.blog-audit-cta__left {
  padding: 2.35rem 2.15rem 2.3rem;
}

.blog-audit-cta__badge {
  min-height: 2.1rem;
  padding: 0 1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #d9e8ff;
  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.blog-audit-cta__badge svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-audit-cta__title {
  margin: 1.25rem 0 0;
  color: #162847;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.blog-audit-cta__title span {
  display: block;
  margin-top: 0.3rem;
  color: #2563eb;
}

.blog-audit-cta__lead {
  margin: 1.15rem 0 0;
  color: #556b90;
  font-size: 1.02rem;
  line-height: 1.68;
}

.blog-audit-cta__features {
  margin-top: 1.45rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.05rem;
}

.blog-audit-cta__features article i {
  width: 3rem;
  height: 3rem;
  border-radius: 0.8rem;
  background: #dbe8fb;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.blog-audit-cta__features article i svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-audit-cta__features article strong {
  display: block;
  margin-top: 0.72rem;
  color: #1a2a49;
  font-size: 1.1rem;
  line-height: 1.2;
}

.blog-audit-cta__features article p {
  margin: 0.42rem 0 0;
  color: #58709a;
  font-size: 0.92rem;
  line-height: 1.5;
}

.blog-audit-cta__actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.blog-audit-cta__btn {
  min-height: 3.15rem;
  border-radius: 999px;
  padding: 0 1.1rem;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.blog-audit-cta__btn--primary {
  background: linear-gradient(135deg, #2e74ec, #2563eb);
  color: #fff;
}

.blog-audit-cta__btn--ghost {
  border: 1px solid #bed3f5;
  background: rgba(255, 255, 255, 0.7);
  color: #2563eb;
}

.blog-audit-cta__play {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
}

.blog-audit-cta__right {
  min-height: 100%;
}

.blog-audit-cta__right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 920px) {
  .blog-page__body,
  .blog-article {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .blog-site-shell {
    --blog-layout-gutter: 1rem;
  }

  .blog-site-header__inner {
    flex-wrap: wrap;
    row-gap: 0.55rem;
  }

  .blog-site-footer__main {
    flex-direction: column;
  }

  .blog-site-footer__legal {
    display: grid;
    gap: 0.2rem;
  }

  .blog-page__section-head--inline,
  .blog-hub__hero,
  .blog-page__catalog {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .blog-page__new-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-page__tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-page__filters {
    position: static;
  }

  .blog-audit-cta {
    grid-template-columns: 1fr;
    min-height: 0;
    scroll-margin-top: 5.2rem;
  }

  .blog-audit-cta__left {
    padding: 1.35rem 1.1rem;
  }

  .blog-audit-cta__right {
    order: -1;
    min-height: 12rem;
  }

  .blog-audit-cta__badge {
    min-height: 1.85rem;
    font-size: 0.64rem;
    padding: 0 0.75rem;
  }

  .blog-audit-cta__title {
    margin-top: 0.85rem;
    font-size: clamp(1.65rem, 8.6vw, 2.25rem);
  }

  .blog-audit-cta__lead {
    margin-top: 0.8rem;
    font-size: 0.92rem;
    line-height: 1.58;
  }

  .blog-audit-cta__features {
    margin-top: 1.05rem;
    grid-template-columns: 1fr;
    gap: 0.72rem;
  }

  .blog-audit-cta__features article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem 0.62rem;
    align-items: center;
  }

  .blog-audit-cta__features article i {
    grid-row: 1 / 3;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.72rem;
  }

  .blog-audit-cta__features article i svg {
    width: 1.1rem;
    height: 1.1rem;
  }

  .blog-audit-cta__features article strong {
    margin-top: 0;
    font-size: 0.94rem;
  }

  .blog-audit-cta__features article p {
    margin: 0;
    font-size: 0.84rem;
  }

  .blog-audit-cta__actions {
    margin-top: 1.15rem;
    gap: 0.55rem;
  }

  .blog-audit-cta__btn {
    min-height: 2.8rem;
    width: 100%;
    justify-content: center;
    font-size: 0.96rem;
    padding: 0 0.95rem;
  }

  .blog-audit-cta__play {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.55rem;
  }

  .blog-page__section-head--inline {
    flex-direction: column;
  }

  .blog-site-auth {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .blog-flow {
    grid-template-columns: 1fr;
  }

  .blog-flow__arrow {
    transform: rotate(90deg);
    min-height: 1.2rem;
  }
}

@media (max-width: 640px) {
  .blog-page__new-grid,
  .blog-page__tiles {
    grid-template-columns: 1fr;
  }

  .blog-page__body--hub {
    padding-left: 0;
    padding-right: 0;
  }
}

/* /accruals */
.accruals-page__table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border: none;
  border-radius: 0;
  background: transparent;
}

.accruals-page__table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.accruals-page__selected-count {
  display: inline-flex;
  align-items: center;
  margin-left: 0.7rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
}

.accruals-page__delete-btn:not(:disabled) {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.accruals-page__delete-btn:not(:disabled):hover {
  background: #ffe4e6;
}

.accruals-page__row-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
  cursor: pointer;
}

.accruals-page__checkbox-placeholder {
  display: inline-block;
  width: 1rem;
  height: 1rem;
}

.accruals-page__row--selected td {
  background: #f8fbff;
}

.accruals-page__fixed-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  z-index: 260;
  display: none;
  pointer-events: none;
}

.accruals-page__fixed-head-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border-left: 1px solid var(--mpb-gray-200);
  border-right: 1px solid var(--mpb-gray-200);
  border-bottom: 1px solid var(--mpb-gray-200);
  box-shadow: 0 10px 18px -14px rgba(15, 23, 42, 0.45);
  scrollbar-width: none;
}

.accruals-page__fixed-head-viewport::-webkit-scrollbar {
  display: none;
}

.accruals-page__table--fixed-head thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

/* Unified flat style for Товародвижение / Продажи / Налоги */
:is(
  .suppliers-page,
  .suppliers-detail-page,
  .purchases-page,
  .purchase-detail-page,
  .warehouse-page,
  .sup-page,
  .supplies-bundles-page,
  .supplies-details-page,
  .supplies-availability-page,
  .ibc-page,
  .sales-today-page,
  .sales-factors-page,
  .sales-cells-page,
  .sales-actions-page,
  .sales-action-products-page,
  .sales-price-parser-page,
  .products-page,
  .sales-funnel-page,
  .sales-funnel-products-page,
  .taxes-realization-page,
  .taxes-kudir-page,
  .taxes-calendar-page,
  .accruals-page,
  .data-updates-page
) :is(.mpb-card, .costs-page__card, .pnl-page__card) {
  border: none;
  box-shadow: none;
}

:is(
  .suppliers-page,
  .suppliers-detail-page,
  .purchases-page,
  .warehouse-page,
  .sup-page,
  .supplies-bundles-page,
  .supplies-details-page,
  .sales-today-page,
  .sales-factors-page,
  .sales-cells-page,
  .sales-actions-page,
  .sales-action-products-page,
  .sales-price-parser-page,
  .products-page,
  .taxes-realization-page,
  .taxes-kudir-page,
  .taxes-calendar-page,
  .accruals-page,
  .data-updates-page
) .costs-header {
  padding: 1.35rem 2.25rem 0.75rem 0;
  border-bottom: none;
  background: #fff;
  color: #0f172a;
}

:is(
  .suppliers-page,
  .suppliers-detail-page,
  .purchases-page,
  .warehouse-page,
  .sup-page,
  .supplies-bundles-page,
  .supplies-details-page,
  .sales-today-page,
  .sales-factors-page,
  .sales-actions-page,
  .sales-action-products-page,
  .sales-price-parser-page,
  .products-page,
  .taxes-realization-page,
  .taxes-kudir-page,
  .taxes-calendar-page,
  .accruals-page,
  .data-updates-page
) .costs-header::before {
  content: none;
}

:is(
  .suppliers-page,
  .suppliers-detail-page,
  .purchases-page,
  .warehouse-page,
  .sup-page,
  .supplies-bundles-page,
  .supplies-details-page,
  .sales-today-page,
  .sales-cells-page,
  .sales-actions-page,
  .sales-action-products-page,
  .sales-price-parser-page,
  .products-page,
  .taxes-realization-page,
  .taxes-kudir-page,
  .taxes-calendar-page,
  .accruals-page,
  .data-updates-page
) .costs-header .mpb-section-title {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #000;
}

:is(
  .suppliers-page,
  .suppliers-detail-page,
  .purchases-page,
  .warehouse-page,
  .sup-page,
  .supplies-bundles-page,
  .supplies-details-page,
  .sales-today-page,
  .sales-cells-page,
  .sales-actions-page,
  .sales-action-products-page,
  .sales-price-parser-page,
  .products-page,
  .taxes-realization-page,
  .taxes-kudir-page,
  .taxes-calendar-page,
  .accruals-page,
  .data-updates-page
) .costs-header .mpb-section-desc {
  margin: 0.55rem 0 0;
  max-width: 88ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mpb-gray-500);
}

:is(
  .suppliers-page,
  .suppliers-detail-page,
  .purchases-page,
  .warehouse-page,
  .sup-page,
  .supplies-bundles-page,
  .supplies-details-page,
  .sales-today-page,
  .sales-cells-page,
  .sales-actions-page,
  .sales-action-products-page,
  .sales-price-parser-page,
  .products-page,
  .taxes-realization-page,
  .taxes-kudir-page,
  .taxes-calendar-page,
  .accruals-page,
  .data-updates-page
) .costs-form-card {
  margin: 1.1rem 2.25rem 1.15rem 0;
  border: none;
  box-shadow: none;
}

:is(
  .suppliers-page,
  .suppliers-detail-page,
  .purchases-page,
  .warehouse-page,
  .sup-page,
  .supplies-bundles-page,
  .supplies-details-page,
  .sales-today-page,
  .sales-cells-page,
  .sales-actions-page,
  .sales-action-products-page,
  .sales-price-parser-page,
  .products-page,
  .taxes-realization-page,
  .taxes-kudir-page,
  .taxes-calendar-page,
  .accruals-page,
  .data-updates-page
) .costs-table-wrap {
  margin: 0.9rem 2.25rem 1.75rem 0;
  border: none;
  box-shadow: none;
}

.products-page__table-wrap {
  overflow: auto;
}

.products-page__table .ue2-th:not(.ue2-th--product):not(.ue2-th--num) {
  text-align: left;
}

.products-page__th--product,
.products-page__td--product {
  min-width: 220px;
  width: 220px;
  max-width: 280px;
}

.products-page__td--product .ue2-product__name,
.products-page__td--product .ue2-product__sku {
  display: block;
}

.products-page__product-name {
  max-width: none;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.products-page__tr {
  cursor: default;
}

.products-page__tr:hover td {
  background: #f9fafb;
}

.products-page__tr:hover .products-page__td--product {
  background: #f1f5f9 !important;
}

.products-page__code {
  font-size: 0.875rem;
}

.products-page__category {
  max-width: 200px;
}

.sales-onepager-page .mpb-card {
  border: none;
  box-shadow: none;
}

.sales-onepager-page .costs-header {
  padding: 1.35rem 2.25rem 0.75rem 0;
  border-bottom: none;
  background: #fff;
  color: #0f172a;
}

.sales-onepager-page .costs-header::before {
  content: none;
}

.sales-onepager-page .costs-header .mpb-section-title {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #000;
}

.sales-onepager-page .costs-form-card {
  margin: 1.1rem 2.25rem 1.15rem 0;
  border: none;
  box-shadow: none;
}

.sales-onepager-page .costs-table-wrap {
  margin: 0.9rem 2.25rem 1.75rem 0;
  border: none;
  box-shadow: none;
}

.sales-factors-page .mpb-card {
  border: none;
  box-shadow: none;
  overflow: visible;
}

.sales-factors-page .costs-header {
  padding: 1.35rem 2.25rem 0.75rem 0;
  border-bottom: none;
  background: #fff;
  color: #0f172a;
}

.sales-factors-page .costs-header::before {
  content: none;
}

.sales-factors-page .costs-form-card {
  margin: 1.1rem 2.25rem 1.15rem 0;
  border: none;
  box-shadow: none;
}

.sales-factors-alert {
  margin: 0.5rem 2.25rem 0.35rem 0;
}

.sales-factors-filters {
  padding: 0;
}

.sales-factors-filters-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem;
}

.sales-factors-filter-group {
  grid-column: span 4;
  min-height: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.72rem;
  display: grid;
  gap: 0.55rem;
}

.sales-factors-filter-group--period {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 0.28rem;
}

.sales-factors-filter-group--period::after {
  content: none;
}

.sales-factors-filter-group--period .sales-onepager-filter-label {
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  color: #94a3b8;
}

.sales-factors-filter-group--period .sales-onepager-filter-label::before {
  content: none;
}

.sales-factors-filter-group--period .sales-onepager-date-range {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sales-factors-filter-group--period .sales-onepager-date-range input[type="date"] {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  border: 1px solid #d6e0eb;
  border-radius: 0.62rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.775rem;
  font-weight: 500;
  padding: 0.44rem 0.56rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sales-factors-filter-group--period .sales-onepager-date-range input[type="date"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.sales-factors-filter-group--period .sales-onepager-date-sep {
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1;
}

.sales-factors-products-row {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.52rem;
}

.sales-factors-products-strip {
  padding: 0.4rem 0.5rem;
}

.sales-factors-metrics-row {
  margin-top: 0.75rem;
  border: 1px solid #dbe3ef;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.sales-factors-metrics-head {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.48rem;
}

.sales-factors-metrics-head span {
  font-size: 0.82rem;
  color: #475569;
}

.sales-factors-metrics-head__product {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  padding: 0.2rem 0.55rem;
  max-width: 520px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-factors-empty {
  margin-top: 0.65rem;
}

.sales-factors-chart-card {
  padding: 1rem;
}

.sales-factors-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0;
}

.sales-factors-card-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.sales-factors-card-kpi {
  display: grid;
  justify-items: end;
  gap: 0.1rem;
}

.sales-factors-card-kpi span {
  font-size: 0.72rem;
  color: #64748b;
}

.sales-factors-card-kpi strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.sales-factors-card-note {
  font-size: 0.75rem;
  color: #64748b;
}

.sales-factors-chart-wrap {
  height: 100%;
  min-height: 0;
}

.sales-factors-sticky-stack-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}

.sales-factors-sticky-stack {
  position: relative;
  z-index: 24;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.sales-factors-sticky-stack.is-fixed {
  position: fixed;
  z-index: 260;
  box-sizing: border-box;
}

.sales-factors-sync {
  --sales-factors-metric-col-width: 220px;
  --sales-factors-chart-row-height: 224px;
  display: grid;
  gap: 0;
  border: 1px solid #dbe5f0;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.sales-factors-sync--chart {
  border-radius: 1rem 1rem 0 0;
  border-bottom: none;
}

.sales-factors-sync__row {
  display: grid;
  grid-template-columns: var(--sales-factors-metric-col-width) minmax(0, 1fr);
  align-items: stretch;
}

.sales-factors-sync__row:not(.sales-factors-sync__row--head) {
  height: var(--sales-factors-chart-row-height);
}

.sales-factors-sync__row--head .sales-factors-card-head {
  padding: 0.8rem 0.95rem 0.72rem 0;
  padding-left: clamp(0.4rem, calc(50% / var(--sales-factors-period-count)), 4rem);
}

.sales-factors-sync__row--head {
  border-bottom: 1px solid #e4eaf3;
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(247,250,255,0.65) 100%);
}

.sales-factors-sync__metric-spacer {
  min-width: var(--sales-factors-metric-col-width);
}

.sales-factors-sync__metric-media {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 100%;
  box-sizing: border-box;
  padding: 0.38rem 0.5rem 0.3rem;
}

.sales-factors-product-preview {
  width: 100%;
  flex: 1 1 auto;
  max-width: 142px;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.09);
  display: grid;
  grid-template-rows: 1fr auto;
}

.sales-factors-product-preview__media {
  min-height: 0;
  padding: 0.48rem 0.42rem 0.18rem;
}

.sales-factors-product-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 0.64rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(241,245,249,0.92) 100%);
}

.sales-factors-product-preview__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #475569;
  font-size: 1.45rem;
  font-weight: 800;
  border-radius: 0.78rem;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
}

.sales-factors-product-preview__meta {
  border-top: 1px solid #dbe5f0;
  padding: 0.38rem 0.44rem 0.42rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(243,248,255,0.8) 100%);
  display: grid;
  gap: 0.12rem;
}

.sales-factors-product-preview__meta span {
  font-size: 0.6rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.sales-factors-product-preview__meta strong {
  margin: 0;
  font-size: 0.66rem;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sales-factors-loading-note {
  margin: 0;
  align-self: center;
  padding: 0.85rem 0;
}

.sales-factors-inline-metrics {
  margin-top: 0;
  padding-top: 0;
  border: 1px solid #dbe5f0;
  border-top: none;
  border-radius: 0 0 1rem 1rem;
  background: #fff;
  overflow: hidden;
}

.sales-factors-metrics-grid {
  --sales-factors-metric-col-width: 220px;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}

.sales-factors-metrics-grid--sticky-dates {
  border: 1px solid #dbe5f0;
  border-top: none;
  border-radius: 0 0 1rem 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.sales-factors-metrics-grid__row {
  display: grid;
  grid-template-columns: var(--sales-factors-metric-col-width) repeat(var(--sales-factors-period-count), minmax(0, 1fr));
  align-items: stretch;
}

.sales-factors-metrics-grid__row + .sales-factors-metrics-grid__row {
  border-top: 1px solid var(--mpb-gray-100);
}

.sales-factors-metrics-grid__row--dates {
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
}

.sales-factors-metrics-grid__metric-spacer {
  min-width: var(--sales-factors-metric-col-width);
}

.sales-factors-metrics-grid__date-cell {
  text-align: center;
  font-size: 0.78rem;
  color: #64748b;
  padding: 0.72rem 0;
  white-space: nowrap;
}

.sales-factors-metrics-grid__empty {
  margin: 0;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--mpb-gray-100);
}

.sales-factors-metric-name {
  min-width: 0;
  font-weight: 600;
  color: #0f172a;
  padding: 0.76rem 1rem;
}

.sales-factors-value-cell {
  min-width: 0;
  text-align: center;
  padding: 0.76rem 0;
}

.sales-factors-value-main {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.sales-factors-value-delta {
  margin-top: 0.18rem;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  line-height: 1;
}

.sales-factors-value-delta-icon {
  width: 0.52rem;
  height: 0.52rem;
  flex: 0 0 0.52rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sales-factors-value-delta-icon::before {
  content: "";
  display: block;
}

.sales-factors-value-delta.is-empty {
  color: #94a3b8;
}

.sales-factors-value-delta.is-empty .sales-factors-value-delta-icon::before {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.6;
}

.sales-factors-value-delta.is-pos {
  color: #0f766e;
}

.sales-factors-value-delta.is-pos .sales-factors-value-delta-icon::before {
  width: 0;
  height: 0;
  border-left: 0.26rem solid transparent;
  border-right: 0.26rem solid transparent;
  border-bottom: 0.42rem solid currentColor;
  transform: translateY(-0.04rem);
}

.sales-factors-value-delta.is-neg {
  color: #b91c1c;
}

.sales-factors-value-delta.is-neg .sales-factors-value-delta-icon::before {
  width: 0;
  height: 0;
  border-left: 0.26rem solid transparent;
  border-right: 0.26rem solid transparent;
  border-top: 0.42rem solid currentColor;
  transform: translateY(0.04rem);
}

.sales-factors-value-delta.is-zero {
  color: #334155;
}

.sales-factors-value-delta.is-zero .sales-factors-value-delta-icon::before {
  width: 0.48rem;
  height: 0.12rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.sales-factors-modal {
  max-width: min(1100px, 92vw);
}

.sales-factors-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.sales-factors-metrics-modal-body {
  display: grid;
  gap: 0.8rem;
  max-height: min(66vh, 620px);
  overflow: auto;
  padding-right: 0.15rem;
}

:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__hero {
  padding: 1.35rem 2.25rem 0.75rem 0;
  background: #fff;
  border-radius: 0.75rem 0.75rem 0 0;
  color: var(--pnl-text);
}

:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__hero::before {
  content: none;
}

:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__hero-grid {
  display: block;
}

:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__badge,
:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__hero-panel {
  display: none;
}

:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__title {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #000;
}

:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__subtitle {
  margin: 0.55rem 0 0;
  max-width: 88ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mpb-gray-500);
}

:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__alert {
  margin: 1rem 2.25rem 0 0;
}

:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__toolbar {
  margin: 1rem 2.25rem 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__kpi-row,
:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__overview,
:is(.sales-funnel-page, .sales-funnel-products-page) .pnl-page__body {
  padding: 1.35rem 2.25rem 0 0;
}

/* Hero normalization to match /costs style */
.sup-page .costs-page__header {
  padding: 1.35rem 2.25rem 0.75rem 0;
  background: #fff;
  border-bottom: none;
  color: #0f172a;
}

.sup-page .costs-page__header::before {
  content: none;
}

.sup-page .costs-page__badge {
  display: none;
}

.sup-page .costs-page__title {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #000;
}

.sup-page .costs-page__subtitle {
  margin: 0.55rem 0 0;
  max-width: 88ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mpb-gray-500);
}

.purchases-page__hero {
  padding: 1.35rem 2.25rem 0.75rem 0;
  background: #fff;
  color: #0f172a;
  border-bottom: none;
}

.purchases-page__eyebrow {
  display: none;
}

.purchases-page__title {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #000;
}

.purchases-page__subtitle {
  margin: 0.55rem 0 0;
  max-width: 88ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mpb-gray-500);
}

.supplies-availability-page .avail-hero {
  padding: 1.35rem 2.25rem 0.75rem 0;
  background: #fff;
  color: #0f172a;
}

.supplies-availability-page .avail-hero__eyebrow {
  display: none;
}

.supplies-availability-page .avail-hero__title {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #000;
}

.supplies-availability-page .avail-hero__subtitle {
  margin: 0.55rem 0 0;
  max-width: 88ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mpb-gray-500);
}

.supplies-availability-page .avail-hero__backlink {
  margin-top: 0.55rem;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #334155;
}

.supplies-availability-page .avail-hero__backlink:hover {
  color: #0f172a;
  text-decoration: underline;
}

.ibc-page__hero {
  padding: 1.35rem 2.25rem 0.75rem 0;
  background: #fff;
  border-radius: 0.75rem 0.75rem 0 0;
  color: #0f172a;
}

.ibc-page__badge {
  display: none;
}

.ibc-page__title {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #000;
}

.ibc-page__subtitle {
  margin: 0.55rem 0 0;
  max-width: 88ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mpb-gray-500);
}

.ibc-page__hero-inner::after {
  display: none;
}

.sales-unit-economics-page .ue2-hero {
  padding: 1.2rem 2.25rem 0.3rem 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  color: #0f172a;
}

.sales-unit-economics-page.ue2 {
  gap: 0.45rem;
}

.sales-unit-economics-page.ue2::before,
.sales-unit-economics-page .ue2-hero::after {
  content: none;
}

.sales-unit-economics-page .ue2-hero::before {
  content: none;
}

.sales-unit-economics-page .ue2-badge {
  display: none;
}

.sales-unit-economics-page .ue2-title {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #000;
}

.sales-unit-economics-page .ue2-subtitle {
  margin: 0.35rem 0 0;
  max-width: 88ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mpb-gray-500);
}

.sales-unit-economics-page .ue2-table-wrap {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.sales-unit-economics-page .ue2-table-wrap::before {
  box-shadow: none;
}

.sales-unit-economics-page .ue2-fixed-head__viewport {
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.sales-unit-economics-page .ue2-table thead .ue2-th,
.sales-unit-economics-page .ue2-table--fixed-head thead .ue2-th {
  border-radius: 0;
}

.warehouse-overview-page .warehouse-page__body {
  padding: 1.05rem 2.25rem 1.5rem 0;
  background: transparent;
}

.warehouse-overview-page .warehouse-page__table-card {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.warehouse-overview-page .warehouse-page__table-head {
  padding: 0 0 0.8rem;
  border-bottom: none;
  background: transparent;
}

.warehouse-overview-page .warehouse-page__table-card--results .warehouse-page__table-head {
  padding-bottom: 0.8rem;
  background: transparent;
}

.warehouse-overview-page .warehouse-page__table-card--results .warehouse-page__table-wrap {
  border-top: none;
}

.warehouse-overview-page .warehouse-page__table-wrap {
  margin: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.warehouse-overview-page .warehouse-page__fixed-head {
  border: none;
  background: #fff;
  box-shadow: none;
}

@media (max-width: 768px) {
  .mpb-space.pnl-page.pnl-report-page,
  .mpb-space.pnl-page.pnl-products-articles-page {
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .pnl-report-page .pnl-page__table th,
  .pnl-report-page .pnl-page__table td {
    padding: 0.57rem 0.56rem;
  }

  .pnl-report-page__fixed-head .pnl-page__table--fixed-head th {
    padding: 0.57rem 0.56rem;
  }

  .pnl-report-page .pnl-report-page__waterfall-section {
    display: none;
  }

  .taxes-page__dev-badge {
    top: 1.35rem;
    right: 1rem;
    font-size: 0.72rem;
    padding: 0.34rem 0.62rem;
  }

  .sup-page .costs-page__header,
  .taxes-calendar-page .costs-header,
  .sales-onepager-page .costs-header,
  .sales-factors-page .costs-header,
  .sales-unit-economics-page .ue2-hero,
  .purchases-page__hero,
  .supplies-availability-page .avail-hero,
  .ibc-page__hero {
    padding: 1.35rem 1rem 0.9rem;
  }

  /* Full-width content on mobile for costs/sales cards inside .mpb-main-wrap */
  .mpb-space.costs-page {
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .costs-page__metrics,
  .costs-page__form,
  .costs-page__table-wrap,
  .costs-page__toolbar,
  .costs-page .costs-form-card,
  .costs-page .costs-table-wrap,
  .sales-today-page .sales-today-page__products-card,
  .sales-today-page .sales-today-page__chart-card {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
  }

  .sales-today-page .costs-header {
    padding: 1.35rem 1rem 0.9rem;
  }

  /* data-updates: keep small side gutters aligned with header logo/avatar lines */
  .mpb-space.costs-page.data-updates-page {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }

  .data-updates-page .costs-header {
    padding: 1.35rem 0 0.9rem;
  }

  .data-updates-page .du-body {
    padding: 0.9rem 0 1.2rem;
  }

  .sales-factors-page .costs-header .costs-page__crumbs {
    display: none;
  }

  .sales-factors-page .costs-page__page-title {
    font-size: clamp(1.28rem, 6vw, 1.52rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  .sales-factors-page .costs-page__hero-desc {
    margin-top: 0.38rem;
    font-size: 0.78rem;
    line-height: 1.45;
    max-width: none;
  }

  .sales-factors-page .costs-form-card {
    margin: 0.74rem 0.86rem 0.9rem;
  }

  .sales-factors-filters {
    padding: 0.04rem;
  }

  .sales-factors-filters-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .sales-factors-filter-group {
    grid-column: span 1;
    border-radius: 0.78rem;
    padding: 0.58rem 0.62rem;
    gap: 0.42rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  }

  .sales-factors-filter-group--period {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .sales-factors-filter-group--period .sales-onepager-date-range input[type="date"] {
    padding: 0.38rem 0.48rem;
    border-radius: 0.54rem;
    font-size: 0.72rem;
  }

  .sales-factors-page .sales-onepager-quick-buttons,
  .sales-factors-page .sales-onepager-group-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.34rem;
    overflow-x: auto;
    padding-bottom: 0.12rem;
    scrollbar-width: none;
  }

  .sales-factors-page .sales-onepager-quick-buttons::-webkit-scrollbar,
  .sales-factors-page .sales-onepager-group-buttons::-webkit-scrollbar {
    display: none;
  }

  .sales-factors-page .sales-onepager-quick-buttons .mpb-btn-secondary,
  .sales-factors-page .sales-onepager-group-buttons .mpb-btn-secondary {
    flex: 0 0 auto;
    min-height: 1.92rem;
    padding: 0.32rem 0.56rem;
    border-radius: 0.6rem;
    font-size: 0.72rem;
  }

  .sales-factors-products-row {
    margin-top: 0.56rem;
    gap: 0.4rem;
  }

  .sales-factors-products-strip {
    padding: 0.26rem;
    border: 1px solid #dbe5f0;
    border-radius: 0.82rem;
    background: #fff;
    gap: 0.38rem;
  }

  .sales-factors-products-strip .pnl-page__product-card {
    min-width: 64px;
    max-width: 64px;
    padding: 0.24rem;
    border-radius: 0.7rem;
    gap: 0.2rem;
  }

  .sales-factors-products-strip .pnl-page__product-card-meta {
    display: none;
  }

  .sales-factors-products-strip .pnl-page__products-more {
    min-width: 0;
    padding: 0.36rem 0.58rem;
    border-radius: 0.62rem;
    font-size: 0.72rem;
  }

  .sales-factors-chart-card {
    padding: 0.56rem 0.56rem 0.36rem;
    border-radius: 0.96rem;
    border: 1px solid #dbe5f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  }

  .sales-factors-sync,
  .sales-factors-metrics-grid {
    --sales-factors-metric-col-width: 112px;
  }

  .sales-factors-sync {
    --sales-factors-chart-row-height: 196px;
    border-radius: 0.84rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  }

  .sales-factors-sync--chart {
    border-radius: 0.84rem 0.84rem 0 0;
  }

  .sales-factors-sync__row {
    grid-template-columns: var(--sales-factors-metric-col-width) minmax(0, 1fr);
  }

  .sales-factors-sync__row--head .sales-factors-card-head {
    padding: 0.46rem 0.52rem 0.42rem 0;
    padding-left: 0.26rem;
  }

  .sales-factors-sync__metric-spacer {
    min-width: var(--sales-factors-metric-col-width);
  }

  .sales-factors-card-head {
    align-items: center;
    gap: 0.46rem;
  }

  .sales-factors-card-head h2 {
    font-size: 0.78rem;
    line-height: 1.22;
    letter-spacing: -0.01em;
  }

  .sales-factors-card-head .mpb-btn-secondary {
    min-height: 1.78rem;
    padding: 0.28rem 0.5rem;
    border-radius: 0.56rem;
    font-size: 0.69rem;
  }

  .sales-factors-sync__metric-media {
    padding: 0.24rem 0.24rem 0.2rem;
  }

  .sales-factors-product-preview {
    max-width: 86px;
    min-height: 0;
    border-radius: 0.68rem;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
  }

  .sales-factors-product-preview__media {
    padding: 0.24rem;
  }

  .sales-factors-product-preview__meta {
    display: none;
  }

  .sales-factors-chart-wrap {
    height: 100%;
    min-height: 0;
  }

  .sales-factors-metrics-grid--sticky-dates,
  .sales-factors-inline-metrics {
    border-radius: 0 0 0.84rem 0.84rem;
  }

  .sales-factors-metrics-grid__row {
    grid-template-columns: var(--sales-factors-metric-col-width) repeat(var(--sales-factors-period-count), minmax(58px, 1fr));
  }

  .sales-factors-metrics-grid__date-cell {
    padding: 0.5rem 0.08rem;
    font-size: 0.66rem;
  }

  .sales-factors-metric-name {
    min-width: 0;
    padding: 0.54rem 0.52rem;
    font-size: 0.7rem;
    line-height: 1.16;
    font-weight: 700;
  }

  .sales-factors-value-cell {
    padding: 0.5rem 0.08rem;
  }

  .sales-factors-value-main {
    font-size: 0.71rem;
  }

  .sales-factors-value-delta {
    margin-top: 0.12rem;
    font-size: 0.61rem;
    gap: 0.14rem;
  }

  .sales-factors-value-delta-icon {
    width: 0.42rem;
    height: 0.42rem;
    flex-basis: 0.42rem;
  }

  .sales-factors-value-delta.is-pos .sales-factors-value-delta-icon::before {
    border-left-width: 0.2rem;
    border-right-width: 0.2rem;
    border-bottom-width: 0.33rem;
  }

  .sales-factors-value-delta.is-neg .sales-factors-value-delta-icon::before {
    border-left-width: 0.2rem;
    border-right-width: 0.2rem;
    border-top-width: 0.33rem;
  }

  .sales-factors-modal {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: calc(0.86rem + env(safe-area-inset-top)) 0.84rem calc(0.86rem + env(safe-area-inset-bottom));
    gap: 0.72rem;
  }

  .sales-factors-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.54rem;
  }

  .sales-factors-metrics-modal-body {
    max-height: none;
    min-height: 0;
  }

}

@media (max-width: 520px) {
  .sales-factors-sync,
  .sales-factors-metrics-grid {
    --sales-factors-metric-col-width: 98px;
  }

  .sales-factors-sync {
    --sales-factors-chart-row-height: 186px;
  }

  .sales-factors-product-preview {
    max-width: 74px;
  }

  .sales-factors-card-head h2 {
    font-size: 0.74rem;
  }

  .sales-factors-products-strip .pnl-page__product-card {
    min-width: 60px;
    max-width: 60px;
  }

  .sales-factors-metrics-grid__row {
    grid-template-columns: var(--sales-factors-metric-col-width) repeat(var(--sales-factors-period-count), minmax(54px, 1fr));
  }
}

/* Summary aggregate rows: pinned left cell with stable rounded-left shape.
   Works on desktop/mobile and keeps radius while horizontal scrolling. */
.summary-page__aggregate--opening > td.summary-page__pin,
.summary-page__aggregate--income > td.summary-page__pin,
.summary-page__aggregate--expense > td.summary-page__pin,
.summary-page__aggregate--net > td.summary-page__pin,
.summary-page__aggregate--closing > td.summary-page__pin {
  --summary-pin-radius: 1rem;
  position: sticky;
  left: 0;
  z-index: 12 !important;
  background: transparent !important;
  border-top-left-radius: var(--summary-pin-radius) !important;
  border-bottom-left-radius: var(--summary-pin-radius) !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  -webkit-clip-path: inset(0 0 0 0 round var(--summary-pin-radius) 0 0 var(--summary-pin-radius)) !important;
  clip-path: inset(0 0 0 0 round var(--summary-pin-radius) 0 0 var(--summary-pin-radius)) !important;
  overflow: hidden !important;
  isolation: isolate;
  transform: translateZ(0);
  box-shadow: none !important;
}

.summary-page__aggregate--opening > td.summary-page__pin::after,
.summary-page__aggregate--income > td.summary-page__pin::after,
.summary-page__aggregate--expense > td.summary-page__pin::after,
.summary-page__aggregate--net > td.summary-page__pin::after,
.summary-page__aggregate--closing > td.summary-page__pin::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--summary-pin-bg);
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: inset -1px 0 0 #dbe3ee;
}

.summary-page__aggregate--opening > td.summary-page__pin,
.summary-page__aggregate--closing > td.summary-page__pin {
  --summary-pin-bg: #eaf2ff;
}

.summary-page__aggregate--income > td.summary-page__pin,
.summary-page__aggregate--expense > td.summary-page__pin,
.summary-page__aggregate--net > td.summary-page__pin {
  --summary-pin-bg: #f8fafc;
}

.summary-page__aggregate--opening > td.summary-page__pin::before,
.summary-page__aggregate--income > td.summary-page__pin::before,
.summary-page__aggregate--expense > td.summary-page__pin::before,
.summary-page__aggregate--net > td.summary-page__pin::before,
.summary-page__aggregate--closing > td.summary-page__pin::before {
  content: none !important;
}

.summary-page__aggregate > td.summary-page__pin.summary-page__td-type {
  padding: 0 !important;
  vertical-align: middle;
}

.summary-page__aggregate-pin-shell {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 100%;
  padding: 0.68rem 0.95rem;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  background: transparent;
}

@media (max-width: 768px) {
  .summary-page__aggregate-pin-shell {
    padding: 0.44rem 0.66rem;
  }
}

/* Summary: remove any rounding from the first (pinned) column on desktop and mobile. */
.summary-page__table thead th.summary-page__pin,
.summary-page__table tbody td.summary-page__pin,
.summary-page__table--fixed-head thead th.summary-page__pin {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  -webkit-clip-path: none !important;
  clip-path: none !important;
}

/* Account: keep equal side gutters for embedded Sales Today module on mobile. */
@media (max-width: 768px) {
  .dashboard-page .sales-today-page--account {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .dashboard-page .sales-today-page--account .sales-today-page__controls,
  .dashboard-page .sales-today-page--account .sales-today-page__chart-card {
    margin-left: 0;
    margin-right: 0;
    width: auto;
    max-width: none;
  }

  .costs-page--transactions .costs-page__toolbar,
  .costs-page--transactions .costs-page__table-wrap {
    margin-left: 1rem;
    margin-right: 1rem;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .costs-page--transactions .costs-page__form {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "date"
      "type"
      "plan"
      "category"
      "description"
      "document"
      "amount"
      "actions";
    padding: 0.82rem;
  }

  .costs-page--transactions .costs-page__form-doc {
    grid-template-columns: 1fr;
  }

  .costs-page--transactions .costs-page__form-doc-actions {
    width: 100%;
  }
}

/* Sales planning */
.sales-planning-page .pnl-page__toolbar {
  margin-top: 0;
}

.sales-planning-page__toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.sales-planning-page__save-btn {
  min-height: 2.5rem;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.sales-planning-page__success {
  margin: 0 1.75rem 0.9rem;
  color: #065f46;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
}

.sales-planning-page__body {
  padding-top: 0;
}

.sales-planning-page__table-wrap {
  margin-top: 0.35rem;
}

.sales-planning-page__table {
  table-layout: auto;
  min-width: max-content;
}

.sales-planning-page__table th,
.sales-planning-page__table td {
  min-width: 6.2rem;
}

.sales-planning-page__table th:first-child,
.sales-planning-page__table td:first-child {
  min-width: 18rem;
}

.sales-planning-page__head-group th {
  text-align: center !important;
}

.sales-planning-page__day-head span {
  display: block;
}

.sales-planning-page__day-head small {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.64rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
}

.sales-planning-page__cell {
  text-align: right;
  white-space: nowrap;
}

.sales-planning-page__cell--fact {
  background: transparent;
}

.sales-planning-page__cell--plan {
  background: transparent;
}

.sales-planning-page__cell--total {
  background: #f8fafc;
}

.sales-planning-page__row--derived .sales-planning-page__cell--plan {
  background: #f8fafc;
}

.sales-planning-page__auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  align-self: flex-start;
  margin-top: 0.1rem;
  padding: 0.18rem 0.5rem 0.18rem 0.4rem;
  border: 1px solid var(--pnl-border);
  border-radius: 999px;
  background: var(--pnl-surface-subtle);
  color: var(--pnl-text-muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: help;
  transition:
    border-color var(--pnl-transition),
    color var(--pnl-transition),
    background var(--pnl-transition);
}

.sales-planning-page__auto-badge:hover {
  border-color: var(--pnl-border-strong);
  background: #f1f5f9;
  color: #475569;
}

.sales-planning-page__auto-badge-icon {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  color: #64748b;
}

.sales-planning-page__auto-badge-text {
  position: relative;
  top: 0.02rem;
}

.sales-planning-page__manual-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  align-self: flex-start;
  margin-top: 0.1rem;
  padding: 0.18rem 0.5rem 0.18rem 0.4rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
  cursor: help;
  transition:
    border-color var(--pnl-transition),
    color var(--pnl-transition),
    background var(--pnl-transition);
}

.sales-planning-page__manual-badge:hover {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1e40af;
}

.sales-planning-page__manual-badge-icon {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  color: #2563eb;
}

.sales-planning-page__manual-badge-text {
  position: relative;
  top: 0.02rem;
}

.sales-planning-page__row-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.45rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.sales-planning-page__plan-input {
  width: 100%;
  min-width: 5.4rem;
  padding: 0.38rem 0.48rem;
  border: 1px solid #d6deea;
  border-radius: 0.5rem;
  background: #fff;
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
}

.sales-planning-page__plan-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

/* ---------- Help button + panel: «Как устроено» ---------- */

.sales-planning-page__help-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.sales-planning-page__help-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.sales-planning-page__help-btn.is-active {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.sales-planning-page__help-btn svg {
  flex-shrink: 0;
}

.sales-planning-help {
  margin: 0 1.75rem 1rem;
  padding: 1.4rem 1.6rem 1.55rem;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.sales-planning-help__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.sales-planning-help__head-main {
  min-width: 0;
}

.sales-planning-help__eyebrow {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  margin-bottom: 0.5rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sales-planning-help__title {
  margin: 0 0 0.35rem;
  color: #0f172a;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.sales-planning-help__lede {
  margin: 0;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.55;
  max-width: 64ch;
}

.sales-planning-help__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-size: 0.8rem;
  cursor: pointer;
}

.sales-planning-help__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.sales-planning-help__section {
  padding-top: 1.05rem;
  border-top: 1px dashed #dbeafe;
}

.sales-planning-help__section + .sales-planning-help__section {
  margin-top: 1.05rem;
}

.sales-planning-help__section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 700;
}

.sales-planning-help__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.sales-planning-help__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.sales-planning-help__cards--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .sales-planning-help__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sales-planning-help__cards,
  .sales-planning-help__cards--two {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sales-planning-help__card {
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  background: #fff;
}

.sales-planning-help__card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.sales-planning-help__card-sub {
  margin-top: 0.1rem;
  margin-bottom: 0.55rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sales-planning-help__list {
  margin: 0;
  padding-left: 1.05rem;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.55;
}

.sales-planning-help__list li {
  margin-bottom: 0.18rem;
}

.sales-planning-help__list em {
  color: #64748b;
  font-style: normal;
  font-size: 0.78rem;
}

.sales-planning-help__card-note {
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px dashed #e2e8f0;
  color: #475569;
  font-size: 0.75rem;
  line-height: 1.45;
}

.sales-planning-help code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background: #eef2f7;
  color: #0f172a;
  font-size: 0.78rem;
  padding: 0.05rem 0.32rem;
  border-radius: 0.32rem;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}

.sales-planning-help__flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
}

.sales-planning-help__flow-row {
  display: grid;
  grid-template-columns: 200px 32px minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
}

.sales-planning-help__flow-from {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.sales-planning-help__flow-arrow {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.sales-planning-help__flow-to {
  color: #334155;
  font-size: 0.83rem;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .sales-planning-help__flow-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .sales-planning-help__flow-arrow {
    margin: 0;
  }
}

.sales-planning-help__rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
}

.sales-planning-help__rule {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.55;
}

.sales-planning-help__rule strong {
  color: #0f172a;
}

.sales-planning-help__rule-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-weight: 800;
  font-size: 0.82rem;
}

.sales-planning-help__formula {
  display: block;
  margin-top: 0.4rem;
  padding: 0.4rem 0.55rem;
  background: #0f172a;
  color: #f8fafc;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.78rem;
}

.sales-planning-help__rules-note {
  margin-top: 0.7rem;
  padding-left: 0.4rem;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
}

.sales-planning-help__plain-list {
  margin: 0;
  padding-left: 1.15rem;
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.6;
}

.sales-planning-help__plain-list li {
  margin-bottom: 0.35rem;
}

.sales-planning-help__footer {
  margin-top: 1.1rem;
  padding: 0.75rem 0.95rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 0.7rem;
  color: #78350f;
  font-size: 0.82rem;
  line-height: 1.55;
}

.sales-planning-help__viz-sync {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

.sales-planning-help__viz-sync-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
}

.sales-planning-help__viz-sync-card strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.sales-planning-help__viz-sync-card > span {
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.sales-planning-help__viz-sync-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: #1d4ed8;
}

.sales-planning-help__viz-sync-icon.is-products {
  color: #059669;
}

.sales-planning-help__viz-sync-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 4.5rem;
}

.sales-planning-help__viz-sync-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
}

.sales-planning-help__viz-sync-label {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sales-planning-help__viz-tree,
.sales-planning-help__viz-skus {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-top: 0.35rem;
}

.sales-planning-help__viz-tree span,
.sales-planning-help__viz-skus span {
  padding: 0.28rem 0.55rem;
  border-radius: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.sales-planning-help__viz-tree .is-revenue {
  background: #ecfdf5;
  color: #047857;
}

.sales-planning-help__viz-tree .is-expense {
  margin-left: 0.65rem;
  background: #fef2f2;
  color: #b91c1c;
}

.sales-planning-help__viz-tree .is-profit {
  margin-left: 1.3rem;
  background: #eff6ff;
  color: #1d4ed8;
}

.sales-planning-help__viz-skus span {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.sales-planning-help__viz-columns {
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
}

.sales-planning-help__viz-columns-head,
.sales-planning-help__viz-columns-row {
  display: grid;
  grid-template-columns: 5.5rem repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: center;
}

.sales-planning-help__viz-columns-head {
  margin-bottom: 0.45rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sales-planning-help__viz-columns-head .is-plan {
  color: #2563eb;
}

.sales-planning-help__viz-columns-head .is-fact {
  color: #059669;
}

.sales-planning-help__viz-columns-head .is-done {
  color: #64748b;
}

.sales-planning-help__viz-columns-row + .sales-planning-help__viz-columns-row {
  margin-top: 0.35rem;
}

.sales-planning-help__viz-columns-label {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
}

.sales-planning-help__viz-pill {
  padding: 0.35rem 0.5rem;
  border-radius: 0.45rem;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.sales-planning-help__viz-pill.is-plan {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.sales-planning-help__viz-pill.is-fact {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.sales-planning-help__viz-pill.is-done {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.sales-planning-help__viz-pill.is-muted {
  background: #f8fafc;
  color: #cbd5e1;
  border: 1px dashed #e2e8f0;
}

.sales-planning-help__viz-columns-note {
  margin: 0.7rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
}

.sales-planning-help__viz-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.sales-planning-help__viz-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
}

.sales-planning-help__viz-legend-item strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #0f172a;
  font-size: 0.86rem;
}

.sales-planning-help__viz-legend-item p {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.sales-planning-help__viz-flow-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.sales-planning-help__viz-flow-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
}

.sales-planning-help__viz-flow-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #0f172a;
  font-size: 0.86rem;
}

.sales-planning-help__viz-flow-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.sales-planning-help__viz-flow-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.sales-planning-help__viz-flow-icon.is-up {
  background: #059669;
}

.sales-planning-help__viz-flow-icon.is-down {
  background: #1d4ed8;
}

.sales-planning-help__viz-split {
  display: flex;
  gap: 0.2rem;
  height: 0.45rem;
  margin-top: 0.55rem;
  border-radius: 999px;
  overflow: hidden;
  background: #f1f5f9;
}

.sales-planning-help__viz-split span {
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 100%);
}

.sales-planning-help__viz-split span:nth-child(2) {
  background: linear-gradient(90deg, #93c5fd 0%, #60a5fa 100%);
}

.sales-planning-help__viz-split span:nth-child(3) {
  background: linear-gradient(90deg, #bfdbfe 0%, #93c5fd 100%);
}

.sales-planning-help__viz-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.sales-planning-help__viz-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  line-height: 1.45;
}

.sales-planning-help__viz-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

@media (max-width: 960px) {
  .sales-planning-help__viz-sync {
    grid-template-columns: minmax(0, 1fr);
  }

  .sales-planning-help__viz-sync-bridge {
    flex-direction: row;
    min-width: 0;
    padding: 0.2rem 0;
  }

  .sales-planning-help__viz-legend,
  .sales-planning-help__viz-flow-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .sales-planning-help__viz-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sales-planning-help__viz-columns-head,
  .sales-planning-help__viz-columns-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .sales-planning-help__viz-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sales-planning-page .pnl-page__toolbar-main {
  grid-template-columns: minmax(0, 1fr);
}

.sales-planning-page__toolbar-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.sales-planning-page__months-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sales-planning-page__month-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0.32rem 0.62rem;
  text-transform: capitalize;
}

.sales-planning-page__month-chip--empty {
  color: #64748b;
}

.sales-planning-page__month-filter {
  position: relative;
}

.sales-planning-page__filter-btn {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1dae7;
  border-radius: 0.62rem;
  background: #fff;
  color: #475569;
  cursor: pointer;
}

.sales-planning-page__filter-btn:hover {
  background: #f8fafc;
}

.sales-planning-page__filter-popover {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 18;
  min-width: 15.25rem;
  max-height: 19rem;
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 0.72rem;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  padding: 0.65rem;
}

.sales-planning-page__filter-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.45rem;
}

.sales-planning-page__filter-options {
  display: grid;
  gap: 0.35rem;
}

.sales-planning-page__filter-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #334155;
  text-transform: capitalize;
}

.sales-planning-page .pnl-page__pills {
  gap: 0.35rem;
}

.sales-planning-page .pnl-page__pill {
  min-width: 5.4rem;
}

.sales-planning-page__table--period th:first-child,
.sales-planning-page__table--period td:first-child {
  min-width: 18rem;
}

.sales-planning-page__table--period th:nth-child(2),
.sales-planning-page__table--period td:nth-child(2),
.sales-planning-page__table--period th:nth-child(3),
.sales-planning-page__table--period td:nth-child(3) {
  min-width: 11.5rem;
  text-align: right;
}

.sales-planning-page__table--months th,
.sales-planning-page__table--months td {
  min-width: 0;
}

.sales-planning-page__table--months thead tr:first-child th:first-child,
.sales-planning-page__table--months tbody td:first-child {
  min-width: 0;
  background: #fff;
  z-index: 18;
  box-shadow: 6px 0 8px -6px rgba(15, 23, 42, 0.2);
}

.sales-planning-page__month-head {
  text-align: center !important;
  text-transform: capitalize;
}

.sales-planning-page__month-title-row th {
  background: #f3f6fb !important;
}

.sales-planning-page__metric-head-row th {
  background: #f8fafc !important;
}

.sales-planning-page__table--months tbody td:first-child,
.sales-planning-page__table--months tbody tr:hover td:first-child {
  background: #fff !important;
}

.sales-planning-page__table--months {
  table-layout: fixed;
  min-width: 100%;
}

.sales-planning-page__summary {
  display: grid;
  gap: 0.75rem;
}

.sales-planning-page__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1.5rem;
}

.sales-planning-page__section-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
}

.sales-planning-page__table--summary .sales-planning-page__products-total-row td {
  border-top-width: 1px;
}

.sales-planning-page__summary-product-row td {
  background: #fbfdfc;
}

.sales-planning-page__table--months tbody tr.sales-planning-page__summary-product-row td:first-child,
.sales-planning-page__table--months tbody tr.sales-planning-page__summary-product-row:hover td:first-child {
  background: #fbfdfc !important;
}

.sales-planning-page__table--months tbody td:first-child {
  overflow: hidden;
}

.sales-planning-page__table--months tbody td:first-child .pnl-page__cell-title,
.sales-planning-page__table--months tbody td:first-child .pnl-page__row-main {
  min-width: 0;
  max-width: 100%;
}

.sales-planning-page__table--months tbody td:first-child .pnl-page__row-main > strong,
.sales-planning-page__table--months tbody td:first-child .pnl-page__row-main > span:not(.pnl-page__chevron),
.sales-planning-page__table--months tbody td:first-child .pnl-page__cell-title > strong,
.sales-planning-page__table--months tbody td:first-child .pnl-page__cell-title > span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.sales-planning-page__table--months tbody td:first-child .pnl-page__chevron {
  flex: 0 0 auto;
}

.sales-planning-page__table--months tbody td {
  position: relative;
}

.sales-planning-page__row--profit-products-reconcile td {
  border-top: 0.75rem solid #fff;
  background: #f8fafc;
}

.sales-planning-page__table--months tbody tr.sales-planning-page__row--profit-products-reconcile td:first-child,
.sales-planning-page__table--months tbody tr.sales-planning-page__row--profit-products-reconcile:hover td:first-child {
  background: #f8fafc !important;
}

.sales-planning-page__products-total-row td {
  background: #ecfdf5;
  border-top: 1px solid #a7f3d0;
  border-bottom: 1px solid #a7f3d0;
}

.sales-planning-page__products-total-row td:first-child strong {
  color: #065f46;
}

.sales-planning-page__table--months tbody tr.sales-planning-page__products-total-row td:first-child,
.sales-planning-page__table--months tbody tr.sales-planning-page__products-total-row:hover td:first-child {
  background: #ecfdf5 !important;
}

.sales-planning-page__month-sep {
  border-left: 2px solid #d7dee9 !important;
}

.sales-planning-page__cell-num {
  white-space: nowrap;
  text-align: right;
}

.sales-planning-page__cell-sep-left {
  border-left: 1px solid #e8edf4 !important;
}

.sales-planning-page__group-start {
  border-left: 2px solid #cbd8ea !important;
}

.sales-planning-page__group-m2d {
  background-color: rgba(59, 130, 246, 0.035);
}

.sales-planning-page__group-forecast {
  background-color: rgba(16, 185, 129, 0.04);
}

.sales-planning-page__metric-head-row .sales-planning-page__group-m2d {
  background-color: #f1f7ff !important;
}

.sales-planning-page__metric-head-row .sales-planning-page__group-forecast {
  background-color: #f0fdf7 !important;
}

.sales-planning-page__percent-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  font-weight: 700;
  font-family: inherit;
  line-height: inherit;
}

.sales-planning-page__percent-stack > span {
  font-size: 0.88em;
  color: #64748b;
  font-weight: 600;
}

.sales-planning-page__percent-stack small {
  color: #94a3b8;
  font-size: 0.72em;
  font-weight: 600;
}

.sales-planning-page {
  --sales-planning-auto-value: #475569;
}

.sales-planning-page tr.sales-planning-page__row--readonly-first-col .sales-planning-page__plan-cell .pnl-page__cell-value,
.sales-planning-page tr.sales-planning-page__row--readonly-first-col .sales-planning-page__plan-cell .pnl-page__cell-value--positive,
.sales-planning-page tr.sales-planning-page__row--readonly-first-col .sales-planning-page__plan-cell .pnl-page__cell-value--negative,
.sales-planning-page tr.sales-planning-page__row--readonly-first-col .sales-planning-page__plan-cell .pnl-page__cell-share {
  color: var(--sales-planning-auto-value);
  -webkit-text-fill-color: var(--sales-planning-auto-value);
}

.sales-planning-page__plan-cell {
  text-align: right;
}

.sales-planning-page__plan-cell .pnl-page__cell-value,
.sales-planning-page__plan-cell .pnl-page__cell-value--positive,
.sales-planning-page__plan-cell .pnl-page__cell-value--negative,
.sales-planning-page__plan-cell .sales-planning-page__plan-input {
  color: #2563eb;
  -webkit-text-fill-color: #2563eb;
}

.sales-planning-page__plan-cell .pnl-page__cell-share,
.sales-planning-page__plan-cell .sales-planning-page__percent-input {
  color: #3b82f6;
  -webkit-text-fill-color: #3b82f6;
}

.sales-planning-page__edit-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  width: 100%;
}

.sales-planning-page__fixed-head .pnl-page__fixed-head-viewport {
  min-width: 100%;
}

.sales-planning-page__no-fact {
  color: #94a3b8;
}

@media (max-width: 768px) {
  .sales-planning-page .pnl-page__toolbar,
  .sales-planning-page .pnl-page__body {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .sales-planning-page .pnl-page__toolbar {
    gap: 0.45rem;
  }

  .sales-planning-page .pnl-page__toolbar-main {
    grid-template-columns: 1fr;
  }

  .sales-planning-page__toolbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .sales-planning-page__filter-popover {
    right: 0;
    left: auto;
    min-width: 13.2rem;
    max-width: min(92vw, 18rem);
  }

  .sales-planning-page__save-btn {
    min-height: 2.25rem;
  }

  .sales-planning-page__table th,
  .sales-planning-page__table td {
    min-width: 5.5rem;
    padding: 0.56rem 0.45rem;
  }

  .sales-planning-page__table th:first-child,
  .sales-planning-page__table td:first-child {
    min-width: 13.6rem;
  }

  .sales-planning-page__table--period th:nth-child(2),
  .sales-planning-page__table--period td:nth-child(2),
  .sales-planning-page__table--period th:nth-child(3),
  .sales-planning-page__table--period td:nth-child(3) {
    min-width: 9.4rem;
  }

  .sales-planning-page__table--months th,
  .sales-planning-page__table--months td {
    min-width: 0;
  }

  .sales-planning-page__table--months th:first-child,
  .sales-planning-page__table--months td:first-child {
    min-width: 0;
  }

  .sales-planning-page__plan-input {
    min-width: 4.5rem;
    font-size: 0.95rem;
    padding: 0.34rem 0.4rem;
  }

  .sales-planning-page__percent-input,
  .sales-planning-page .pnl-page__cell-share {
    font-size: 0.84rem;
  }

  .sales-planning-page .pnl-page__pill {
    min-width: 4.4rem;
  }

  .sales-planning-page__success {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

/* planning cells: neutral look (no visual highlight of editable cells) */
.sales-planning-page__plan-input,
.sales-planning-page__percent-input {
  width: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  line-height: inherit;
  text-align: right;
  box-shadow: none;
  -webkit-text-fill-color: currentColor;
  opacity: 1;
  appearance: textfield;
  -moz-appearance: textfield;
  font-variant-numeric: tabular-nums;
}

.sales-planning-page__plan-input {
  font-size: 0.95rem;
  font-weight: 700;
}

.sales-planning-page__percent-input {
  color: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 0;
}

.sales-planning-page .pnl-page__cell-share {
  font-weight: 600;
  line-height: 1.2;
}

.sales-planning-page__plan-input:focus,
.sales-planning-page__percent-input:focus {
  outline: none;
  box-shadow: none;
}

.sales-planning-page__plan-input::-webkit-outer-spin-button,
.sales-planning-page__plan-input::-webkit-inner-spin-button,
.sales-planning-page__percent-input::-webkit-outer-spin-button,
.sales-planning-page__percent-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Keep editable planned absolute values in the planning color. */
.sales-planning-page__plan-input.pnl-page__cell-value--positive {
  color: #2563eb;
  -webkit-text-fill-color: #2563eb;
}

.sales-planning-page__plan-input.pnl-page__cell-value--negative {
  color: #2563eb;
  -webkit-text-fill-color: #2563eb;
}

.sales-planning-page__confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.sales-planning-page__confirm-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
  cursor: default;
}

.sales-planning-page__confirm-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 2rem));
  padding: 1.2rem 1.25rem 1.25rem;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.28);
}

.sales-planning-page__confirm-head {
  display: grid;
  gap: 0.45rem;
}

.sales-planning-page__confirm-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.55rem;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sales-planning-page__confirm-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.1rem;
  line-height: 1.35;
}

.sales-planning-page__confirm-subtitle {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.5;
}

.sales-planning-page__confirm-values {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
}

.sales-planning-page__confirm-values > div {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
  padding: 0.68rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.sales-planning-page__confirm-values span {
  color: #64748b;
  font-size: 0.76rem;
}

.sales-planning-page__confirm-values strong {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.sales-planning-page__confirm-arrow {
  font-size: 1rem;
}

.sales-planning-page__confirm-actions {
  margin-top: 1.05rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.62rem;
}

.sales-planning-page__confirm-cancel,
.sales-planning-page__confirm-submit {
  padding: 0.58rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.sales-planning-page__confirm-cancel {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.sales-planning-page__confirm-submit {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.sales-planning-page__confirm-cancel:hover {
  background: #f8fafc;
}

.sales-planning-page__confirm-submit:hover {
  background: #1d4ed8;
}

.sales-planning-page__forecast-hit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: right;
  cursor: pointer;
}

.sales-planning-page__forecast-hit.is-manual .pnl-page__cell-value {
  text-decoration: underline dotted;
  text-underline-offset: 0.18em;
}

.sales-planning-page__forecast-hit:hover .pnl-page__cell-value {
  color: #1d4ed8;
}

.sales-planning-page__forecast-calc {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.sales-planning-page__forecast-field {
  display: grid;
  gap: 0.3rem;
}

.sales-planning-page__forecast-field span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}

.sales-planning-page__forecast-field input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.sales-planning-page__forecast-field input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: #2563eb;
}

.sales-planning-page__forecast-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid #dbe5f0;
  border-radius: 6px;
  background: #f8fafc;
}

.sales-planning-page__forecast-total span {
  color: #64748b;
  font-size: 0.8rem;
}

.sales-planning-page__forecast-total strong {
  color: #0f172a;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.sales-planning-page__forecast-meta,
.sales-planning-page__forecast-hint {
  margin: 0.55rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.sales-planning-page__forecast-actions {
  flex-wrap: wrap;
}

.sales-forecasting-page__toolbar {
  align-items: end;
}

.sales-forecasting-page__filters {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  min-width: 0;
}

.sales-forecasting-page__search {
  width: min(22rem, 32vw);
}

.sales-forecasting-page .pnl-page__select {
  min-height: 2.6rem;
  padding: 0.58rem 2.2rem 0.58rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.9rem;
}

.sales-forecasting-page .pnl-page__select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.sales-forecasting-page__period {
  display: grid;
  gap: 0.25rem;
  min-width: 13rem;
  padding-bottom: 0.12rem;
}

.sales-forecasting-page__period span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.sales-forecasting-page__period strong {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
}

.sales-forecasting-page__actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

.sales-forecasting-page__alert {
  margin: 0 1.75rem 0.8rem;
}

.sales-forecasting-page__alert--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.sales-forecasting-page__body {
  margin-top: 0.45rem;
}

.sales-forecasting-page__table-wrap {
  overflow: auto;
  isolation: isolate;
}

.sales-forecasting-page__table {
  --forecast-group-width: clamp(120px, 10vw, 155px);
  --forecast-category-width: clamp(145px, 12vw, 185px);
  --forecast-article-width: clamp(220px, 17vw, 280px);
  min-width: 1375px;
  table-layout: fixed;
}

.sales-forecasting-page__col-group {
  width: var(--forecast-group-width);
}

.sales-forecasting-page__col-category {
  width: var(--forecast-category-width);
}

.sales-forecasting-page__col-article {
  width: var(--forecast-article-width);
}

.sales-forecasting-page__col-source {
  width: 145px;
}

.sales-forecasting-page__col-amount {
  width: 145px;
}

.sales-forecasting-page__col-days {
  width: 120px;
}

.sales-forecasting-page__col-last {
  width: 135px;
}

.sales-forecasting-page__col-schedule {
  width: 210px;
}

.sales-forecasting-page__table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sales-forecasting-page__table th:nth-child(n + 5) {
  text-align: right;
}

.sales-forecasting-page__table td {
  vertical-align: middle;
  max-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.sales-forecasting-page__table th:nth-child(-n + 3),
.sales-forecasting-page__table td:nth-child(-n + 3) {
  position: sticky;
  background: #ffffff;
  background-clip: padding-box;
  overflow: hidden;
}

.sales-forecasting-page__table th:nth-child(-n + 3) {
  z-index: 8;
  background: #f8fafc;
  backdrop-filter: none;
}

.sales-forecasting-page__table td:nth-child(-n + 3) {
  z-index: 5;
}

.sales-forecasting-page__table th:nth-child(1),
.sales-forecasting-page__table td:nth-child(1) {
  left: 0;
  width: var(--forecast-group-width);
  min-width: var(--forecast-group-width);
  max-width: var(--forecast-group-width);
}

.sales-forecasting-page__table th:nth-child(2),
.sales-forecasting-page__table td:nth-child(2) {
  left: var(--forecast-group-width);
  width: var(--forecast-category-width);
  min-width: var(--forecast-category-width);
  max-width: var(--forecast-category-width);
}

.sales-forecasting-page__table th:nth-child(3),
.sales-forecasting-page__table td:nth-child(3) {
  left: calc(var(--forecast-group-width) + var(--forecast-category-width));
  width: var(--forecast-article-width);
  min-width: var(--forecast-article-width);
  max-width: var(--forecast-article-width);
  box-shadow: 2px 0 0 #e2e8f0, 8px 0 12px -12px rgba(15, 23, 42, 0.5);
}

.sales-forecasting-page__table tbody tr:hover td:nth-child(-n + 3) {
  background: #f8fafc;
}

.sales-forecasting-page__category {
  display: grid;
  gap: 0.18rem;
}

.sales-forecasting-page__category small {
  color: #94a3b8;
  font-size: 0.72rem;
}

.sales-forecasting-page__source {
  color: #64748b;
  font-size: 0.76rem;
}

.sales-forecasting-page__number {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sales-forecasting-page__schedule {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.sales-forecasting-page__schedule select,
.sales-forecasting-page__schedule input {
  width: 100%;
  min-width: 0;
  padding: 0.38rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.sales-forecasting-page__schedule select {
  font-size: 0.75rem;
  color: #334155;
}

.sales-forecasting-page__schedule input {
  font-weight: 700;
}

.sales-forecasting-page__schedule input::placeholder {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 500;
}

.sales-forecasting-page__schedule select:focus,
.sales-forecasting-page__schedule input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: #2563eb;
}

.sales-forecasting-page__schedule-value {
  min-width: 0;
}

.sales-forecasting-page__schedule-value--interval {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
}

.sales-forecasting-page__schedule-value--interval input {
  text-align: right;
}

.sales-forecasting-page__schedule-value > span {
  color: #64748b;
  font-size: 0.76rem;
}

.sales-forecasting-page__schedule small {
  color: #94a3b8;
  font-size: 0.68rem;
}

.sales-forecasting-page__schedule small.is-manual {
  color: #2563eb;
}

@media (max-width: 620px) {
  .sales-planning-page__confirm-dialog {
    width: min(520px, calc(100vw - 1.25rem));
    padding: 1rem;
  }

  .sales-planning-page__confirm-values {
    grid-template-columns: 1fr;
  }

  .sales-planning-page__confirm-arrow {
    display: none;
  }

  .sales-planning-page__confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sales-forecasting-page__toolbar,
  .sales-forecasting-page__filters {
    align-items: stretch;
  }

  .sales-forecasting-page__filters {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .sales-forecasting-page__search {
    width: 100%;
  }

  .sales-forecasting-page__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.purchase-recs-page {
  margin: 0;
}

.purchase-recs-page__panel {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.purchase-recs-page__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.56rem;
  padding: 1.35rem 2.25rem 0.75rem 0;
  background: #fff;
  color: #0f172a;
}

.purchase-recs-page__title {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #000;
}

.purchase-recs-page__subtitle {
  max-width: 88ch;
  margin: 0.55rem 0 0;
  color: var(--mpb-gray-500);
  font-size: 0.875rem;
  line-height: 1.55;
}

.purchase-recs-page__actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.purchase-recs-page__target {
  display: grid;
  gap: 0.28rem;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.purchase-recs-page__target input {
  width: 5.2rem;
  min-height: 2.25rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.45rem;
  padding: 0.42rem 0.55rem;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 750;
}

.purchase-recs-page__icon-btn {
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.purchase-recs-page__icon-btn svg,
.purchase-recs-page__section-title svg {
  width: 1rem;
  height: 1rem;
}

.purchase-recs-page__alert {
  margin-bottom: 1rem;
}

.purchase-recs-page__cards-section,
.purchase-recs-page__table-section {
  margin-top: 1.15rem;
}

.purchase-recs-page__section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
}

.purchase-recs-page__cards {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.2rem;
  -webkit-overflow-scrolling: touch;
}

.purchase-recs-page__supplier-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 0 0 18rem;
  min-height: 13.5rem;
  border: 1px solid #e1e8f1;
  border-radius: 0.5rem;
  padding: 0.9rem;
  background: #fff;
}

.purchase-recs-page__supplier-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.purchase-recs-page__supplier-label {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.purchase-recs-page__supplier-head h2 {
  margin: 0.2rem 0 0;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.2;
}

.purchase-recs-page__date {
  flex-shrink: 0;
  border: 1px solid #d6efe6;
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
  background: #effaf6;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 800;
}

.purchase-recs-page__supplier-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 750;
}

.purchase-recs-page__supplier-stats span {
  border: 1px solid #e6edf5;
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  background: #f8fafc;
}

.purchase-recs-page__card-products {
  display: grid;
  grid-template-columns: repeat(4, 2.15rem);
  gap: 0.38rem;
  min-height: 3rem;
}

.purchase-recs-page__card-product,
.purchase-recs-page__card-more {
  position: relative;
  width: 2.15rem;
  height: 3rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #f8fafc;
}

.purchase-recs-page__card-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.purchase-recs-page__card-product > span,
.purchase-recs-page__card-more {
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-weight: 800;
}

.purchase-recs-page__card-product strong {
  position: absolute;
  right: 0.12rem;
  bottom: 0.12rem;
  min-width: 1.25rem;
  border-radius: 999px;
  padding: 0.08rem 0.24rem;
  background: rgba(15, 23, 42, 0.84);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1.1;
  text-align: center;
}

.purchase-recs-page__create {
  margin-top: auto;
  width: 100%;
}

.purchase-recs-page__empty {
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
  padding: 1rem;
  color: #64748b;
  background: #f8fafc;
}

.purchase-recs-page__section-title--table {
  justify-content: space-between;
  gap: 0.65rem 1rem;
  flex-wrap: wrap;
}

.purchase-recs-page__section-title-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.purchase-recs-page__table-meta {
  font-weight: 650;
  font-size: 0.82rem;
  color: #64748b;
}

.purchase-recs-page__th-supplier {
  white-space: nowrap;
}

.purchase-recs-page__th-supplier-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  position: relative;
}

.purchase-recs-page__th-sales-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  position: relative;
}

.purchase-recs-page__th-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.purchase-recs-page__th-info {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid #94a3b8;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  user-select: none;
}

.purchase-recs-page__th-info-tip {
  position: absolute;
  z-index: 10050;
  left: 50%;
  top: calc(100% + 0.4rem);
  width: max-content;
  max-width: min(16rem, calc(100vw - 2rem));
  transform: translateX(-50%);
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid #e2e8f0;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.purchase-recs-page__th-info-tip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent #0f172a transparent;
}

.purchase-recs-page__th-info-tip-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.purchase-recs-page__th-info-tip-body {
  display: block;
  margin-top: 0.2rem;
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.35;
}

.purchase-recs-page__th-info-wrap:hover .purchase-recs-page__th-info-tip,
.purchase-recs-page__th-info-wrap:focus-within .purchase-recs-page__th-info-tip {
  opacity: 1;
  visibility: visible;
}

.purchase-recs-page__th-info:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.purchase-recs-page__supplier-filter-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.48rem;
  padding: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}

.purchase-recs-page__supplier-filter-icon:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.purchase-recs-page__supplier-filter-icon.is-active {
  background: transparent;
  color: #1d4ed8;
  box-shadow: none;
}

.purchase-recs-page__supplier-filter-icon:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.purchase-recs-page__supplier-filter-popover {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 120;
  display: flex;
  width: min(24rem, calc(100vw - 2rem));
  max-height: min(28rem, calc(100dvh - 5rem));
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
}

.purchase-recs-page__th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  text-align: left;
  white-space: normal;
  line-height: 1.25;
}

.purchase-recs-page__th-sort:hover {
  color: #0f172a;
}

.purchase-recs-page__th-sort-dir {
  flex-shrink: 0;
  color: #2563eb;
  font-weight: 800;
}

.purchase-recs-page__table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  margin: 1rem 0 2rem;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.purchase-recs-page__mobile-list {
  display: none;
}

.purchase-recs-page__mobile-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 0.6rem;
  padding: 0.9rem;
  color: #64748b;
  background: #f8fafc;
}

.purchase-recs-page__mobile-card {
  border: 1px solid #e5edf6;
  border-radius: 0.8rem;
  padding: 0.75rem;
  background: #fff;
}

.purchase-recs-page__mobile-product {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.purchase-recs-page__mobile-product img,
.purchase-recs-page__mobile-product .purchase-recs-page__photo-placeholder {
  width: 2.2rem;
  height: 2.8rem;
  flex: 0 0 2.2rem;
}

.purchase-recs-page__mobile-product strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.88rem;
  line-height: 1.2;
}

.purchase-recs-page__mobile-product span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.74rem;
}

.purchase-recs-page__mobile-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr 1fr;
}

.purchase-recs-page__mobile-grid > div {
  border: 1px solid #eef2f7;
  border-radius: 0.55rem;
  padding: 0.4rem 0.5rem;
  background: #f8fafc;
}

.purchase-recs-page__mobile-grid > div > span {
  display: block;
  margin-bottom: 0.14rem;
  color: #64748b;
  font-size: 0.7rem;
}

.purchase-recs-page__mobile-grid > div > strong {
  display: block;
  color: #0f172a;
  font-size: 0.82rem;
  line-height: 1.2;
}

.purchase-recs-page__mobile-grid > div > small {
  display: block;
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.68rem;
}

.purchase-recs-page__table {
  min-width: 70rem;
}

.purchase-recs-page__fixed-head {
  position: fixed;
  z-index: 70;
  display: none;
  overflow: visible;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  pointer-events: none;
}

.purchase-recs-page__table--fixed-head {
  margin: 0;
}

.purchase-recs-page__table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
  box-shadow: inset 0 -1px 0 #e5edf6;
  white-space: nowrap;
}

.purchase-recs-page__table--fixed-head th {
  position: relative;
  top: auto;
  z-index: 2;
}

.purchase-recs-page__table td {
  vertical-align: middle;
}

.purchase-recs-page__table tbody tr.is-recommended td {
  background: #fbfefc;
}

.purchase-recs-page__product-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 14.5rem;
}

.purchase-recs-page__product-cell img,
.purchase-recs-page__photo-placeholder {
  width: 2.45rem;
  height: 3.2rem;
  flex: 0 0 2.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.42rem;
  object-fit: cover;
  background: #f8fafc;
}

.purchase-recs-page__photo-placeholder {
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-weight: 800;
}

.purchase-recs-page__product-cell strong {
  display: -webkit-box;
  max-width: 13.7rem;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.purchase-recs-page__table th:nth-child(8),
.purchase-recs-page__table td:nth-child(8) {
  min-width: 9.2rem;
}

.purchase-recs-page__table th:nth-child(3),
.purchase-recs-page__table td:nth-child(3),
.purchase-recs-page__table th:nth-child(4),
.purchase-recs-page__table td:nth-child(4),
.purchase-recs-page__table th:nth-child(5),
.purchase-recs-page__table td:nth-child(5),
.purchase-recs-page__table th:nth-child(6),
.purchase-recs-page__table td:nth-child(6),
.purchase-recs-page__table th:nth-child(7),
.purchase-recs-page__table td:nth-child(7),
.purchase-recs-page__table th:nth-child(9),
.purchase-recs-page__table td:nth-child(9),
.purchase-recs-page__table th:nth-child(10),
.purchase-recs-page__table td:nth-child(10) {
  min-width: 4.5rem;
}

.purchase-recs-page__product-cell span,
.purchase-recs-page__muted-line {
  display: block;
  margin-top: 0.18rem;
  color: #64748b;
  font-size: 0.76rem;
}

.purchase-recs-page__qty {
  color: #047857;
  font-weight: 850;
}

.purchase-recs-page__section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.purchase-recs-page__section-row .purchase-recs-page__section-title {
  margin-bottom: 0;
}

.purchase-recs-page__manual-btn {
  min-height: 2.25rem;
}

.purchase-recs-page__card-open {
  display: grid;
  width: 100%;
  gap: 0.7rem;
  border: none;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.purchase-recs-page__card-open:focus-visible,
.purchase-recs-page__modal-close:focus-visible,
.purchase-recs-page__remove-row:focus-visible,
.purchase-recs-page__picker-item:focus-visible,
.purchase-recs-page__supplier-filter-icon:focus-visible,
.purchase-recs-page__supplier-filter-option:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.purchase-recs-page__modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: calc(0.75rem + env(safe-area-inset-top)) 0.5rem 0.75rem;
}

.purchase-recs-page__modal--supplier-filter {
  align-items: center;
  padding: 1rem;
}

.purchase-recs-page__supplier-filter-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(26.5rem, calc(100vw - 1.5rem));
  max-height: min(34rem, calc(100dvh - 2rem));
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 52%, #eef2f7 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75) inset,
    0 22px 50px rgba(15, 23, 42, 0.2),
    0 8px 18px rgba(15, 23, 42, 0.08);
}

.purchase-recs-page__supplier-filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.85rem 0.7rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.purchase-recs-page__supplier-filter-head h2 {
  margin: 0.1rem 0 0;
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
}

.purchase-recs-page__supplier-filter-lead {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.purchase-recs-page__supplier-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.purchase-recs-page__supplier-filter-reset {
  border: 1px solid #dbe4ef;
  border-radius: 0.55rem;
  background: #f8fafc;
  color: #334155;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.35rem 0.58rem;
  cursor: pointer;
}

.purchase-recs-page__supplier-filter-reset:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.purchase-recs-page__supplier-filter-search {
  padding: 0.6rem 0.85rem 0;
}

.purchase-recs-page__supplier-filter-search input {
  width: 100%;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  padding: 0.58rem 0.8rem;
  font-size: 0.9rem;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.purchase-recs-page__supplier-filter-search input::placeholder {
  color: #94a3b8;
}

.purchase-recs-page__supplier-filter-search input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.purchase-recs-page__supplier-filter-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.45rem 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.purchase-recs-page__supplier-filter-empty {
  padding: 1.1rem 0.75rem;
  text-align: center;
  color: #64748b;
  font-size: 0.88rem;
}

.purchase-recs-page__supplier-filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 0.7rem;
  padding: 0.62rem 0.78rem;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.12s, box-shadow 0.14s;
}

.purchase-recs-page__supplier-filter-option:hover {
  background: #fff;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.purchase-recs-page__supplier-filter-option.is-selected {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.09);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.purchase-recs-page__supplier-filter-option-name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-recs-page__supplier-filter-option-count {
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 750;
  color: #64748b;
}

@media (max-width: 768px) {
  .purchase-recs-page__table-wrap,
  .purchase-recs-page__fixed-head {
    display: none !important;
  }

  .purchase-recs-page__mobile-list {
    display: grid;
    gap: 0.6rem;
    margin: 0.7rem 0 1rem;
  }

  .purchase-recs-page__mobile-grid {
    grid-template-columns: 1fr;
  }
}

.purchase-recs-page__modal-backdrop {
  position: fixed;
  inset: 0;
  border: none;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.purchase-recs-page__modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(96rem, calc(100vw - 1rem));
  max-height: calc(100dvh - 1.5rem);
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.7rem;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
}

.purchase-recs-page__modal-dialog--custom {
  width: min(110rem, calc(100vw - 1rem));
}

.purchase-recs-page__modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e5edf6;
  padding: 0.9rem 1rem;
}

.purchase-recs-page__modal-header h2 {
  margin: 0.15rem 0 0;
  color: #0f172a;
  font-size: 1.1rem;
  line-height: 1.25;
}

.purchase-recs-page__modal-header p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.purchase-recs-page__modal-close,
.purchase-recs-page__remove-row {
  display: inline-grid;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.45rem;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
}

.purchase-recs-page__modal-close {
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
}

.purchase-recs-page__modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  border-bottom: 1px solid #eef2f7;
  padding: 0.75rem 1rem;
  background: #f8fafc;
}

.purchase-recs-page__modal-toolbar--custom {
  align-items: end;
}

.purchase-recs-page__target select {
  min-height: 2.25rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.45rem;
  padding: 0.42rem 0.55rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 750;
}

.purchase-recs-page__target--wide input,
.purchase-recs-page__target--wide select {
  width: 16rem;
}

.purchase-recs-page__modal-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}

.purchase-recs-page__modal-kpis span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  background: #fff;
  color: #475569;
  font-size: 0.8rem;
}

.purchase-recs-page__modal-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}

.purchase-recs-page__modal-table {
  min-width: 78rem;
}

.purchase-recs-page__modal-table th,
.purchase-recs-page__modal-table td {
  vertical-align: middle;
}

.purchase-recs-page__modal-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
  box-shadow: inset 0 -1px 0 #e5edf6;
}

.purchase-recs-page__product-cell--modal {
  min-width: 22rem;
}

.purchase-recs-page__days-input,
.purchase-recs-page__qty-input {
  width: 5.4rem;
  min-height: 2rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.42rem;
  padding: 0.35rem 0.5rem;
  color: #0f172a;
  font-weight: 800;
  text-align: right;
}

.purchase-recs-page__days-input {
  width: 4.6rem;
}

.purchase-recs-page__reset-qty {
  display: block;
  margin-top: 0.25rem;
  border: none;
  padding: 0;
  background: transparent;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}

.purchase-recs-page__remove-row {
  width: 1.9rem;
  height: 1.9rem;
  border-color: #fecaca;
  color: #dc2626;
}

.purchase-recs-page__modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  border-top: 1px solid #e5edf6;
  padding: 0.75rem 1rem;
  background: #fff;
}

.purchase-recs-page__custom-layout {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
  gap: 0.75rem;
  overflow: hidden;
  padding: 0.75rem 1rem;
}

.purchase-recs-page__custom-layout--table-only {
  grid-template-columns: minmax(0, 1fr);
}

.purchase-recs-page__picker,
.purchase-recs-page__selected {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5edf6;
  border-radius: 0.6rem;
  background: #fff;
}

.purchase-recs-page__picker-title {
  border-bottom: 1px solid #e5edf6;
  padding: 0.55rem 0.7rem;
  color: #0f172a;
  font-weight: 800;
}

.purchase-recs-page__picker-search {
  border-bottom: 1px solid #e5edf6;
  padding: 0.45rem;
  background: #f8fafc;
}

.purchase-recs-page__picker-search input {
  width: 100%;
  min-height: 2.15rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.45rem;
  padding: 0.42rem 0.55rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.9rem;
}

.purchase-recs-page__picker-list {
  display: grid;
  gap: 0.4rem;
  overflow: auto;
  padding: 0.45rem;
}

.purchase-recs-page__picker-item {
  display: grid;
  width: 100%;
  grid-template-columns: 2.15rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e5edf6;
  border-radius: 0.5rem;
  padding: 0.4rem;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.purchase-recs-page__picker-item.is-selected {
  border-color: #93c5fd;
  background: #eff6ff;
}

.purchase-recs-page__picker-item img,
.purchase-recs-page__picker-item .purchase-recs-page__photo-placeholder {
  width: 2.15rem;
  height: 3rem;
  flex-basis: 2.15rem;
  object-fit: cover;
}

.purchase-recs-page__picker-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.82rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.purchase-recs-page__picker-item small {
  display: block;
  margin-top: 0.18rem;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .purchase-recs-page {
    margin: 0;
  }

  .purchase-recs-page__panel {
    padding: 0;
  }

  .purchase-recs-page__hero {
    display: grid;
    padding: 1.35rem 1rem 0.9rem;
  }

  .purchase-recs-page__actions {
    justify-content: flex-end;
  }

  .purchase-recs-page__cards {
    gap: 0.65rem;
  }

  .purchase-recs-page__section-row {
    align-items: stretch;
    flex-direction: column;
  }

  .purchase-recs-page__manual-btn {
    width: 100%;
  }

  .purchase-recs-page__modal {
    padding: 0.35rem;
  }

  .purchase-recs-page__modal-dialog {
    width: calc(100vw - 0.7rem);
    max-height: calc(100dvh - 0.7rem);
    border-radius: 0.55rem;
  }

  .purchase-recs-page__modal-header,
  .purchase-recs-page__modal-toolbar,
  .purchase-recs-page__modal-footer {
    padding: 0.65rem;
  }

  .purchase-recs-page__target--wide input,
  .purchase-recs-page__target--wide select {
    width: 100%;
  }

  .purchase-recs-page__modal-kpis {
    width: 100%;
    margin-left: 0;
  }

  .purchase-recs-page__custom-layout {
    grid-template-columns: 1fr;
    overflow: auto;
    padding: 0.55rem;
  }

  .purchase-recs-page__picker {
    max-height: 18rem;
  }
}
