:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #1e2329;
  --text: #0f172a;
  --muted: #667085;
  --line: #d9dee7;
  --border: #d9dee7;
  --primary: #0b5cff;
  --accent: #198754;
  --accent-dark: #12663f;
  --warn: #b54708;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --work-label-font-size: 11px;
  --work-meta-font-size: 12px;
  --work-row-label-font-size: 11px;
  --work-row-value-font-size: 12px;
  --work-line-title-font-size: 13px;
  --work-line-meta-font-size: 11px;
  --work-hero-value-font-size: 19px;
  --work-amount-font-size: 21px;
}
/* Products Pricing Phase 2A: Actual Prices workspace */
.actual-prices-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 3.5fr) minmax(0, 8.5fr);
  gap: 16px;
  align-items: start;
}

.actual-prices-products,
.actual-prices-detail {
  min-width: 0;
  margin: 0;
}

.actual-prices-products {
  position: sticky;
  top: 12px;
  display: grid;
  grid-template-rows: auto auto minmax(220px, 62vh);
  gap: 12px;
  padding: 16px;
}

.actual-prices-list-head,
.actual-prices-detail-head,
.actual-price-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.actual-prices-list-head h3,
.actual-prices-detail-head h3,
.actual-price-group-head h4 {
  margin: 0;
}

.actual-prices-list-head span,
.actual-price-group-head p,
.actual-prices-product-title span,
.actual-prices-head-meta,
.actual-price-name span,
.actual-price-value span,
.actual-price-state small,
.actual-price-explanation,
.actual-price-action-note {
  color: #64748b;
  font-size: 13px;
}

.actual-prices-search {
  margin: 0;
}

.actual-prices-products .pricing-product-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.actual-prices-products .pricing-product-row {
  min-height: 72px;
  padding: 10px 12px;
}

.actual-prices-products .pricing-product-row span {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.actual-prices-products .pricing-product-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actual-prices-detail {
  padding: 0 20px 20px;
  overflow: hidden;
}

.actual-prices-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 82px;
  padding: 14px 0;
  border-bottom: 1px solid #dbe3ee;
}

.actual-prices-product-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.actual-prices-product-title > div:last-child {
  min-width: 0;
}

.actual-prices-product-title h3 {
  overflow-wrap: anywhere;
}

.actual-prices-head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.actual-prices-mobile-toolbar,
.actual-prices-mobile-back {
  display: none;
}

.actual-prices-desktop-refresh .order-action-icon {
  height: 16px;
  width: 16px;
}

.actual-prices-permission-badge {
  padding: 5px 8px;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  background: #f8fafc;
}

.actual-price-group {
  padding: 22px 0 2px;
}

.actual-price-group + .actual-price-group {
  margin-top: 8px;
  border-top: 1px solid #dbe3ee;
}

.actual-price-group-head {
  align-items: flex-start;
  margin-bottom: 8px;
}

.actual-price-group-head p {
  margin: 3px 0 0;
}

.actual-price-rows {
  display: grid;
}

.actual-price-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.72fr) minmax(104px, 0.58fr) minmax(190px, 1.45fr) minmax(132px, 0.85fr);
  gap: 12px;
  align-items: start;
  min-height: 70px;
  padding: 12px 0;
  border-top: 1px solid #e7edf4;
}

.actual-price-row.is-readonly-price {
  grid-template-columns: minmax(120px, 0.8fr) minmax(110px, 0.55fr) minmax(220px, 2.2fr);
  min-height: 60px;
}

.actual-price-name,
.actual-price-value,
.actual-price-state,
.actual-price-explanation {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.actual-price-name,
.actual-price-value,
.actual-price-state {
  padding-top: 2px;
}

.actual-price-explanation {
  display: block;
  line-height: 1.4;
}

.actual-price-name strong,
.actual-price-value strong {
  color: #172033;
}

.actual-price-value strong {
  font-size: 18px;
}

.actual-price-mode {
  justify-self: start;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.actual-price-mode.tone-success { border-color: #9bd5b3; color: #087443; background: #eefbf3; }
.actual-price-mode.tone-info { border-color: #a9c8f4; color: #245da5; background: #f2f7ff; }
.actual-price-mode.tone-warning { border-color: #e7c565; color: #8a5208; background: #fff9e7; }
.actual-price-mode.tone-danger { border-color: #efaaa7; color: #a92b25; background: #fff3f2; }
.actual-price-mode.tone-muted { border-color: #d7dee8; color: #64748b; background: #f8fafc; }

.actual-price-actions {
  display: grid;
  align-items: start;
  justify-items: end;
  gap: 6px;
  min-width: 0;
  text-align: right;
}

.actual-price-edit-action,
.actual-price-review-action {
  min-width: 108px;
}

.actual-price-secondary-action {
  max-width: 150px;
  padding: 2px 0;
  color: #526071;
  font-size: 12px;
  line-height: 1.3;
  text-align: right;
  white-space: normal;
}

.actual-price-action-note {
  max-width: 220px;
}

.danger-text {
  color: #a92b25;
}

.actual-promo-review-details + .actual-promo-review-result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #fed7aa;
}

.actual-promo-review-result p {
  margin: 5px 0 0;
}

.actual-prices-empty {
  display: grid;
  place-content: center;
  min-height: 430px;
  text-align: center;
  color: #64748b;
}

.actual-prices-empty strong {
  color: #172033;
  font-size: 20px;
}

.actual-prices-empty p {
  max-width: 420px;
}

.product-edit-pricing-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.product-edit-pricing-route > div {
  display: grid;
  gap: 3px;
}

.product-import-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.product-import-price-confirm {
  margin: 4px 0;
}

@media (max-width: 1100px) {
  .actual-prices-workspace {
    grid-template-columns: minmax(250px, 275px) minmax(0, 1fr);
  }

  .actual-price-row {
    grid-template-columns: minmax(100px, 0.75fr) minmax(94px, 0.62fr) minmax(118px, 0.9fr);
  }

  .actual-price-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-items: start;
    text-align: left;
  }

  .actual-price-row.is-readonly-price {
    grid-template-columns: minmax(100px, 0.75fr) minmax(94px, 0.62fr) minmax(150px, 1.2fr);
  }
}

@media (max-width: 820px) {
  body.actual-prices-mobile-detail-mode .topbar {
    display: none;
  }

  .actual-prices-focus-workspace .pricing-workspace-head {
    display: none;
  }

  .actual-prices-mobile-detail-focus > .product-workspace-tabs,
  .actual-prices-mobile-detail-focus > .pricing-tabs {
    display: none;
  }

  .actual-prices-workspace {
    grid-template-columns: 1fr;
  }

  .actual-prices-products {
    position: static;
    grid-template-rows: auto auto minmax(240px, 52vh);
  }

  .actual-prices-workspace.has-selection.show-price-detail .actual-prices-products {
    display: none;
  }

  .actual-prices-workspace.has-selection.show-product-list .actual-prices-detail {
    display: none;
  }

  .actual-prices-mobile-back {
    display: inline-flex;
  }

  .actual-prices-detail-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .actual-prices-mobile-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 40px;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .actual-prices-mobile-toolbar > strong {
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .actual-prices-mobile-toolbar .icon-button {
    height: 40px;
    width: 40px;
  }

  .actual-prices-product-title {
    width: 100%;
  }

  .actual-prices-head-meta {
    display: none;
  }

  .product-import-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .actual-prices-detail {
    padding: 0 14px 14px;
  }

  .actual-price-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    min-height: 0;
    padding: 16px 0;
  }

  .actual-price-value {
    text-align: right;
  }

  .actual-price-state,
  .actual-price-actions {
    grid-column: 1 / -1;
  }

  .actual-price-state {
    grid-row: 2;
  }

  .actual-price-actions {
    grid-row: 3;
    justify-items: start;
    padding-left: 0;
    text-align: left;
  }

  .actual-price-secondary-action {
    max-width: none;
    text-align: left;
  }

  .actual-price-action-note {
    max-width: none;
  }

  .actual-price-row.is-readonly-price {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
    min-height: 0;
    padding: 11px 0;
  }

  .actual-price-row.is-readonly-price .actual-price-state {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .actual-price-row.is-readonly-price .actual-price-mode {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .product-edit-pricing-route {
    align-items: flex-start;
    flex-direction: column;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, sans-serif;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

body.erp-is-busy,
body.erp-is-busy * {
  cursor: progress !important;
}

.erp-global-busy {
  position: fixed;
  left: calc(var(--busy-x, 32px) + 16px);
  top: calc(var(--busy-y, 32px) + 16px);
  z-index: 100000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  max-width: min(240px, calc(100vw - 28px));
  padding: 7px 11px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(0.96);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: nowrap;
}

body.erp-is-busy .erp-global-busy {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.auth-required {
  background: #ffffff;
  display: block;
}

.erp-global-busy__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #bfdbfe;
  border-top-color: #0b5cff;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: erp-global-busy-spin 650ms linear infinite;
}

.erp-global-busy__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes erp-global-busy-spin {
  to {
    transform: rotate(360deg);
  }
}

.sidebar {
  background: linear-gradient(180deg, #081426 0%, #0b1728 54%, #071120 100%);
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.10);
  color: #e5edf7;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 12px 14px;
  position: sticky;
  top: 0;
}

.sidebar-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 18px;
  min-width: 0;
}

.brand {
  align-items: center;
  display: flex;
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
  gap: 9px;
  letter-spacing: 0;
  min-width: 0;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(11, 92, 255, 0.26);
  flex: 0 0 auto;
}

nav {
  display: grid;
  gap: 8px;
}

nav button,
.primary,
.ghost {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  min-height: 38px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

nav button {
  text-align: left;
  padding: 9px 12px;
}

nav button.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.main-nav {
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 0 8px;
  scrollbar-color: rgba(148, 163, 184, 0.34) transparent;
  scrollbar-width: thin;
}

.main-nav button {
  min-height: 34px;
}

.main-nav button[hidden] {
  display: none !important;
}

.main-nav .nav-home,
.nav-subitems button {
  align-items: center;
  background: transparent;
  border-color: transparent;
  color: #d8e3f1;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 9px;
  line-height: 1.2;
  min-width: 0;
  padding: 8px 10px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.main-nav .nav-home {
  font-weight: 850;
}

.nav-group {
  border-top: 1px solid rgba(148, 163, 184, 0.13);
  padding-top: 10px;
}

.nav-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.nav-group-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #a7b4c8;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 850;
  gap: 8px;
  justify-content: space-between;
  letter-spacing: 0;
  min-width: 0;
  padding: 6px 7px 5px;
  text-align: left;
  text-transform: uppercase;
  width: 100%;
}

.nav-group-toggle::after {
  color: #7f8da3;
  content: "▾";
  font-size: 12px;
  margin-left: auto;
  transition: transform 0.16s ease;
}

.nav-group-toggle[aria-expanded="false"]::after {
  transform: rotate(-90deg);
}

.nav-group.has-active .nav-group-toggle {
  color: #ffffff;
}

.nav-group-toggle:focus-visible,
.sidebar-toggle:focus-visible,
.sidebar-drawer-toggle:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.28);
  outline-offset: 2px;
}

.nav-subitems {
  display: grid;
  gap: 5px;
  margin-top: 5px;
}

.nav-subitems button {
  padding: 8px 10px;
}

.nav-subitems button::before {
  content: none;
}

.main-nav button.active {
  background: linear-gradient(135deg, #1557ff 0%, #0b5cff 100%);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 12px 28px rgba(11, 92, 255, 0.34);
  color: #ffffff;
  font-weight: 850;
}

.main-nav .nav-home:hover,
.nav-subitems button:hover,
.nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(148, 163, 184, 0.20);
  color: #ffffff;
}

.main-nav .nav-icon {
  align-items: center;
  color: currentColor;
  display: inline-flex;
  flex: 0 0 18px;
  justify-content: center;
  line-height: 0;
  opacity: 0.92;
}

.main-nav .nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-subitems button.active::after {
  color: rgba(255, 255, 255, 0.86);
  content: "›";
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  margin-left: auto;
}

.sidebar-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  color: #dbeafe;
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 30px;
}

.sidebar-toggle:hover {
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(96, 165, 250, 0.45);
  color: #ffffff;
}

.sidebar-user-dock {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  margin-top: 12px;
  padding: 14px 2px 2px;
  position: relative;
}

.sidebar-user-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.sidebar-user-trigger:hover,
.sidebar-user-trigger[aria-expanded="true"] {
  background: rgba(148, 163, 184, 0.12);
}

.sidebar-user-avatar {
  align-items: center;
  background: rgba(148, 163, 184, 0.24);
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.sidebar-user-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sidebar-user-meta strong,
.sidebar-user-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-meta strong {
  color: #ffffff;
  font-size: 12px;
}

.sidebar-user-meta small {
  color: #94a3b8;
  font-size: 11px;
}

.sidebar-user-chevron {
  color: #94a3b8;
  font-size: 14px;
  justify-self: end;
}

.sidebar-user-menu {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  bottom: 78px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.26);
  color: var(--ink);
  display: grid;
  gap: 10px;
  left: 14px;
  min-width: 238px;
  padding: 12px;
  position: fixed;
  width: 212px;
  z-index: 1000;
}

.sidebar-user-menu[hidden] {
  display: none;
}

.sidebar-user-menu-head,
.sidebar-user-menu-field {
  display: grid;
  gap: 3px;
}

.sidebar-user-menu-head strong,
.sidebar-user-menu-field strong {
  color: #101828;
  font-size: 13px;
}

.sidebar-user-menu-head span,
.sidebar-user-menu-field span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-user-menu-field select {
  margin-top: 2px;
}

.sidebar-user-menu-action {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  font-weight: 800;
  padding: 9px 10px;
  text-align: left;
}

.sidebar-user-menu-action:hover {
  background: #fff4f4;
  border-color: #fecaca;
  color: #b42318;
}

.settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.settings-tile {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  text-align: left;
}

.settings-tile strong {
  color: #111827;
  font-size: 16px;
}

.settings-tile span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.settings-tile:hover {
  border-color: #8b5cf6;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
}

.cancellation-reason-settings {
  border-bottom: 1px solid #dbe3ef;
  border-top: 1px solid #dbe3ef;
  display: grid;
  gap: 14px;
  margin: 16px 0;
  padding: 16px 0;
}

.cancellation-reason-settings-head {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
}

.cancellation-reason-settings-head h3,
.cancellation-reason-settings-head p {
  margin: 4px 0 0;
}

.cancellation-reason-settings-head p {
  color: #64748b;
  font-size: 13px;
}

.cancellation-reason-create {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.cancellation-reason-list {
  display: grid;
  gap: 8px;
}

.cancellation-reason-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  padding: 8px;
}

.cancellation-reason-row.is-inactive {
  background: #f3f4f6;
  opacity: 0.78;
}

@media (max-width: 760px) {
  .cancellation-reason-settings-head,
  .cancellation-reason-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .cancellation-reason-create {
    grid-template-columns: 1fr auto;
  }
}

.period-lock-panel {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  margin: 16px 0;
  padding: 16px;
}

.period-lock-header,
.period-lock-body,
.period-lock-actions {
  display: flex;
  gap: 14px;
}

.period-lock-header {
  align-items: flex-start;
  justify-content: space-between;
}

.period-lock-header h3 {
  margin: 0 0 4px;
}

.period-lock-header p,
.period-lock-summary span,
.period-lock-summary small {
  color: #64748b;
}

.period-lock-body {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.1fr);
  margin-top: 14px;
}

.period-lock-summary,
.period-lock-form {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.period-lock-form label {
  display: grid;
  gap: 6px;
}

.period-lock-form input,
.period-lock-form textarea {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  font: inherit;
  padding: 10px 12px;
}

.period-lock-actions {
  flex-wrap: wrap;
}

.accounting-health-panel {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  margin: 16px 0;
  padding: 16px;
}

.accounting-health-header {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.accounting-health-header h3 {
  margin: 0 0 4px;
}

.accounting-health-header p,
.accounting-health-empty span,
.accounting-health-item span,
.accounting-health-item small {
  color: #64748b;
}

.accounting-health-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.accounting-health-summary div,
.accounting-health-empty,
.accounting-health-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.accounting-health-summary div {
  display: grid;
  gap: 4px;
}

.accounting-health-summary span {
  color: #64748b;
  font-size: 12px;
}

.accounting-health-summary strong {
  color: #111827;
  font-size: 22px;
}

.accounting-health-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.accounting-health-item {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.35fr);
}

.accounting-health-item > div {
  display: grid;
  gap: 4px;
}

.accounting-health-item > div:last-child {
  text-align: right;
}

.accounting-health-item > div:last-child strong {
  color: #15803d;
}

.accounting-health-empty {
  display: grid;
  gap: 4px;
}

.fiscal-toolbar,
.fiscal-bulk-bar {
  align-items: end;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
}

.fiscal-toolbar label {
  color: #64748b;
  display: grid;
  font-size: 12px;
  gap: 5px;
}

.fiscal-toolbar input,
.fiscal-toolbar select {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
}

.fiscal-search-field {
  flex: 1 1 260px;
}

.fiscal-archive-note {
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  color: #475569;
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 12px 14px;
}

.fiscal-archive-note strong {
  color: #0f172a;
}

.fiscal-filter-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 10px 12px;
}

.fiscal-filter-group > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.fiscal-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fiscal-filter-button {
  align-items: center;
  background: #f8fafc;
  border-color: #dbe3ef;
  color: #334155;
  display: inline-flex;
  gap: 8px;
  font-weight: 700;
  padding: 0 12px;
}

.fiscal-filter-button.active {
  background: #2563eb;
  border-color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  color: #fff;
}

.fiscal-filter-button.active::before {
  content: "✓ ";
  font-weight: 900;
}

.fiscal-filter-count {
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  color: #0f172a;
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  min-width: 24px;
  padding: 2px 7px;
}

.fiscal-filter-button.active .fiscal-filter-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.cod-fiscal-profile-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.4fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.cod-fiscal-profile-card.ready {
  border-color: rgba(16, 185, 129, 0.32);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.86), #fff 54%);
}

.cod-fiscal-profile-card.attention {
  border-color: rgba(245, 158, 11, 0.32);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.86), #fff 54%);
}

.cod-fiscal-profile-card h4 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.05rem;
}

.cod-fiscal-profile-card p,
.cod-fiscal-profile-card small {
  display: block;
  margin: 0;
  color: var(--muted);
}

.cod-fiscal-profile-card p {
  color: var(--ink);
  font-weight: 800;
}

.cod-fiscal-profile-form {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(130px, 0.7fr) minmax(170px, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.cod-fiscal-profile-form .check-line {
  min-height: 44px;
  align-items: center;
}

.cod-fiscal-profile-warning {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cod-fiscal-profile-warning span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .cod-fiscal-profile-card,
  .cod-fiscal-profile-form {
    grid-template-columns: 1fr;
  }
}

.fiscal-bulk-bar {
  align-items: center;
  justify-content: space-between;
}

.fiscal-bulk-bar .check-row {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-right: auto;
}

.fiscal-receipt-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: auto;
}

.fiscal-receipt-table {
  margin: 0;
  min-width: 920px;
}

.fiscal-receipt-table td,
.fiscal-receipt-table th {
  vertical-align: middle;
}

.fiscal-receipt-table td strong,
.fiscal-receipt-table td small {
  display: block;
}

.fiscal-receipt-table .table-actions {
  text-align: right;
  white-space: nowrap;
}

.fiscal-document-cell strong {
  white-space: nowrap;
}

.fiscal-document-cell small {
  color: #64748b;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiscal-date-cell {
  min-width: 150px;
}

.fiscal-date-cell span {
  align-items: center;
  color: #475569;
  display: grid;
  font-size: 12px;
  gap: 6px;
  grid-template-columns: 36px minmax(0, 1fr);
  line-height: 1.25;
  white-space: nowrap;
}

.fiscal-date-cell b {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.fiscal-duplicate-info {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  margin-top: 5px;
  padding: 5px 7px;
}

.danger-text {
  color: #dc2626;
}

.module-workspace-intro {
  margin-bottom: 14px;
}

.module-workspace-intro h2 {
  margin: 4px 0 6px;
}

.module-workspace-intro p {
  color: var(--muted);
  margin: 0;
}

.customer-segment-hero,
.customer-history-hero {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.customer-segment-summary,
.customer-history-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  min-width: min(460px, 100%);
}

.customer-history-summary {
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  min-width: min(520px, 100%);
}

.customer-segment-summary > div,
.customer-history-summary > div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 9px 11px;
}

.customer-segment-summary span,
.customer-history-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.customer-segment-summary strong,
.customer-history-summary strong {
  font-size: 20px;
  line-height: 1;
}

.customer-segment-topline {
  align-items: center;
  padding: 16px 18px;
}

.customer-segment-board {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

.customer-segment-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.customer-segment-column .panel-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.customer-segment-column .panel-head p {
  color: var(--muted);
  margin: 3px 0 0;
}

.customer-segment-rows {
  display: grid;
  gap: 8px;
}

.customer-segment-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  min-height: 66px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
}

.customer-segment-row:hover {
  background: #f8fafc;
  border-color: #bfdbfe;
}

.customer-segment-dot {
  background: #cbd5e1;
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.customer-segment-row.neutral .customer-segment-dot {
  background: #cbd5e1;
}

.customer-segment-row.green .customer-segment-dot {
  background: #16a34a;
}

.customer-segment-row.amber .customer-segment-dot {
  background: #f59e0b;
}

.customer-segment-row.red .customer-segment-dot {
  background: #dc2626;
}

.customer-segment-row.violet .customer-segment-dot {
  background: #7c3aed;
}

.customer-segment-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-segment-row-main strong,
.customer-segment-row-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-segment-row-main strong {
  font-size: 15px;
}

.customer-segment-row-main small {
  color: var(--muted);
  font-size: 12px;
}

.customer-segment-count {
  align-items: center;
  background: #f1f5f9;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  justify-content: center;
  min-width: 34px;
  padding: 6px 10px;
}

.customer-segment-row.neutral .customer-segment-count {
  background: #f1f5f9;
  color: #475569;
}

.customer-segment-row.red .customer-segment-count {
  background: #fee2e2;
  color: #b91c1c;
}

.customer-segment-row.green .customer-segment-count {
  background: #dcfce7;
  color: #15803d;
}

.customer-segment-row.amber .customer-segment-count {
  background: #fef3c7;
  color: #b45309;
}

.customer-segment-row.violet .customer-segment-count {
  background: #ede9fe;
  color: #6d28d9;
}

.customer-segment-action {
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.customer-segment-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.customer-segment-card {
  min-width: 0;
}

.customer-segment-card-main {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  min-height: 154px;
  min-width: 0;
  padding: 16px;
  text-align: left;
}

.customer-segment-card-main:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.customer-segment-card-main h2 {
  font-size: 17px;
  line-height: 1.2;
  margin: 0 0 6px;
}

.customer-segment-card-main p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.customer-segment-card-main strong {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  display: inline-flex;
  font-size: 20px;
  height: 42px;
  justify-content: center;
  justify-self: start;
  min-width: 42px;
  padding: 0 12px;
}

.customer-segment-card-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-segment-card.red .customer-segment-card-main strong {
  background: #fee2e2;
  color: #b91c1c;
}

.customer-segment-card.green .customer-segment-card-main strong {
  background: #dcfce7;
  color: #15803d;
}

.customer-segment-card.amber .customer-segment-card-main strong {
  background: #fef3c7;
  color: #b45309;
}

.customer-segment-section {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.business-segment-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-segment-card.violet .customer-segment-card-main strong {
  background: #ede9fe;
  color: #6d28d9;
}

.customer-history-workspace {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  margin-bottom: 14px;
}

.crm-history-workspace {
  align-items: start;
}

.crm-entry-panel,
.crm-log-panel {
  min-width: 0;
}

.crm-entry-panel {
  position: sticky;
  top: 12px;
}

.crm-entry-panel .panel-head,
.crm-log-panel .panel-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.crm-interaction-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-interaction-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.crm-interaction-form input,
.crm-interaction-form select,
.crm-interaction-form textarea {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  min-height: 36px;
  padding: 7px 9px;
}

.crm-interaction-form .span-2 {
  grid-column: 1 / -1;
}

.crm-interaction-form button[type="submit"] {
  justify-self: start;
  min-width: 160px;
}

.crm-customer-picker {
  grid-column: 1 / -1;
  min-width: 0;
}

.crm-customer-picker-control {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.crm-customer-picker-control .icon-button {
  min-height: 36px;
  min-width: 36px;
  padding: 6px;
}

.crm-customer-picked {
  color: #166534;
  font-size: 12px;
  font-weight: 800;
}

.crm-customer-results {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  display: grid;
  max-height: 280px;
  overflow-y: auto;
  padding: 5px;
}

.crm-customer-results button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 2px;
  min-width: 0;
  padding: 8px 9px;
  text-align: left;
}

.crm-customer-results button:hover,
.crm-customer-results button:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.crm-customer-results button strong,
.crm-customer-results button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-customer-results button span,
.crm-customer-empty {
  color: var(--muted);
  font-size: 12px;
}

.crm-log-list {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding-right: 2px;
}

.crm-log-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.crm-log-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.crm-log-filters button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  gap: 8px;
  min-height: 34px;
  padding: 6px 12px;
}

.crm-log-filters button.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.crm-log-filters span {
  background: #eef2ff;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  min-width: 22px;
  padding: 2px 6px;
  text-align: center;
}

.crm-date-filters {
  align-items: end;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(130px, 1fr)) auto auto;
  padding: 10px;
}

.crm-date-filters label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
}

.crm-date-filters input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  min-height: 36px;
  padding: 7px 9px;
}

.crm-date-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-date-filters > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  justify-self: end;
  white-space: nowrap;
}

.crm-extra-filters {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.35fr);
}

.crm-extra-filters label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
}

.crm-extra-filters input,
.crm-extra-filters select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  min-height: 36px;
  padding: 7px 9px;
}

.crm-log-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-areas:
    "kind customer due actions"
    "main main main main";
  grid-template-columns: minmax(108px, 0.32fr) minmax(0, 1fr) minmax(140px, 0.42fr) minmax(96px, auto);
  min-width: 0;
  padding: 10px 12px;
}

.crm-log-item.done {
  background: #fbfefc;
}

.crm-log-item.overdue {
  background: #fff7ed;
  border-color: #fed7aa;
}

.crm-log-kind,
.crm-log-main,
.crm-log-customer,
.crm-log-due,
.crm-log-actions {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.crm-log-kind {
  grid-area: kind;
}

.crm-log-main {
  grid-area: main;
}

.crm-log-customer {
  grid-area: customer;
}

.crm-log-due {
  grid-area: due;
}

.crm-log-actions {
  grid-area: actions;
}

.crm-log-kind .status {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
}

.crm-log-kind small,
.crm-log-main small,
.crm-log-customer small,
.crm-log-due,
.crm-log-actions,
.crm-log-item em {
  color: var(--muted);
  font-size: 12px;
}

.crm-log-main strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.crm-log-main p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.crm-log-customer .link-button {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-log-due strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.crm-log-due.overdue strong {
  color: #b45309;
}

.crm-log-actions {
  justify-items: end;
  text-align: right;
}

.crm-log-actions .ghost.small {
  min-height: 30px;
}

.crm-log-empty {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  padding: 18px;
}

.crm-log-empty strong {
  color: var(--ink);
}

.customer-feed-panel {
  display: grid;
  gap: 10px;
}

.customer-feed-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  max-height: 520px;
  overflow-y: auto;
}

.customer-feed-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 150px 96px minmax(180px, 0.7fr) minmax(0, 1fr);
  min-width: 0;
  padding: 9px 11px;
}

.customer-feed-row + .customer-feed-row {
  border-top: 1px solid var(--line);
}

.customer-feed-time,
.customer-feed-detail {
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.customer-feed-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-feed-kind {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  justify-self: start;
  padding: 4px 8px;
  white-space: nowrap;
}

.customer-feed-kind.order {
  background: #ecfdf5;
  color: #166534;
}

.customer-feed-kind.crm {
  background: #fff7ed;
  color: #9a3412;
}

.crm-delete-action {
  align-items: flex-start;
  display: inline-grid;
  gap: 2px;
}

.crm-delete-action small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.link-button.success {
  color: #15803d;
  font-weight: 800;
}

.ghost.small.success {
  border-color: #bbf7d0;
  color: #15803d;
  font-weight: 800;
}

.roles-matrix-panel {
  overflow-x: auto;
}

.roles-matrix-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.roles-matrix-actions h2,
.roles-matrix-actions p {
  margin: 0;
}

.roles-matrix-actions p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.roles-matrix-actions > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.roles-matrix th,
.roles-matrix td {
  text-align: center;
}

.roles-matrix th:first-child,
.roles-matrix td:first-child {
  min-width: 220px;
  text-align: left;
}

.roles-matrix td:first-child small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.role-permission,
.role-permission-toggle span {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-width: 44px;
  padding: 4px 9px;
}

.role-permission-toggle {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
}

.role-permission-toggle input {
  inline-size: 1px;
  opacity: 0;
  position: absolute;
}

.role-permission-toggle span {
  background: #f1f5f9;
  color: #64748b;
}

.role-permission-toggle input:checked + span {
  background: #dcfce7;
  color: #15803d;
}

.role-permission-toggle.is-locked {
  cursor: not-allowed;
  opacity: 0.72;
}

.role-permission.enabled {
  background: #dcfce7;
  color: #15803d;
}

.role-permission.disabled {
  background: #f1f5f9;
  color: #64748b;
}

.receipt-workspace-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  margin-bottom: 14px;
}

.receipt-workspace-kpis .toolbar-stat {
  min-height: 74px;
}

.receipt-workspace-kpis .toolbar-stat.attention {
  border-color: #f59e0b;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.purchase-receipt-workspace,
.stock-reservation-workspace {
  display: grid;
  gap: 14px;
}

.reservation-workspace-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

.reservation-orders-table td,
.reservation-products-table td,
.purchase-receipt-journal td {
  vertical-align: top;
}

.shell {
  background: #ffffff;
  min-width: 0;
  overflow-x: hidden;
  padding: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.topbar-title {
  align-items: flex-start;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sidebar-drawer-toggle {
  display: none;
}

body.auth-required .shell {
  background: #ffffff;
  min-height: 100vh;
  padding: 0;
}

body.auth-required .sidebar,
body.auth-required .topbar {
  display: none !important;
}

body.auth-required #view {
  min-height: 100vh;
}

.auth-required-panel {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  min-height: 260px;
}

.auth-required-panel h2 {
  font-size: 28px;
  margin: 12px 0 8px;
}

.auth-required-panel p {
  max-width: 620px;
}

.auth-required-mark {
  align-items: center;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  border-radius: 14px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  letter-spacing: 0;
  width: 52px;
}

.auth-required-logo {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  display: block;
  height: 72px;
  object-fit: cover;
  padding: 4px;
  width: 72px;
}

.auth-required-help {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.auth-required-help span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

body[data-current-view="orders"],
body[data-current-view="order"] {
  background: #ffffff;
}

body[data-current-view="orders"] .sidebar,
body[data-current-view="order"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="orders"] nav button.active,
body[data-current-view="order"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="orders"] .shell,
body[data-current-view="order"] .shell {
  background: #ffffff;
  padding: 16px;
}

body[data-current-view="orders"] .topbar {
  display: none;
}

body[data-current-view="onlineOrders"],
body[data-current-view="offlineOrders"] {
  background: #ffffff;
}

body[data-current-view="onlineOrders"] .sidebar,
body[data-current-view="offlineOrders"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="onlineOrders"] nav button.active,
body[data-current-view="offlineOrders"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="onlineOrders"] .shell,
body[data-current-view="offlineOrders"] .shell {
  padding: 16px;
}

body[data-current-view="onlineOrders"] .topbar,
body[data-current-view="offlineOrders"] .topbar {
  display: none;
}

.order-channel-workspace {
  border-left: 4px solid #4f46e5;
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.order-channel-workspace.offline {
  border-left-color: #198754;
}

.order-channel-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.order-channel-head h3 {
  margin: 3px 0 5px;
}

.order-channel-head p {
  color: var(--muted);
  margin: 0;
}

.order-channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.order-channel-flow,
.order-channel-stats {
  display: grid;
  gap: 10px;
}

.order-channel-flow {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.order-channel-flow span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  display: flex;
  font-weight: 800;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
}

.order-channel-flow strong {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  min-width: 24px;
}

.order-channel-workspace.offline .order-channel-flow strong {
  background: #dcfce7;
  color: #15803d;
}

.order-channel-stats {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

body[data-current-view="analytics"] {
  background: #ffffff;
  overflow-x: hidden;
}

body[data-current-view="analytics"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="analytics"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="analytics"] .shell {
  padding: 16px;
}

body[data-current-view="analytics"] .topbar {
  display: none;
}

body[data-current-view="dashboard"] {
  background: #ffffff;
  overflow-x: hidden;
}

body[data-current-view="dashboard"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="dashboard"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="dashboard"] .shell {
  padding: 16px;
}

body[data-current-view="dashboard"] .topbar {
  display: none;
}

body[data-current-view="cash"] {
  background: #ffffff;
  overflow-x: hidden;
}

body[data-current-view="cash"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="cash"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="cash"] .shell {
  padding: 16px;
}

body[data-current-view="cash"] .topbar {
  display: none;
}

body[data-current-view="siteRequests"] {
  background: #ffffff;
  overflow-x: hidden;
}

body[data-current-view="siteRequests"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="siteRequests"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="siteRequests"] .shell {
  padding: 16px;
}

body[data-current-view="siteRequests"] .topbar {
  display: none;
}

body[data-current-view="products"] {
  background: #ffffff;
  overflow-x: hidden;
}

body[data-current-view="products"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="products"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="products"] .shell {
  padding: 16px;
}

body[data-current-view="products"] .topbar {
  display: none;
}

body[data-current-view="catalog"],
body[data-current-view="priceList"],
body[data-current-view="stockBalances"],
body[data-current-view="stockReservations"],
body[data-current-view="stockReceipts"],
body[data-current-view="stockTransfers"],
body[data-current-view="stockInventory"],
body[data-current-view="stockWriteOffs"] {
  background: #ffffff;
  overflow-x: hidden;
}

body[data-current-view="catalog"] .sidebar,
body[data-current-view="priceList"] .sidebar,
body[data-current-view="stockBalances"] .sidebar,
body[data-current-view="stockReservations"] .sidebar,
body[data-current-view="stockReceipts"] .sidebar,
body[data-current-view="stockTransfers"] .sidebar,
body[data-current-view="stockInventory"] .sidebar,
body[data-current-view="stockWriteOffs"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="catalog"] nav button.active,
body[data-current-view="priceList"] nav button.active,
body[data-current-view="stockBalances"] nav button.active,
body[data-current-view="stockReservations"] nav button.active,
body[data-current-view="stockReceipts"] nav button.active,
body[data-current-view="stockTransfers"] nav button.active,
body[data-current-view="stockInventory"] nav button.active,
body[data-current-view="stockWriteOffs"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="catalog"] .shell,
body[data-current-view="priceList"] .shell,
body[data-current-view="stockBalances"] .shell,
body[data-current-view="stockControl"] .shell,
body[data-current-view="warehouseDocuments"] .shell,
body[data-current-view="stockReservations"] .shell,
body[data-current-view="stockReceipts"] .shell,
body[data-current-view="stockTransfers"] .shell,
body[data-current-view="stockInventory"] .shell,
body[data-current-view="stockWriteOffs"] .shell {
  background: #ffffff;
  padding: 16px;
}

body[data-current-view="catalog"] .topbar,
body[data-current-view="priceList"] .topbar,
body[data-current-view="stockBalances"] .topbar,
body[data-current-view="stockControl"] .topbar,
body[data-current-view="warehouseDocuments"] .topbar,
body[data-current-view="stockReservations"] .topbar,
body[data-current-view="stockReceipts"] .topbar,
body[data-current-view="stockTransfers"] .topbar,
body[data-current-view="stockInventory"] .topbar,
body[data-current-view="stockWriteOffs"] .topbar {
  display: none;
}

body[data-current-view="warehouseOrders"] {
  background: #ffffff;
  overflow-x: hidden;
}

body[data-current-view="warehouseOrders"] .sidebar {
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
}

body[data-current-view="warehouseOrders"] nav button.active {
  background: #eef2ff;
  border-color: #d8d2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
  color: #3730a3;
  font-weight: 800;
}

body[data-current-view="warehouseOrders"] .shell {
  padding: 16px;
}

body[data-current-view="warehouseOrders"] .topbar {
  display: none;
}

.topbar-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  max-width: min(900px, 100%);
}

.role-selector {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  min-width: 160px;
}

.role-selector select,
.role-selector input {
  margin-top: 4px;
}

.auth-login {
  min-width: 120px;
}

.auth-login input {
  max-width: 120px;
}

.auth-login-status {
  color: #475467;
  flex-basis: 100%;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  min-height: 16px;
  text-align: right;
}

.auth-login-status.danger {
  color: #b42318;
}

#login-button {
  min-width: 86px;
  position: relative;
}

#login-button.is-loading {
  color: #475467;
  padding-left: 32px;
}

#login-button.is-loading::before {
  animation: login-spin 0.8s linear infinite;
  border: 2px solid rgba(71, 84, 103, 0.24);
  border-top-color: #2563eb;
  border-radius: 999px;
  content: "";
  height: 14px;
  left: 12px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
}

@keyframes login-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.login-page {
  background: #ffffff;
  color: #0f172a;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: 48px 72px 40px;
  position: relative;
}

.login-hero {
  align-items: center;
  display: flex;
  gap: 28px;
}

.login-hero-logo {
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(29, 78, 216, 0.2);
  height: 120px;
  object-fit: cover;
  width: 120px;
}

.login-hero h1 {
  color: #0b1530;
  font-size: 38px;
  font-weight: 900;
  margin: 0 0 10px;
}

.login-hero p {
  color: #526078;
  font-size: 20px;
  font-weight: 500;
  margin: 0;
}

.login-layout {
  align-items: center;
  display: grid;
  gap: 72px;
  grid-template-columns: minmax(420px, 720px) minmax(320px, 410px);
  justify-content: center;
  margin-top: 36px;
}

.login-card {
  background: #ffffff;
  border: 1px solid #d8e0ee;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 24px;
  padding: 46px;
}

.login-card-head {
  margin-bottom: 6px;
  text-align: center;
}

.login-card-head h2 {
  color: #0b1530;
  font-size: 34px;
  font-weight: 900;
  margin: 0 0 12px;
}

.login-card-head p {
  color: #526078;
  font-size: 19px;
  margin: 0;
}

.login-field {
  color: #0f172a;
  display: grid;
  font-size: 18px;
  font-weight: 700;
  gap: 12px;
  position: relative;
}

.login-input-wrap {
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  min-height: 56px;
  padding: 0 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-field.has-error .login-input-wrap {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.04);
}

.login-input-wrap .order-action-icon {
  color: #1261f5;
  flex: 0 0 auto;
  height: 24px;
  width: 24px;
}

.login-input-wrap input {
  background: transparent;
  border: 0;
  color: #0f172a;
  flex: 1 1 auto;
  font-size: 22px;
  font-weight: 500;
  height: 54px;
  min-width: 0;
  outline: 0;
  padding: 0;
}

.login-input-wrap input::placeholder {
  color: #94a3b8;
}

.login-password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  padding: 4px;
}

.login-password-toggle .order-action-icon {
  color: currentColor;
  height: 22px;
  width: 22px;
}

.login-field-error {
  align-items: center;
  background: #fff7f7;
  border: 1px solid #ef4444;
  border-radius: 6px;
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.12);
  color: #1f2937;
  display: inline-flex;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  gap: 12px;
  justify-self: start;
  line-height: 1;
  margin-left: 22px;
  margin-top: -8px;
  padding: 16px 18px;
  position: relative;
}

.login-field-error::before {
  background: #fff7f7;
  border-left: 1px solid #ef4444;
  border-top: 1px solid #ef4444;
  content: "";
  height: 12px;
  left: 50%;
  position: absolute;
  top: -7px;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
}

.login-field-error::after {
  align-items: center;
  background: #ef4444;
  border-radius: 999px;
  color: #ffffff;
  content: "!";
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  order: -1;
  width: 22px;
}

.login-submit {
  align-items: center;
  background: #1261f5;
  border: 0;
  border-radius: 7px;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.16);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  font-weight: 800;
  gap: 16px;
  height: 58px;
  justify-content: center;
  margin-top: 2px;
  width: 100%;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.92;
}

.login-spinner {
  animation: login-spinner-center 0.85s linear infinite;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 999px;
  display: inline-block;
  height: 22px;
  width: 22px;
}

@keyframes login-spinner-center {
  to {
    transform: rotate(360deg);
  }
}

.login-progress {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: 17px;
  gap: 12px;
  justify-content: center;
  margin-top: -4px;
}

.login-progress span {
  background: #2563eb;
  border-radius: 999px;
  height: 12px;
  width: 12px;
}

.login-divider {
  background: #d8e0ee;
  height: 1px;
  margin-top: 4px;
}

.login-access-note {
  align-items: center;
  color: #526078;
  display: flex;
  font-size: 17px;
  gap: 14px;
  justify-content: center;
  margin: 0;
}

.login-access-note .order-action-icon {
  color: #64748b;
  height: 28px;
  width: 28px;
}

.login-access-note strong {
  color: #1261f5;
}

.login-status-card {
  align-self: center;
  background: #ffffff;
  border: 1px solid #d8e0ee;
  border-radius: 12px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.login-status-item {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 22px 24px;
}

.login-status-item .order-action-icon {
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.login-status-item .order-action-icon svg {
  height: 24px;
  width: 24px;
}

.login-status-item.ready .order-action-icon {
  background: #16a34a;
}

.login-status-item.sync .order-action-icon {
  background: #2563eb;
}

.login-status-item strong {
  color: #0f172a;
  display: block;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 6px;
}

.login-status-item span {
  color: #526078;
  font-size: 16px;
  line-height: 1.35;
}

.login-status-card footer {
  border-top: 1px solid #d8e0ee;
  color: #526078;
  font-size: 16px;
  padding: 20px 24px;
}

.login-toast {
  align-items: center;
  background: #fffafa;
  border: 1px solid #f4a2a2;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(127, 29, 29, 0.12);
  display: grid;
  gap: 20px;
  grid-template-columns: 48px minmax(0, 1fr) 32px;
  min-height: 102px;
  padding: 22px;
  position: absolute;
  right: 28px;
  top: 38px;
  width: min(520px, calc(100vw - 56px));
  z-index: 30;
}

.login-toast-icon .order-action-icon,
.login-toast > .order-action-icon {
  color: #ef4444;
}

.login-toast .login-toast-icon .order-action-icon {
  height: 44px;
  width: 44px;
}

.login-toast strong {
  color: #dc2626;
  display: block;
  font-size: 21px;
  font-weight: 900;
  margin-bottom: 8px;
}

.login-toast span {
  color: #334155;
  font-size: 17px;
  line-height: 1.35;
}

.login-toast button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  padding: 0;
}

.login-toast button .order-action-icon {
  color: currentColor;
  height: 24px;
  width: 24px;
}

.login-footer {
  align-self: end;
  color: #64748b;
  font-size: 16px;
  justify-self: center;
  margin-top: 36px;
}

@media (max-width: 1100px) {
  .login-page {
    padding: 32px 24px;
  }

  .login-layout {
    gap: 24px;
    grid-template-columns: minmax(0, 1fr);
  }

  .login-status-card {
    width: min(720px, 100%);
    justify-self: center;
  }
}

@media (max-width: 680px) {
  .login-hero {
    align-items: flex-start;
    gap: 16px;
  }

  .login-hero-logo {
    height: 76px;
    width: 76px;
  }

  .login-hero h1 {
    font-size: 28px;
  }

  .login-hero p,
  .login-card-head p {
    font-size: 16px;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-card-head h2 {
    font-size: 28px;
  }

  .login-toast {
    left: 16px;
    right: 16px;
    top: 16px;
    width: auto;
  }
}

h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
}

.primary {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: white;
  padding: 0 18px;
  font-weight: 700;
}

.small {
  min-height: 30px;
  padding: 0 10px;
}

.attention-button {
  background: #fff7d6;
  border-color: #e7c665;
  color: #775200;
  font-weight: 700;
}

.danger-button {
  border-color: #f0a8a8;
  color: #b42318;
  font-weight: 700;
}

.danger-button:hover {
  background: #ffe4e4;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-align: left;
}

.link-button:hover {
  text-decoration: underline;
}

.expense-actions-cell {
  min-width: 156px;
  white-space: nowrap;
}

.expense-actions-cell .link-button + .link-button {
  margin-left: 12px;
}

.stacked-link {
  display: grid;
  gap: 2px;
}

.stacked-link span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 140px 160px;
  gap: 12px;
  align-items: end;
}

.order-customer-search,
.order-product-search {
  display: grid;
  gap: 8px;
}

.customer-results,
.product-results {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 278px;
  overflow: auto;
}

.customer-results.is-hidden {
  display: none;
}

.customer-result,
.product-result {
  align-items: center;
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.customer-result:last-child,
.product-result:last-child {
  border-bottom: 0;
}

.customer-result:hover,
.customer-result.active,
.product-result:hover,
.product-result.active {
  background: #eef8f1;
}

.customer-result.active,
.product-result.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.customer-result small,
.customer-result-money small,
.product-result-main {
  min-width: 0;
}

.customer-result span:first-child,
.product-result-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-result-money {
  min-width: 96px;
  text-align: right;
}

.order-create-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.order-create-total {
  display: grid;
  gap: 2px;
  min-width: 160px;
  text-align: right;
}

.order-create-actions {
  align-items: end;
  display: flex;
  gap: 10px;
}

.order-create-total span {
  color: var(--muted);
  font-size: 12px;
}

.order-create-total strong {
  font-size: 24px;
}

.order-create-collapsed {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.order-create-collapsed h2 {
  margin: 2px 0 0;
}

.order-create-collapsed p {
  color: var(--muted);
  margin: 6px 0 0;
}

.order-create-collapsed-actions {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(130px, auto) minmax(150px, auto) auto;
}

.order-sale-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
}

.order-setup-grid {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 0.85fr);
  margin-bottom: 16px;
}

.order-step,
.order-context-card,
.order-draft-card {
  min-width: 0;
}

.order-context-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.order-step-head {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.order-step-head > span {
  align-items: center;
  background: #eef8f1;
  border: 1px solid #b7dfc3;
  border-radius: 999px;
  color: var(--accent-dark);
  display: inline-flex;
  flex: 0 0 28px;
  font-size: 13px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.order-step-head h3 {
  font-size: 16px;
  margin: 0;
}

.order-step-head p {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0 0;
}

.order-step-customer,
.order-step-products {
  display: grid;
  gap: 12px;
}

.customer-mini-card {
  background: #f8faf9;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.customer-mini-card span,
.customer-mini-card small {
  color: var(--muted);
  font-size: 12px;
}

.customer-mini-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-mini-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.draft-business-type-control {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border: 1px solid #fdba74;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.08);
  display: grid;
  gap: 6px;
  padding: 10px;
}

.draft-business-type-control label {
  color: #7c2d12;
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}

.draft-business-type-control select {
  border-color: #fb923c;
  font-weight: 800;
  min-height: 36px;
}

.draft-business-type-control small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.quick-customer-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.quick-customer-details summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 700;
  list-style-position: outside;
}

.quick-customer-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 10px;
}

.order-product-add {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
  align-items: start;
}

.order-product-add-unified {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
}

.order-product-add-catalog {
  grid-template-columns: minmax(210px, 0.34fr) minmax(320px, 1fr) minmax(150px, 0.22fr) minmax(112px, 0.2fr);
}

.order-product-category-panel,
.order-product-search {
  min-width: 0;
}

.order-product-category-panel {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.order-product-category-head,
.order-product-picker-summary {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.order-product-category-head strong {
  font-size: 13px;
}

.order-product-category-tree {
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 228px;
  overflow: auto;
}

.order-product-category-tree button {
  align-items: center;
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 8px;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 8px 6px calc(8px + var(--indent, 0px));
  text-align: left;
  width: 100%;
}

.order-product-category-tree button:last-child {
  border-bottom: 0;
}

.order-product-category-tree button:hover,
.order-product-category-tree button.active {
  background: #eef8f1;
}

.order-product-category-tree button.active {
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--accent-dark);
  font-weight: 800;
}

.order-product-category-tree span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-product-category-tree strong {
  color: var(--muted);
  font-size: 11px;
}

.order-product-category-empty,
.order-product-empty-state {
  color: var(--muted);
  display: grid;
  gap: 4px;
  line-height: 1.35;
  padding: 12px;
}

.order-product-category-empty strong,
.order-product-empty-state strong {
  color: var(--ink);
  font-size: 13px;
}

.order-product-picker-summary {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 8px;
}

.order-product-picker-summary strong {
  color: var(--ink);
}

.price-type-panel {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.order-add-price-type {
  background: transparent;
  border: 0;
  padding: 0;
}

.sales-source-card {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 9px;
  padding: 12px;
}

.sales-source-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sales-source-card small {
  color: var(--accent-dark);
  font-weight: 700;
}

.price-type-panel > span {
  color: var(--muted);
  font-size: 12px;
}

.price-type-panel small {
  color: var(--muted);
  line-height: 1.35;
}

.price-type-switch {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.price-type-switch-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-type-switch button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 34px;
}

.price-type-switch button.active {
  background: #eef8f1;
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.order-add-controls {
  align-content: start;
  display: grid;
  gap: 10px;
}

.order-add-controls button {
  padding: 0 14px;
}

.order-draft-card {
  background: #fbfdfc;
  border: 2px solid var(--accent);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
  box-shadow: 0 16px 34px rgba(25, 135, 84, 0.12);
}

.invoice-head {
  align-items: center;
  background: #f2fbf6;
  border-bottom: 1px solid #b7dfc3;
  border-radius: 6px 6px 0 0;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: -14px -14px 0;
  padding: 14px;
}

.invoice-stage-pill {
  background: #fff7d6;
  border-color: #e2bf52;
  color: #775200;
  font-weight: 800;
}

.invoice-head .order-step-head {
  margin-bottom: 0;
}

.invoice-meta-grid {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-meta-grid .draft-customer-line {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  justify-content: start;
  min-width: 126px;
  padding: 8px 10px;
}

.invoice-meta-grid .draft-customer-line:first-child {
  min-width: 220px;
  max-width: 360px;
}

.invoice-meta-grid .draft-customer-line span {
  font-size: 11px;
  font-weight: 700;
}

.invoice-meta-grid .draft-customer-line strong {
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-add-panel {
  background: var(--panel);
  border: 1px solid #b7dfc3;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.invoice-add-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.invoice-add-head h4 {
  font-size: 15px;
  margin: 0;
}

.invoice-add-head p {
  font-size: 12px;
  margin-top: 3px;
}

.invoice-add-head > strong {
  color: var(--accent-dark);
  white-space: nowrap;
}

.compact-results {
  max-height: 220px;
}

.compact-results .product-result {
  min-height: 52px;
  padding-bottom: 7px;
  padding-top: 7px;
}

.draft-customer-line,
.draft-total {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.draft-customer-line span,
.draft-total span {
  color: var(--muted);
  font-size: 12px;
}

.draft-customer-line strong {
  font-size: 14px;
  text-align: right;
}

.draft-lines {
  overflow: hidden;
}

.draft-lines-workspace {
  background: var(--panel);
  border: 2px solid #26323f;
  border-radius: 8px;
}

.draft-lines-head {
  align-items: center;
  background: #fff7d6;
  border-bottom: 1px solid #e2bf52;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 12px 14px;
}

.draft-lines-head h4 {
  font-size: 16px;
  margin: 2px 0 0;
}

.draft-lines-summary {
  align-items: center;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: auto auto auto auto;
}

.draft-lines-summary span {
  color: #775200;
  font-size: 12px;
  font-weight: 700;
}

.draft-lines-summary strong {
  font-size: 18px;
}

.draft-table-wrap {
  overflow: auto;
}

.draft-table {
  min-width: 1040px;
}

.draft-table th:nth-child(2),
.draft-table th:nth-child(3),
.draft-table th:nth-child(4),
.draft-table th:nth-child(5),
.draft-table th:nth-child(6),
.draft-table td:nth-child(2),
.draft-table td:nth-child(3),
.draft-table td:nth-child(4),
.draft-table td:nth-child(5),
.draft-table td:nth-child(6) {
  width: 140px;
}

.draft-table th:nth-child(2),
.draft-table td:nth-child(2) {
  width: 160px;
}

.draft-table th:nth-child(3),
.draft-table td:nth-child(3) {
  width: 130px;
}

.draft-stock-cell strong,
.draft-stock-cell span {
  display: block;
}

.draft-stock-cell span {
  font-size: 12px;
}

.draft-stock-row-zero td {
  background: #fffaf0;
}

.draft-stock-row-negative td,
.draft-stock-row-missing td {
  background: #fff4f4;
}

.draft-table tbody tr:hover {
  background: #f7faf8;
}

.draft-table th:last-child,
.draft-table td:last-child {
  width: 90px;
  text-align: right;
}

.draft-empty-cell {
  background: #fbfdfc;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.line-price-type {
  display: grid;
  gap: 4px;
  max-width: 150px;
}

.line-price-type-select {
  background: #f8faf9;
  border-color: #b7dfc3;
  font-weight: 700;
  min-height: 34px;
  padding-bottom: 5px;
  padding-top: 5px;
}

.line-price-type-select.is-promo {
  background: #fff7d6;
  border-color: #e2bf52;
  color: #775200;
}

.price-type-note {
  color: #775200;
  font-size: 11px;
  font-weight: 700;
}

.price-input {
  max-width: 130px;
}

.empty-draft {
  color: var(--muted);
  font-size: 12px;
}

.empty-draft {
  margin: 0;
  padding: 18px 0;
}

.draft-total strong {
  font-size: 22px;
}

.draft-total > div {
  display: grid;
  gap: 3px;
}

.draft-total > div:last-child {
  justify-items: end;
}

.draft-total small {
  color: #167255;
  font-size: 12px;
  font-weight: 700;
}

.draft-total em {
  color: #167255;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.draft-footer {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.draft-actions button {
  padding: 0 14px;
}

.product-result-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-result-meta,
.product-result-stock span {
  color: var(--muted);
  font-size: 12px;
}

.product-result-stock {
  min-width: 96px;
  text-align: right;
}

.empty-search {
  margin: 0;
  padding: 12px;
}

.form-head,
.actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 5px;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 38px;
  padding: 7px 9px;
  width: 100%;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

h2 {
  font-size: 18px;
  letter-spacing: 0;
  margin: 0;
}

.order-form {
  margin-bottom: 16px;
}

.order-edit-panel,
.order-return-panel,
.order-return-history {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin: 16px 0;
  padding: 14px;
}

.order-edit-head {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.45fr) minmax(140px, 0.45fr);
}

.order-lines-edit-form {
  display: grid;
  gap: 12px;
}

.order-lines-edit-meta {
  align-items: end;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.45fr) minmax(220px, 1fr) minmax(120px, 0.35fr) minmax(120px, 0.35fr);
  padding: 10px;
}

.order-lines-save-actions {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.order-edit-add {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(360px, 1fr) minmax(110px, 0.25fr) auto;
}

.order-edit-add-unified {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
}

.order-edit-actions {
  flex-wrap: wrap;
  margin-bottom: 0;
}

.order-edit-primary-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-edit-ship-button {
  background: #eef6ff;
  border-color: #b7d7ff;
  color: #175cd3;
}

.order-return-actions {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1fr) auto;
}

.returns-workspace-page {
  display: grid;
  gap: 14px;
}

.returns-workspace-head {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(240px, 0.9fr) minmax(360px, 1.1fr);
}

.returns-workspace-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.returns-workspace-head-flat {
  grid-template-columns: minmax(240px, 0.75fr) minmax(420px, 1.25fr);
}

.returns-summary {
  margin: 0;
}

.return-mode-tabs {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.return-mode-tabs button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
  text-align: left;
}

.return-mode-tabs button.active {
  background: #eef6ff;
  border-color: #2f6fed;
  box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.12);
  color: #175cd3;
}

.return-mode-tabs strong {
  color: inherit;
  font-size: 13px;
}

.return-workarea {
  display: grid;
  gap: 14px;
  margin: 0;
}

.return-work-top {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.return-work-title h2 {
  font-size: 24px;
  margin: 3px 0;
}

.return-work-title p {
  color: var(--muted);
  margin: 0;
}

.return-work-total {
  background: #eef6ff;
  border: 1px solid #c8ddff;
  border-radius: 8px;
  min-width: 190px;
  padding: 10px 12px;
  text-align: right;
}

.return-work-total span,
.return-work-total small {
  color: var(--muted);
  display: block;
}

.return-work-total strong {
  color: #175cd3;
  display: block;
  font-size: 24px;
}

.return-document-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax(180px, 0.6fr) minmax(180px, 0.6fr);
}

.return-customer-search,
.return-filter-customer-search {
  position: relative;
}

.return-customer-results {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 2px;
  left: 0;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
}

.return-customer-results button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  text-align: left;
}

.return-customer-results button:hover {
  background: #eef6ff;
}

.return-customer-results span {
  color: var(--muted);
  font-size: 12px;
  padding: 8px;
}

.return-order-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 9px;
}

.return-order-picker-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.return-order-picker-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.return-order-chips {
  display: grid;
  gap: 6px;
  max-height: 148px;
  overflow: auto;
}

.return-order-chips button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  text-align: left;
}

.return-order-chips button.is-selected {
  background: #eef6ff;
  border-color: #2f6fed;
  box-shadow: 0 0 0 1px rgba(47, 111, 237, 0.12);
}

.return-order-chips strong {
  color: var(--text);
}

.return-order-chips span,
.return-order-picker small,
.return-order-picker p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.return-work-meta-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.return-work-meta-table > div {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 10px;
}

.return-work-meta-table > div:last-child {
  border-right: 0;
}

.return-work-meta-table span {
  color: var(--muted);
  font-size: 12px;
}

.return-lines-workspace {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.return-lines-head {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 360px);
  padding: 10px 12px;
}

.return-lines-head h3 {
  margin: 0;
}

.return-lines-head span {
  color: var(--muted);
  font-size: 13px;
}

.return-lines-head label {
  margin: 0;
}

.return-catalog-grid {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-height: 360px;
  overflow: auto;
  padding: 10px 12px;
}

.return-catalog-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 9px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 9px;
}

.return-catalog-card.is-selected {
  background: #f0fdf4;
  border-color: #86efac;
}

.return-catalog-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.return-catalog-body .stacked-link strong {
  white-space: normal;
}

.return-catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.return-catalog-meta span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  padding: 3px 7px;
}

.return-catalog-body small,
.return-catalog-empty {
  color: var(--muted);
  font-size: 12px;
}

.return-catalog-actions {
  display: grid;
  gap: 6px;
}

.return-lines-table {
  min-width: 1080px;
}

.return-receipt-inline {
  display: grid;
  gap: 2px;
  min-width: 150px;
}

.return-receipt-inline + .return-receipt-inline {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 6px;
}

.return-receipt-inline span {
  color: var(--muted);
  font-size: 12px;
}

.return-receipt-inline .link-button {
  justify-self: start;
}

.return-product-cell {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 38px minmax(220px, 1fr);
}

.return-work-footer {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) auto;
}

.return-work-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.return-work-actions small {
  color: var(--muted);
  max-width: 360px;
}

.returns-workspace-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

.returns-list-panel {
  min-width: 0;
  overflow: auto;
}

.returns-detail-stack {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 12px;
}

.return-row {
  cursor: pointer;
}

.return-row:hover td {
  background: #f5fbff;
}

.return-detail-card {
  display: grid;
  gap: 14px;
  margin: 0;
}

.return-detail-empty {
  color: var(--muted);
}

.return-detail-hero {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.return-detail-hero h2 {
  font-size: 24px;
  margin-top: 3px;
}

.return-detail-hero p {
  color: var(--muted);
  margin: 3px 0 0;
}

.return-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.return-fiscal-control {
  background: #f8fbff;
  border: 1px solid #dbe7f7;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.return-fiscal-control > div:first-child {
  display: grid;
  gap: 2px;
}

.return-fiscal-control > div:first-child span,
.return-fiscal-list small,
.return-fiscal-list span {
  color: var(--muted);
  font-size: 12px;
}

.return-fiscal-list {
  display: grid;
  gap: 8px;
}

.return-fiscal-list article {
  align-items: center;
  background: #fff;
  border: 1px solid #e4ebf5;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 9px;
}

.return-fiscal-list article strong {
  white-space: nowrap;
}

.return-status-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.return-status-badge.success {
  background: #ecfdf3;
  border-color: #abe0be;
  color: #087443;
}

.return-status-badge.warning {
  background: #fff7e8;
  border-color: #ffd99a;
  color: #9a5b00;
}

.return-status-badge.danger {
  background: #fff1f0;
  border-color: #ffc9c5;
  color: #b42318;
}

.return-detail-kpis {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.return-detail-kpis > div,
.return-document-meta > div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.return-detail-kpis span,
.return-document-meta span,
.return-note span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.return-detail-kpis strong,
.return-document-meta strong,
.return-note strong {
  display: block;
  margin-top: 4px;
}

.return-document-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.return-status-note,
.return-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 10px;
}

.return-status-note.success {
  background: #f2fbf5;
}

.return-status-note.warning {
  background: #fffaf0;
}

.return-status-note.danger {
  background: #fff7f6;
}

.return-line-list {
  display: grid;
  gap: 8px;
}

.return-line-card {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 44px minmax(0, 1fr) minmax(96px, auto);
  padding: 9px;
}

.return-line-main {
  min-width: 0;
}

.return-line-main .stacked-link {
  max-width: 100%;
  text-align: left;
}

.return-line-main .stacked-link strong,
.return-line-main .stacked-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.return-line-side {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
}

.return-line-side span,
.return-line-side small {
  color: var(--muted);
}

/* Returns module: high-density working screen */
.returns-workspace-page {
  background: #fff;
  border: 1px solid #e4e9f2;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.04);
  gap: 12px;
  padding: 14px;
}

.returns-workspace-head {
  align-items: center;
  background: #fff;
  border: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(280px, 1fr) auto;
  padding: 0 2px 2px;
}

.returns-workspace-head h2 {
  font-size: 24px;
  letter-spacing: 0;
  margin: 2px 0 3px;
}

.returns-head-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.returns-head-actions button,
.return-work-actions button {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.returns-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.return-summary-tile {
  align-items: center;
  background: #fff;
  border: 1px solid #e0e7f2;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 76px;
  padding: 12px;
}

.return-summary-tile span {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.return-summary-tile strong {
  color: #101828;
  display: block;
  font-size: 19px;
  line-height: 1.15;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.return-summary-tile small {
  color: #8a94a6;
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.return-summary-blue strong,
.return-summary-blue .return-ui-icon {
  color: #175cd3;
}

.return-summary-amber strong,
.return-summary-amber .return-ui-icon {
  color: #d46b08;
}

.return-summary-red strong,
.return-summary-red .return-ui-icon {
  color: #d92d20;
}

.return-ui-icon {
  align-items: center;
  border-radius: 8px;
  color: #2563eb;
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.return-ui-icon svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.return-summary-tile > .return-ui-icon {
  background: #eff6ff;
  height: 34px;
  width: 34px;
}

.return-summary-amber > .return-ui-icon {
  background: #fff7e6;
}

.return-summary-red > .return-ui-icon {
  background: #fff1f0;
}

.return-mode-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.return-mode-tabs button {
  min-height: 46px;
  padding: 9px 11px;
}

.return-mode-tabs button > span {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-width: 0;
}

.return-mode-tabs button.active .return-ui-icon {
  color: #175cd3;
}

.return-create-shell {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.34fr);
}

.return-create-main,
.return-side-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.return-side-panel {
  position: sticky;
  top: 10px;
}

.return-work-card,
.return-draft-card {
  background: #fff;
  border: 1px solid #e0e7f2;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
  min-width: 0;
  padding: 12px;
}

.return-document-card {
  display: grid;
  gap: 12px;
}

.return-work-top {
  align-items: center;
}

.return-work-title h2 {
  font-size: 22px;
  letter-spacing: 0;
}

.return-work-total {
  border-radius: 8px;
  min-width: 170px;
}

.return-document-grid {
  grid-template-columns: minmax(250px, 1fr) minmax(270px, 1fr) minmax(180px, 0.55fr) minmax(170px, 0.5fr);
}

.return-document-grid label > span,
.return-lines-head label,
.return-order-picker-head > span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.return-document-grid label {
  min-width: 0;
}

.return-order-picker {
  background: #fbfdff;
}

.return-order-chips {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 116px;
}

.return-order-chips button {
  min-width: 0;
}

.return-work-meta-table {
  grid-template-columns: 1.25fr 0.9fr 0.9fr 0.7fr;
}

.return-lines-workspace {
  overflow: hidden;
  padding: 0;
}

.return-lines-head {
  background: #fff;
  grid-template-columns: minmax(230px, 1fr) minmax(260px, 340px) auto;
  padding: 12px;
}

.return-lines-head h3 {
  font-size: 20px;
  margin: 2px 0 0;
}

.return-lines-head small {
  color: #667085;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.return-catalog-grid {
  background: #fbfcff;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  max-height: 230px;
  padding: 10px 12px;
}

.return-catalog-card {
  grid-template-columns: 42px minmax(0, 1fr);
  position: relative;
}

.return-catalog-actions {
  display: flex;
  gap: 6px;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.return-lines-table-wrap {
  overflow: auto;
}

.return-lines-table {
  min-width: 1050px;
}

.return-lines-table th,
.return-lines-table td {
  vertical-align: middle;
}

.return-lines-table .product-thumb,
.return-catalog-card .product-thumb,
.return-line-card .product-thumb {
  height: 38px;
  width: 38px;
}

.return-quantity-cell {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.return-quantity-cell .table-input {
  max-width: 82px;
}

.return-work-footer {
  align-items: end;
  grid-template-columns: minmax(260px, 1fr) auto;
}

.return-side-head {
  align-items: start;
  display: grid;
  gap: 9px;
  grid-template-columns: 28px minmax(0, 1fr);
}

.return-side-head strong {
  display: block;
}

.return-side-head span {
  color: #667085;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.return-defect-preview {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.return-defect-preview > div {
  background: #f8fafc;
  border: 1px solid #e4e9f2;
  border-radius: 8px;
  padding: 9px;
}

.return-defect-preview span {
  color: #667085;
  display: block;
  font-size: 12px;
}

.return-defect-preview strong {
  display: block;
  font-size: 18px;
  margin-top: 2px;
}

.return-detail-card,
.return-draft-card {
  border-radius: 8px;
}

.return-detail-actions .primary,
.return-detail-actions .ghost {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.returns-list-panel {
  box-shadow: none;
}

.returns-table th,
.returns-table td {
  font-size: 13px;
}

.return-fiscal-control {
  border-radius: 8px;
}

.return-fiscal-list article {
  border-radius: 8px;
}

.table-input {
  min-height: 34px;
  max-width: 110px;
}

.site-status-select {
  max-width: 160px;
  min-width: 140px;
}

.site-status-inline-editor {
  cursor: pointer;
  display: inline-grid;
  position: relative;
  width: fit-content;
}

.compact-status-control {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.compact-status-control > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-status-inline-editor .site-request-state-badge,
.site-status-inline-editor .erp-status-badge,
.site-status-inline-editor .erp-finance-badge {
  padding-right: 18px;
}

.site-status-inline-editor::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  content: "";
  opacity: 0.72;
  pointer-events: none;
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-40%);
}

.site-status-inline-select {
  border: 0;
  cursor: pointer;
  height: 100%;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.site-status-inline-select:disabled {
  cursor: not-allowed;
}

.site-status-inline-editor.is-locked {
  cursor: not-allowed;
}

.site-status-inline-editor:has(.site-status-inline-select:focus-visible) .site-request-state-badge,
.site-status-inline-editor:has(.site-status-inline-select:focus-visible) .erp-status-badge {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.compact {
  margin-top: 14px;
}

.notice {
  background: #eef8f1;
  border: 1px solid #b7dfc3;
  border-radius: 6px;
  color: var(--accent-dark);
  margin-bottom: 12px;
  padding: 10px 12px;
}

.notice.danger {
  background: #fef3f2;
  border-color: #fda29b;
  color: #b42318;
}

.notice.success {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.notice.warning {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.order-reserve-lock-notice {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
}

.order-reserve-lock-notice span {
  color: #92400e;
  font-weight: 700;
}

.order-change-request-hint {
  margin-bottom: 12px;
}

.floating-message {
  animation: toast-in 0.16s ease-out;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(185, 28, 28, 0.28);
  border-radius: 8px;
  bottom: 20px;
  box-shadow: 0 18px 48px rgba(30, 35, 41, 0.22);
  color: #7f1d1d;
  font-size: 15px;
  font-weight: 700;
  left: auto;
  line-height: 1.35;
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 18px;
  pointer-events: none;
  position: fixed;
  right: 20px;
  top: auto;
  transform: none;
  width: max-content;
  z-index: 1300;
}

.floating-message.danger {
  background: rgba(254, 226, 226, 0.94);
  border-color: rgba(220, 38, 38, 0.42);
  color: #7f1d1d;
}

.floating-message.success {
  background: rgba(236, 253, 245, 0.94);
  border-color: rgba(22, 163, 74, 0.34);
  color: #14532d;
}

.live-refresh-toast {
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  bottom: 18px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.24);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  left: 50%;
  opacity: 0;
  padding: 9px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 14px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 999;
}

.live-refresh-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  align-items: end;
}

.toolbar button {
  padding: 0 14px;
}

.payment-field {
  min-width: 160px;
}

.payment-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(160px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
}

.active-soft {
  background: #eef8f1;
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.orders-smart-page {
  background: #ffffff;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
}

.orders-smart-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.orders-smart-head h2 {
  color: #111827;
  font-size: 24px;
  margin-top: 3px;
}

.orders-smart-head h2 span {
  background: #eef3ff;
  border: 1px solid #cfd8ff;
  border-radius: 999px;
  color: #4f46e5;
  font-size: 12px;
  margin-left: 8px;
  padding: 3px 8px;
  vertical-align: middle;
}

.orders-smart-actions,
.orders-smart-toolbar {
  align-items: center;
  display: flex;
  gap: 10px;
}

.orders-smart-actions button,
.orders-smart-toolbar button {
  padding: 0 14px;
}

.orders-smart-toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
  padding: 7px;
}

.orders-smart-search {
  flex: 1 1 420px;
}

.orders-smart-search input {
  background: #f9fafb;
  border-color: #d7deea;
  min-height: 36px;
}

.orders-smart-ai {
  background: #f3f0ff;
  border-color: #d8d2ff;
  color: #4f46e5;
  font-weight: 800;
  opacity: 1;
}

.orders-smart-count {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-left: auto;
  padding: 6px 10px;
  white-space: nowrap;
}

.orders-smart-filters {
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 0.7fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) minmax(150px, 0.85fr) minmax(190px, 1fr) minmax(120px, 0.65fr);
  padding: 8px 10px;
}

.orders-smart-filters label {
  font-size: 12px;
}

.orders-smart-filters select,
.orders-smart-filters input {
  min-height: 30px;
  padding: 4px 7px;
}

.orders-smart-layout {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  min-width: 0;
}

.orders-smart-layout-full {
  grid-template-columns: minmax(0, 1fr);
}

.orders-smart-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.orders-section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.orders-section-head h3 {
  font-size: 17px;
  margin: 0;
}

.orders-section-head p {
  font-size: 12px;
  margin-top: 2px;
}

.orders-section-head .order-pager {
  min-width: min(100%, 430px);
}

.orders-table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.06);
  max-height: calc(100vh - 360px);
  min-height: 392px;
  overflow: auto;
}

.orders-smart-table {
  border: 0;
  min-width: 860px;
  table-layout: fixed;
  width: 100%;
}

.orders-smart-table th,
.orders-smart-table td {
  font-size: 12px;
  line-height: 1.18;
  padding: 4px 7px;
  vertical-align: middle;
}

.orders-smart-table th {
  background: #f8fafc;
  color: #4b5563;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.orders-smart-table th:first-child,
.orders-smart-table td:first-child {
  text-align: center;
  width: 34px;
}

.orders-smart-table th:nth-child(2) {
  width: 112px;
}

.orders-smart-table th:nth-child(3) {
  width: 230px;
}

.orders-smart-table th:nth-child(4) {
  width: 145px;
}

.orders-smart-table th:nth-child(5) {
  width: 132px;
}

.orders-smart-table th:nth-child(6) {
  width: 230px;
}

.orders-smart-table th:nth-child(7) {
  width: 118px;
}

.orders-smart-table input[type="checkbox"] {
  min-height: 14px;
  padding: 0;
  width: 14px;
}

.orders-smart-table .order-work-row {
  cursor: pointer;
  height: 38px;
}

.orders-smart-table td > strong,
.orders-smart-table td > span:not(.status):not(.channel-pill):not(.priority-pill):not(.customer-business-type-badge) {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-smart-table .order-tags {
  display: none !important;
}

.order-row-meta-line {
  align-items: center;
  display: flex !important;
  gap: 5px;
  margin-top: 3px;
  max-width: 220px;
  overflow: hidden;
}

.order-row-manager {
  color: #667085;
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-smart-table .order-delivery-cell {
  display: block;
  max-width: 218px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-row-actions {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.order-row-action-select {
  background: #ffffff;
  border: 1px solid #d7deea;
  border-radius: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
  padding: 4px 7px;
  width: 132px;
}

.order-main-action {
  border: 1px solid #d7deea;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  min-height: 28px;
  padding: 4px 8px;
  text-align: center;
  width: 132px;
}

.order-main-action.action-danger {
  background: #fff1f2;
  border-color: #fecaca;
  color: #b42318;
}

.order-main-action.action-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.order-main-action.action-info,
.order-main-action.action-neutral {
  background: #f8fafc;
  color: #334155;
}

.order-main-action.action-success {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #027a48;
}

.order-client-phone {
  color: #475467;
  font-weight: 800;
}

.orders-smart-table .order-work-row.is-selected td {
  background: #eef2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
}

.orders-smart-table .order-work-row.is-selected:hover td {
  background: #e8edff;
}

.orders-smart-table .order-work-row.needs-action td {
  box-shadow: inset 3px 0 0 #f97316;
}

.strong-sub {
  color: var(--ink);
  font-weight: 700;
}

.channel-pill,
.priority-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  white-space: nowrap;
}

.channel-pill {
  background: #f6f8fb;
  color: #344054;
}

.priority-high {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.priority-medium {
  background: #fff7d6;
  border-color: #e7c665;
  color: #775200;
}

.priority-low {
  background: #e9f7ef;
  border-color: #b7dfc3;
  color: var(--accent-dark);
}

.priority-text-high {
  color: #b42318;
}

.priority-text-medium {
  color: #b54708;
}

.priority-text-low {
  color: var(--accent-dark);
}

.order-delivery-cell {
  color: #344054;
  display: block;
  font-size: 12px;
  max-width: 154px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-preview-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 118px);
  overflow: auto;
  padding: 12px;
  position: sticky;
  top: 12px;
}

.orders-preview-close {
  justify-self: end;
  min-height: 28px;
  width: 32px;
}

.orders-preview-head {
  align-items: start;
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.orders-preview-head h3 {
  font-size: 22px;
  margin: 0;
}

.orders-preview-client {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 12px 0;
}

.orders-preview-client strong {
  font-size: 17px;
}

.orders-preview-client span {
  color: var(--muted);
  font-size: 13px;
}

.orders-preview-client .customer-business-type-badge {
  color: #1d4ed8;
  font-size: 11px;
  justify-self: start;
  margin-left: 0;
}

.orders-preview-facts {
  display: grid;
  gap: 8px;
}

.orders-preview-facts div,
.payment-progress-row {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.orders-preview-facts span,
.payment-progress-row span {
  color: var(--muted);
  font-size: 12px;
}

.orders-preview-facts strong {
  color: var(--ink);
  font-size: 13px;
  text-align: right;
}

.orders-preview-money {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.orders-preview-money > strong {
  font-size: 24px;
}

.payment-progress {
  background: #e9edf5;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.payment-progress span {
  background: var(--accent);
  display: block;
  height: 100%;
}

.orders-preview-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.orders-preview-actions button:first-child,
.orders-preview-actions button:last-child {
  grid-column: 1 / -1;
}

.orders-preview-hint {
  background: #f2f0ff;
  border: 1px solid #d8d2ff;
  border-radius: 8px;
  color: #42307d;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.orders-preview-hint span {
  color: #42307d;
  font-size: 13px;
  line-height: 1.45;
}

.orders-smart-insights {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.orders-smart-insight {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 3px 0 0 #98a2b3;
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 11px;
}

.orders-smart-insight span,
.orders-smart-insight small {
  color: var(--muted);
  font-size: 12px;
}

.orders-smart-insight strong {
  font-size: 20px;
}

.orders-smart-insight.insight-success {
  box-shadow: inset 3px 0 0 var(--accent);
}

.orders-smart-insight.insight-warning {
  box-shadow: inset 3px 0 0 #d99a00;
}

.orders-smart-insight.insight-danger {
  box-shadow: inset 3px 0 0 #d92d20;
}

.orders-smart-insight.insight-accent {
  box-shadow: inset 3px 0 0 #635bff;
}

.order-journal {
  display: grid;
  gap: 14px;
  min-width: 0;
  overflow: auto;
}

.order-work-tab-groups {
  display: grid;
  gap: 7px;
}

.order-work-tabs {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.order-work-tabs-workflow {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.order-work-workflow-tabs {
  display: grid;
  gap: 5px;
}

.order-work-workflow-tabs > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.order-work-tabs button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  justify-content: space-between;
  min-height: 32px;
  padding: 4px 9px;
}

.order-work-tabs button[style] {
  box-shadow: inset 3px 0 0 var(--tab-color);
}

.order-work-tabs button.active {
  background: #eef2ff;
  border-color: #cfd8ff;
  box-shadow: inset 3px 0 0 var(--tab-color, #4f46e5);
  color: #3730a3;
}

.order-work-tabs strong {
  font-size: 16px;
}

.order-filter-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.75fr) minmax(160px, 0.75fr) minmax(220px, 1fr) minmax(140px, 0.65fr) minmax(140px, 0.65fr) auto;
}

.order-filter-grid button {
  padding: 0 14px;
}

.order-summary {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.order-journal table {
  min-width: 980px;
}

.order-work-table {
  border-collapse: separate;
  border-spacing: 0;
}

.order-work-table th:nth-child(1) {
  width: 210px;
}

.order-work-table th:nth-child(2) {
  width: 280px;
}

.order-work-table th:nth-child(3) {
  width: 170px;
}

.order-work-table th:nth-child(4) {
  width: 150px;
}

.order-work-row td {
  background: var(--panel);
  vertical-align: middle;
}

.order-work-row:hover td {
  background: #f8faf9;
}

.order-work-row-reserved td {
  box-shadow: inset 3px 0 0 #198754;
}

.order-work-row-completed td {
  box-shadow: inset 3px 0 0 #12b76a;
}

.order-work-row.has-debt td {
  box-shadow: inset 3px 0 0 #b54708;
}

.order-work-row.is-overdue td {
  background: #fff5f5;
  box-shadow: inset 3px 0 0 #d92d20;
}

.order-work-row.is-overdue:hover td {
  background: #ffefef;
}

.order-work-row.payment-due-attention td {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #e0a000;
}

.order-work-row.payment-due-attention:hover td {
  background: #fff4d6;
}

.order-number-link {
  font-size: 13px;
}

.order-row-sub,
.order-row-debt {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 1px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-payment-marker {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex !important;
  font-size: 10px;
  font-weight: 800;
  gap: 4px;
  line-height: 1;
  margin-top: 3px;
  max-width: 118px;
  padding: 3px 6px;
  position: relative;
  white-space: nowrap;
}

.order-payment-marker::after {
  background: #111827;
  border-radius: 7px;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.22);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 700;
  left: 0;
  line-height: 1.3;
  max-width: 260px;
  min-width: 210px;
  opacity: 0;
  padding: 8px 10px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 7px);
  transform: translateY(-3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  white-space: normal;
  z-index: 30;
}

.order-payment-marker:hover::after,
.order-payment-marker:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.order-payment-icon {
  align-items: center;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 13px;
  justify-content: center;
  position: relative;
  width: 13px;
}

.order-payment-icon-ok {
  background: #12b76a;
  border-color: #12b76a;
}

.order-payment-icon-ok::before {
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  content: "";
  height: 7px;
  margin-top: -2px;
  transform: rotate(45deg);
  width: 4px;
}

.order-payment-icon-half {
  background: #f59e0b;
  border-color: #f59e0b;
}

.order-payment-icon-half::before {
  background: #fff;
  border-radius: 99px;
  content: "";
  height: 2px;
  width: 7px;
}

.order-payment-icon-empty {
  background: #fff;
  border-color: #ef4444;
}

.order-payment-icon-empty::before,
.order-payment-icon-empty::after {
  background: #ef4444;
  border-radius: 99px;
  content: "";
  height: 2px;
  position: absolute;
  width: 8px;
}

.order-payment-icon-empty::before {
  transform: rotate(45deg);
}

.order-payment-icon-empty::after {
  transform: rotate(-45deg);
}

.order-payment-icon-clock {
  background: #fff7ed;
  border-color: #f59e0b;
}

.order-payment-icon-clock::before {
  background: #f59e0b;
  border-radius: 99px;
  content: "";
  height: 7px;
  width: 2px;
}

.order-payment-icon-clock::after {
  background: #f59e0b;
  border-radius: 99px;
  content: "";
  height: 2px;
  position: absolute;
  transform: translate(2px, 2px);
  width: 5px;
}

.order-payment-icon-error {
  background: #fef2f2;
  border-color: #dc2626;
}

.order-payment-icon-error::before,
.order-payment-icon-error::after {
  background: #dc2626;
  border-radius: 99px;
  content: "";
  height: 2px;
  position: absolute;
  width: 8px;
}

.order-payment-icon-error::before {
  transform: rotate(45deg);
}

.order-payment-icon-error::after {
  transform: rotate(-45deg);
}

.order-payment-marker.payment-paid {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.order-payment-marker.payment-partial {
  background: #fffaeb;
  border-color: #fedf89;
  color: #b54708;
}

.order-payment-marker.payment-unpaid {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b42318;
}

.order-payment-marker.payment-awaiting {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.order-payment-marker.payment-prom-awaiting {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
  max-width: 142px;
}

.order-payment-marker.payment-error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.payment-due-badge {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  margin-top: 4px;
  padding: 3px 7px;
  width: fit-content;
}

.payment-due-text {
  font-weight: 900;
}

.payment-due-muted {
  background: #f2f4f7;
  border-color: #d9dee5;
  color: #667085;
}

.payment-due-info {
  background: #eef4ff;
  border-color: #b8cdfc;
  color: #3155b7;
}

.payment-due-warning {
  background: #fff6db;
  border-color: #e8c766;
  color: #946200;
}

.payment-due-danger {
  background: #ffe8e8;
  border-color: #f0a4a4;
  color: #b42318;
}

.payment-due-form {
  border: 1px solid #eceff5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
}

.payment-due-form label {
  display: grid;
  gap: 5px;
}

.payment-due-actions {
  display: flex;
  gap: 8px;
}

.payment-due-inline-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 1fr) auto auto;
}

.site-request-payment-due-form {
  background: rgba(255, 255, 255, 0.74);
  margin-top: 0;
}

.site-request-payment-due-head {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.site-request-payment-due-head span,
.site-request-payment-due-head small,
.payment-due-inline-form span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.site-request-payment-due-head strong {
  display: block;
  margin-top: 2px;
}

.payment-due-inline-form {
  margin: 0;
  min-width: min(100%, 360px);
}

.order-payment-actions {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(260px, 1fr) minmax(140px, auto);
}

.order-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  margin-top: 3px;
  max-width: 190px;
  overflow: hidden;
}

.order-tags span {
  background: #f1f4f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  white-space: nowrap;
}

.order-tags span.warning {
  background: #fff7d6;
  border-color: #e2bf52;
  color: #775200;
}

.order-tags span.danger {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.order-tags span.accent {
  background: #eef8f1;
  border-color: #b7dfc3;
  color: var(--accent-dark);
}

.orders-smart-table .order-tags {
  display: none !important;
}

.status.order-status-reserved {
  background: #f2ecff;
  border: 1px solid #c8b6ff;
  color: #5b21b6;
}

.status.order-status-shipped {
  background: #e7f0ff;
  border: 1px solid #aecbfa;
  color: #1d4ed8;
}

.status.order-status-paid {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #14532d;
}

.status.order-status-completed {
  background: #e7f8ef;
  border: 1px solid #58d68d;
  color: #116329;
}

.status.order-status-cancelled {
  background: #ffe4e4;
  border: 1px solid #f0a8a8;
  color: #b42318;
}

.status.order-status-dynamic,
.order-workflow-badge {
  border: 1px solid;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.order-status-stack {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.orders-smart-table .order-status-stack {
  max-width: 130px;
}

.order-needs-action-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.order-need-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475467;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  max-width: 128px;
  overflow: hidden;
  padding: 4px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-need-danger {
  background: #fff1f2;
  border-color: #fecaca;
  color: #b42318;
}

.order-need-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.order-need-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.orders-preview-head .order-status-stack,
.order-detail-title .order-status-stack {
  justify-content: flex-end;
}

.order-workflow-badge {
  font-size: 10px;
  padding: 4px 7px;
}

.order-workflow-empty {
  background: #f8fafc;
  border-color: #d0d5dd;
  color: #667085;
}

.order-workflow-row strong {
  display: block;
}

.order-workflow-inline-editor {
  cursor: pointer;
  display: inline-grid;
  max-width: 100%;
  position: relative;
}

.order-workflow-inline-editor .order-workflow-badge,
.order-workflow-inline-editor .warehouse-work-status {
  padding-right: 18px;
}

.order-workflow-inline-editor::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  content: "";
  opacity: 0.72;
  pointer-events: none;
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-40%);
}

.order-workflow-select {
  border: 0;
  cursor: pointer;
  height: 100%;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.order-workflow-select:disabled {
  cursor: not-allowed;
}

.order-workflow-inline-editor:has(.order-workflow-select:focus-visible) .order-workflow-badge,
.order-workflow-inline-editor:has(.order-workflow-select:focus-visible) .warehouse-work-status {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.order-status-settings {
  display: grid;
  gap: 12px;
}

.order-status-settings-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.order-status-settings-head h3 {
  margin: 2px 0 4px;
}

.order-status-create {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 1fr) 110px 110px auto;
}

.order-status-settings-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  overflow: hidden;
}

.order-status-settings-row {
  align-items: end;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(200px, 1fr) 90px 90px 110px minmax(160px, auto);
  padding: 10px;
}

.order-status-settings-row:last-child {
  border-bottom: 0;
}

.order-status-settings-badge {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.order-status-settings-badge small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-status-active-toggle {
  align-items: center;
  display: flex;
  gap: 6px;
  min-height: 32px;
}

.order-status-active-toggle input {
  min-height: auto;
  width: auto;
}

.order-status-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.order-row-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(104px, 1fr);
}

.orders-smart-table.order-work-table th:first-child,
.orders-smart-table.order-work-table td:first-child {
  text-align: center;
  width: 34px;
}

.orders-smart-table.order-work-table th:nth-child(2) {
  width: 112px;
}

.orders-smart-table.order-work-table th:nth-child(3) {
  width: 230px;
}

.orders-smart-table.order-work-table th:nth-child(4) {
  width: 145px;
}

.orders-smart-table.order-work-table th:nth-child(5) {
  width: 132px;
}

.orders-smart-table.order-work-table th:nth-child(6) {
  width: 230px;
}

.orders-smart-table.order-work-table th:nth-child(7) {
  width: 118px;
}

.order-stock-alert {
  background: #fff4f4;
  border: 1px solid #f0a8a8;
  border-radius: 8px;
  box-shadow: inset 4px 0 0 #d92d20;
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 10px 12px;
}

.order-stock-alert strong {
  color: #b42318;
  font-size: 14px;
}

.order-stock-alert span {
  color: #7a271a;
  font-size: 13px;
  font-weight: 700;
}

.order-manager-revision-alert {
  background: #fff1f2;
  border-color: #fecaca;
  color: #7f1d1d;
}

.order-manager-revision-alert strong {
  display: block;
  margin-bottom: 6px;
}

.order-manager-revision-alert p {
  margin: 0 0 6px;
  white-space: pre-line;
}

.order-manager-revision-alert small {
  color: #9f1239;
  display: block;
  line-height: 1.4;
}

.order-warehouse-pick-facts.has-shortage {
  border-color: #fed7aa;
  background: #fff7ed;
}

.order-warehouse-pick-facts .panel-head {
  margin-bottom: 10px;
}

.warehouse-pick-shortage-row td {
  background: #fff1f2;
  box-shadow: inset 3px 0 0 #dc2626;
}

.warehouse-pick-shortage-row strong {
  color: #b42318;
}

.order-lines-table {
  min-width: 920px;
}

.order-line-stock-row-zero td {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #d99a00;
}

.order-line-stock-row-negative td,
.order-line-stock-row-missing td {
  background: #fff4f4;
  box-shadow: inset 3px 0 0 #d92d20;
}

.order-line-stock-cell {
  min-width: 124px;
}

.order-line-stock-cell strong,
.order-line-stock-cell span {
  display: block;
}

.order-line-stock-cell span {
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.order-line-stock-cell.success strong,
.order-line-stock-cell.success span {
  color: var(--accent-dark);
}

.order-line-stock-cell.warning strong,
.order-line-stock-cell.warning span {
  color: #b54708;
}

.order-line-stock-cell.danger strong,
.order-line-stock-cell.danger span {
  color: #b42318;
}

.order-line-stock-cell span.order-line-reserved {
  color: var(--muted);
  font-weight: 700;
}

.modal-backdrop {
  align-items: center;
  background: rgba(30, 35, 41, 0.42);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 20px;
  position: fixed;
  z-index: 50;
}

.generic-dialog-backdrop {
  z-index: 220;
}

.journal-payment-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(30, 35, 41, 0.28);
  display: grid;
  gap: 14px;
  max-width: 560px;
  padding: 16px;
  width: min(560px, 100%);
}

.confirm-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(30, 35, 41, 0.28);
  display: grid;
  gap: 14px;
  max-width: 520px;
  padding: 16px;
  width: min(520px, 100%);
}

.site-request-cancel-backdrop {
  align-items: center;
  backdrop-filter: blur(2px);
  background: rgba(15, 23, 42, 0.56);
  display: flex;
  justify-content: center;
  z-index: 70;
}

.site-request-cancel-dialog {
  background: #ffffff;
  border: 1px solid #d8e0ee;
  border-radius: 10px;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.34);
  color: #0f172a;
  display: grid;
  gap: 20px;
  max-height: calc(100vh - 44px);
  max-width: 582px;
  overflow: visible;
  padding: 22px;
  width: min(582px, calc(100vw - 32px));
}

.site-request-cancel-head {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.site-request-cancel-title {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 36px minmax(0, 1fr);
}

.site-request-cancel-warning {
  align-items: center;
  border: 0;
  border-radius: 0;
  color: #ef4444;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.site-request-cancel-warning svg {
  height: 34px;
  stroke-width: 1.9;
  width: 34px;
}

.site-request-cancel-title h2 {
  color: #0f172a;
  font-size: 22px;
  line-height: 1.15;
  margin: 0 0 18px;
}

.site-request-cancel-title p {
  color: #243757;
  font-size: 14px;
  line-height: 1.52;
  margin: 0 0 8px;
}

.site-request-cancel-x {
  background: transparent;
  border: 0;
  color: #0f172a;
  height: 30px;
  min-height: 30px;
  padding: 3px;
  width: 30px;
}

.site-request-cancel-x .order-action-icon {
  height: 22px;
  width: 22px;
}

.site-request-cancel-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b42318;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
}

.site-request-cancel-body {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 224px minmax(0, 1fr);
  position: relative;
}

.site-request-cancel-body::before {
  background: #e5eaf3;
  content: "";
  height: 1px;
  left: 224px;
  position: absolute;
  right: 0;
  top: 68px;
}

.site-request-cancel-field {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.site-request-cancel-field span {
  color: #243757;
  font-size: 13px;
  font-weight: 800;
}

.site-request-cancel-field b {
  color: #ef4444;
}

.site-request-cancel-select,
.site-request-cancel-field textarea {
  background: #ffffff;
  border: 1px solid #cfd9ea;
  border-radius: 7px;
  color: #0f172a;
  font: inherit;
  padding: 11px 12px;
  width: 100%;
}

.site-request-cancel-select:focus,
.site-request-cancel-field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  outline: none;
}

.site-request-cancel-select {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  min-height: 40px;
  text-align: left;
}

.site-request-cancel-select span {
  color: #667085;
  font-size: 14px;
  font-weight: 700;
}

.site-request-cancel-select b {
  color: #475467;
  font-size: 18px;
  line-height: 1;
}

.site-request-cancel-options {
  background: #ffffff;
  border: 1px solid #cfd9ea;
  border-radius: 0 0 7px 7px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  display: grid;
  margin-top: -11px;
  overflow: hidden;
  position: relative;
  z-index: 3;
}

.site-request-cancel-options button {
  background: #ffffff;
  border: 0;
  color: #1f2a44;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  min-height: 34px;
  padding: 8px 12px;
  text-align: left;
}

.site-request-cancel-options button:hover,
.site-request-cancel-options button.selected {
  background: #eff6ff;
  color: #1d4ed8;
}

.site-request-cancel-field textarea {
  line-height: 1.45;
  min-height: 114px;
  resize: vertical;
}

.site-request-cancel-field small {
  color: #667085;
  font-size: 12px;
  justify-self: end;
}

.site-request-cancel-audit {
  align-items: start;
  background: #f8fbff;
  border: 1px solid #cfe0ff;
  border-radius: 7px;
  color: #344054;
  display: grid;
  gap: 12px;
  grid-template-columns: 24px 1fr;
  padding: 13px 14px;
}

.site-request-cancel-info {
  align-items: center;
  border: 1px solid #2563eb;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  margin-top: 2px;
  width: 20px;
}

.site-request-cancel-audit strong {
  color: #1d4ed8;
  display: block;
  margin-bottom: 3px;
}

.site-request-cancel-audit p {
  margin: 2px 0;
}

.site-request-cancel-actions {
  align-items: center;
  border-top: 0;
  display: flex;
  gap: 12px;
  justify-content: center;
  padding-top: 0;
}

.site-request-cancel-actions .ghost,
.site-request-cancel-actions .primary {
  border-radius: 7px;
  font-size: 15px;
  font-weight: 900;
  min-height: 44px;
  min-width: 180px;
}

.site-request-cancel-actions .danger-button {
  align-items: center;
  background: #ef2b2d;
  border-color: #ef2b2d;
  color: #ffffff;
  display: inline-flex;
  gap: 10px;
  justify-content: center;
  min-width: 280px;
}

.site-request-cancel-actions .danger-button:hover {
  background: #dc2626;
  border-color: #dc2626;
}

@media (max-width: 720px) {
  .site-request-cancel-dialog {
    padding: 20px 18px;
  }

  .site-request-cancel-body {
    grid-template-columns: 1fr;
  }

  .site-request-cancel-body::before {
    display: none;
  }

  .site-request-cancel-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .site-request-cancel-actions .ghost,
  .site-request-cancel-actions .primary {
    width: 100%;
  }
}

.order-note-dialog,
.order-payment-links-dialog,
.order-payment-dialog {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 16px;
  width: min(620px, 96vw);
}

.order-payment-links-dialog {
  box-sizing: border-box;
  width: min(760px, calc(100vw - 32px));
}

.order-note-dialog-head,
.order-note-dialog-actions,
.order-payment-links-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.order-note-dialog-head h2,
.order-payment-links-head h2 {
  font-size: 24px;
  line-height: 1.1;
  margin: 2px 0 0;
}

.order-note-dialog-head p,
.order-payment-links-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.order-note-dialog textarea {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #431407;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  min-height: 140px;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}

.order-note-dialog textarea:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.18);
  outline: none;
}

.order-payment-dialog-field {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.order-payment-dialog-field input {
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  min-height: 44px;
  padding: 8px 10px;
}

.order-payment-dialog-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  outline: none;
}

.order-payment-dialog-summary {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.order-payment-dialog-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-payment-dialog-summary strong {
  color: #2563eb;
  font-size: 20px;
}

.order-payment-link-list {
  display: grid;
  gap: 8px;
}

.order-payment-link-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.order-payment-link-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-payment-link-row strong {
  color: var(--ink);
  font-size: 14px;
}

.order-payment-link-row span,
.order-payment-link-row small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.order-payment-link-content {
  gap: 9px !important;
}

.order-payment-link-title {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.order-payment-link-title span {
  font-weight: 700;
}

.order-payment-link-amount {
  align-self: start;
  color: #166534 !important;
  font-size: 16px !important;
  white-space: nowrap;
}

.order-payment-link-actions {
  align-items: end;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.order-payment-link-actions .ghost {
  max-width: 190px;
  white-space: normal;
}

.order-payment-source-details {
  display: grid;
  gap: 7px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.order-payment-source-details > div {
  background: #ffffff;
  border: 1px solid #e5ebf3;
  border-radius: 6px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
}

.order-payment-source-details > .is-wide {
  grid-column: 1 / -1;
}

.order-payment-source-details dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-payment-source-details dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.order-payment-source-loading,
.order-payment-source-error {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 11px;
}

.order-payment-source-loading {
  background: #eff6ff;
}

.order-payment-source-error {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

@media (max-width: 640px) {
  .order-payment-link-row {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .order-payment-link-amount {
    justify-self: start;
  }

  .order-payment-link-actions {
    align-items: start;
    justify-items: start;
  }

  .order-payment-link-actions .ghost {
    max-width: none;
    width: 100%;
  }

  .order-payment-source-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-payment-source-details > .is-wide {
    grid-column: auto;
  }
}

.order-payment-empty-state {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.order-payment-empty-state span {
  font-size: 13px;
  line-height: 1.35;
}

.site-request-bank-candidates {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.site-request-bank-candidates > div:first-child {
  display: grid;
  gap: 3px;
}

.site-request-bank-candidates > div:first-child span,
.site-request-bank-candidates.empty span {
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}

.site-request-bank-candidates.empty {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.site-request-bank-candidate-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.site-request-bank-candidate-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.site-request-bank-candidate-row span,
.site-request-bank-candidate-row small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.site-request-bank-candidate-row .candidate-reason {
  color: #1d4ed8;
  font-weight: 800;
}

.order-note-display {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.order-note-display div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-note-display strong {
  color: #431407;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.order-note-display small {
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}

.document-activity-panel {
  display: grid;
  gap: 12px;
}

.document-comment-box {
  background: #fffbeb;
  border-color: #fde68a;
}

.document-history-list {
  display: grid;
  gap: 8px;
}

.document-history-row {
  align-items: start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #cbd5e1;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 10px 12px;
}

.document-history-row.document-history-success {
  border-left-color: #16a34a;
}

.document-history-row.document-history-warning {
  border-left-color: #f59e0b;
}

.document-history-row.document-history-danger {
  border-left-color: #dc2626;
}

.document-history-row.document-history-info {
  border-left-color: #2563eb;
}

.document-history-row.document-history-accent {
  border-left-color: #7c3aed;
}

.document-history-dot {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.document-history-success .document-history-dot {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #15803d;
}

.document-history-warning .document-history-dot {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.document-history-danger .document-history-dot {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.document-history-info .document-history-dot {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.document-history-accent .document-history-dot {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
}

.document-history-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.document-history-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.document-history-meta strong {
  color: #0f172a;
  font-size: 13px;
}

.document-history-meta span,
.document-history-meta small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.document-history-body p {
  color: #1e293b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.document-history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.document-history-chip {
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  padding: 4px 8px;
}

.document-history-changes {
  display: grid;
  gap: 5px;
  margin-top: 2px;
}

.document-history-change {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(100px, 0.28fr) minmax(0, 1fr) auto minmax(0, 1fr);
  padding: 7px 9px;
}

.document-history-change span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.document-history-change strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.document-history-change b {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
}

.document-history-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  display: grid;
  gap: 4px;
  padding: 14px;
  text-align: center;
}

.document-history-empty strong {
  color: #0f172a;
  font-size: 14px;
}

.document-history-empty span {
  font-size: 13px;
  line-height: 1.35;
}

.confirm-dialog-head,
.confirm-dialog-actions {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.confirm-dialog h2 {
  font-size: 22px;
  margin: 3px 0 0;
}

.confirm-dialog p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}

.confirm-dialog-field {
  display: grid;
  gap: 8px;
}

.confirm-dialog-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.confirm-dialog-field textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  line-height: 1.4;
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}

.confirm-dialog-field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.generic-dialog-fields {
  display: grid;
  gap: 12px;
}

.generic-dialog-wide {
  max-width: 760px;
  width: min(760px, 100%);
}

.generic-dialog-wide .generic-dialog-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.generic-dialog-wide .generic-dialog-field-textarea,
.generic-dialog-wide .generic-dialog-checkbox {
  grid-column: 1 / -1;
}

.generic-dialog-field {
  display: grid;
  gap: 8px;
}

.generic-dialog-field span,
.generic-dialog-checkbox span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.generic-dialog-field input,
.generic-dialog-field select,
.generic-dialog-field textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  line-height: 1.4;
  padding: 10px 12px;
  width: 100%;
}

.generic-dialog-field textarea {
  min-height: 92px;
  resize: vertical;
}

.generic-dialog-field input:focus,
.generic-dialog-field select:focus,
.generic-dialog-field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.generic-dialog-field.has-error input,
.generic-dialog-field.has-error select,
.generic-dialog-field.has-error textarea {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.bank-reopen-payment-summary {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.bank-reopen-payment-summary > div {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
}

.bank-reopen-payment-summary > .is-wide {
  grid-column: 1 / -1;
}

.bank-reopen-payment-summary dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.bank-reopen-payment-summary dd {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .bank-reopen-payment-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-reopen-payment-summary > .is-wide {
    grid-column: auto;
  }
}

.generic-dialog-field-error {
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
}

.price-list-template-dialog .eyebrow {
  color: var(--primary);
}

.price-list-template-dialog .confirm-dialog-actions .primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.generic-dialog-checkbox {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.generic-dialog-checkbox input {
  height: 16px;
  width: 16px;
}

.generic-dialog-checkbox.has-error {
  align-items: flex-start;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  padding: 10px;
}

.generic-dialog-checkbox.has-error .generic-dialog-field-error {
  display: block;
  flex-basis: 100%;
}

.generic-dialog-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #9f1239;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
}

.generic-dialog-details-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.generic-dialog-details-list div {
  display: grid;
  gap: 4px;
  grid-template-columns: 120px minmax(0, 1fr);
}

.generic-dialog-details-list dt {
  color: #9a3412;
  font-weight: 700;
}

.generic-dialog-details-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-preview-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.48);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 18px;
  position: fixed;
  z-index: 90;
}

.order-preview-dialog {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 36px);
  max-width: 1120px;
  overflow: auto;
  padding: 14px;
  width: min(1120px, calc(100vw - 36px));
}

.order-preview-printable {
  display: grid;
  gap: 12px;
}

.order-preview-head,
.order-preview-actions,
.order-preview-lines-total {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.order-preview-head {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 12px 14px;
}

.order-preview-head h2 {
  font-size: 24px;
  line-height: 1.1;
  margin: 3px 0;
}

.order-preview-head p,
.order-preview-note p {
  color: var(--muted);
  margin: 0;
}

.order-preview-total {
  background: #eef4ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  min-width: 170px;
  padding: 10px 12px;
  text-align: right;
}

.order-preview-total span,
.order-preview-status-row span,
.order-preview-facts span,
.order-preview-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.order-preview-total strong {
  color: var(--accent);
  display: block;
  font-size: 24px;
  margin-top: 2px;
}

.order-preview-status-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.order-preview-status-row > div {
  align-items: center;
  background: #fbfcff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
}

.order-preview-status-row strong {
  font-size: 17px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-preview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-preview-grid section,
.order-preview-note,
.order-preview-lines {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
}

.order-preview-grid h3 {
  font-size: 18px;
  margin: 0 0 10px;
}

.order-preview-facts {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
}

.order-preview-facts span,
.order-preview-facts strong {
  border-top: 1px solid #eef0f5;
  min-width: 0;
  padding: 8px 0;
}

.order-preview-facts span:nth-child(1),
.order-preview-facts strong:nth-child(2) {
  border-top: 0;
}

.order-preview-facts strong {
  overflow-wrap: anywhere;
}

.order-preview-note {
  background: #fff7ed;
  border-color: #fed7aa;
  display: grid;
  gap: 6px;
}

.order-preview-note span {
  color: #9a3412;
}

.order-preview-lines {
  overflow: hidden;
  padding: 0;
}

.order-preview-lines-head,
.order-preview-line {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 56px minmax(240px, 1fr) 100px 90px 100px 110px;
}

.order-preview-lines-head {
  background: #f8fafc;
  border-bottom: 1px solid #e4e7ec;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 9px 12px;
}

.order-preview-line {
  border-bottom: 1px solid #eef0f5;
  padding: 10px 12px;
}

.order-preview-line:last-of-type {
  border-bottom: 0;
}

.order-preview-line strong {
  min-width: 0;
}

.order-preview-thumb {
  height: 42px;
  width: 42px;
}

.order-preview-lines-total {
  background: #f8fafc;
  border-top: 1px solid #e4e7ec;
  padding: 10px 12px;
}

.order-preview-lines-total strong {
  font-size: 18px;
}

.order-preview-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.order-preview-actions {
  border-top: 1px solid #eef0f5;
  padding-top: 12px;
}

@media (max-width: 900px) {
  .order-preview-dialog {
    width: calc(100vw - 24px);
  }

  .order-preview-head,
  .order-preview-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .order-preview-status-row,
  .order-preview-grid {
    grid-template-columns: 1fr;
  }

  .order-preview-lines-head {
    display: none;
  }

  .order-preview-line {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .order-preview-line > span,
  .order-preview-line > strong:last-child {
    grid-column: 2;
  }
}

/* Purchases: controlled supplier-order receiving dialog. */
.so-receive-backdrop {
  align-items: center;
  background: rgba(8, 15, 26, 0.58);
  display: flex;
  inset: 0;
  justify-content: center;
  overscroll-behavior: contain;
  padding: 24px;
  position: fixed;
  z-index: 1200;
}

.so-receive-dialog {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(8, 15, 26, 0.3);
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  width: min(980px, 100%);
}

.so-receive-head {
  align-items: flex-start;
  border-bottom: 1px solid #eaecf0;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 22px 14px;
}

.so-receive-head .eyebrow {
  color: #027a48;
}

.so-receive-head h2 {
  font-size: 20px;
  margin: 2px 0 4px;
}

.so-receive-head p {
  color: #667085;
  font-size: 13px;
  margin: 0;
  max-width: 720px;
}

.so-receive-close {
  align-items: center;
  background: transparent;
  border: 0;
  color: #667085;
  display: inline-flex;
  flex: 0 0 36px;
  font-size: 24px;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.so-receive-close:hover {
  background: #f2f4f7;
  color: #101828;
}

.so-receive-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px 22px;
}

.so-receive-fields label {
  color: #344054;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
  min-width: 0;
}

.so-receive-fields label small {
  color: #667085;
  font-size: 10px;
  font-weight: 500;
  min-height: 13px;
}

.so-receive-fields input,
.so-receive-fields select {
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 13px;
  height: 38px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.so-receive-toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 4px 22px 12px;
}

.so-receive-toolbar > div:first-child {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.so-receive-toolbar b {
  flex: 0 0 auto;
  font-size: 13px;
}

.so-receive-tip {
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
}

.so-receive-toolbar-actions,
.so-receive-footer-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.so-receive-error {
  margin: 0 22px 10px;
}

.so-receive-table-wrap {
  flex: 1 1 auto;
  min-height: 180px;
  overflow: auto;
  padding: 0 22px;
}

.so-receive-table {
  margin: 0;
  width: 100%;
}

.so-receive-table th {
  background: #ffffff;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 1;
}

.so-receive-table td {
  vertical-align: middle;
}

.so-receive-product {
  min-width: 260px;
}

.so-receive-stat,
.so-receive-qty-cell {
  white-space: nowrap;
}

.so-receive-table tr.is-full td {
  background: #f6fef9;
}

.so-receive-table tr.is-short td {
  background: #fffcf5;
}

.so-receive-table tr.is-skip td {
  background: #f9fafb;
  color: #667085;
}

.so-receive-hint {
  color: #b54708;
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
}

.so-receive-hint.muted {
  color: #667085;
}

.so-receive-hint.is-ready {
  color: #027a48;
}

.so-receive-footer {
  align-items: center;
  background: #f8fafc;
  border-top: 1px solid #eaecf0;
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 22px;
}

.so-receive-summary {
  color: #475467;
  font-size: 13px;
}

.so-receive-submit {
  font-weight: 800;
  min-width: 160px;
}

@media (max-width: 900px) {
  .so-receive-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .so-receive-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .so-receive-toolbar-actions {
    align-self: flex-end;
  }
}

@media (max-width: 900px) {
  .so-receive-backdrop {
    padding: 10px;
  }

  .so-receive-dialog {
    max-height: calc(100dvh - 20px);
  }

  .so-receive-head {
    padding: 14px 14px 12px;
  }

  .so-receive-fields,
  .so-receive-toolbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .so-receive-table-wrap {
    padding: 0 14px;
  }

  .so-receive-table,
  .so-receive-table tbody {
    display: block;
  }

  .so-receive-table thead {
    display: none;
  }

  .so-receive-table tr {
    border: 1px solid #d9dee7;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 10px;
    overflow: hidden;
    padding: 12px;
  }

  .so-receive-table td {
    background: transparent !important;
    border: 0;
    display: block;
    padding: 0;
    white-space: normal;
  }

  .so-receive-table td::before {
    color: #667085;
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 3px;
    text-transform: uppercase;
  }

  .so-receive-product,
  .so-receive-qty-cell {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .so-receive-footer {
    padding: 12px 14px;
  }
}

@media (max-width: 520px) {
  .so-receive-backdrop {
    padding: 0;
  }

  .so-receive-dialog {
    border: 0;
    border-radius: 0;
    height: 100dvh;
    max-height: 100dvh;
  }

  .so-receive-head h2 {
    font-size: 17px;
  }

  .so-receive-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .so-receive-fields label small {
    min-height: 0;
  }

  .so-receive-toolbar > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .so-receive-toolbar-actions {
    align-self: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .so-receive-toolbar-actions button {
    min-width: 0;
    white-space: normal;
  }

  .so-receive-table tr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .so-receive-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .so-receive-footer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }

  .so-receive-footer-actions button,
  .so-receive-submit {
    min-width: 0;
    width: 100%;
  }
}

.confirm-dialog-details {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
}

.supplier-payment-reallocation-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  max-width: 820px;
  overflow: hidden;
  width: min(820px, calc(100vw - 32px));
}

.supplier-payment-reallocation-dialog .eyebrow {
  color: var(--primary);
}

.supplier-payment-reallocation-dialog .confirm-dialog-details {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.supplier-payment-reallocation-dialog .generic-dialog-fields {
  flex: 0 0 auto;
  grid-template-columns: 1fr;
}

.supplier-payment-reallocation-dialog .generic-dialog-field textarea {
  min-height: 70px;
}

.supplier-payment-reallocation-dialog .generic-dialog-checkbox {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  cursor: pointer;
  padding: 9px 10px;
}

.supplier-payment-reallocation-dialog .generic-dialog-checkbox input,
.supplier-payment-reallocation-dialog .generic-dialog-checkbox span {
  cursor: pointer;
}

.supplier-payment-reallocation-dialog .confirm-dialog-actions {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  bottom: 0;
  margin: 0 -16px -16px;
  padding: 12px 16px;
  position: sticky;
  z-index: 2;
}

.supplier-payment-reallocation-dialog .confirm-dialog-actions .primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  min-width: 220px;
}

.supplier-payment-reallocation-dialog .confirm-dialog-actions .primary:disabled {
  background: #94a3b8;
  border-color: #94a3b8;
  box-shadow: none;
  color: #ffffff;
  opacity: 0.72;
}

.supplier-reallocation-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: 0;
  padding: 12px;
}

.supplier-reallocation-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-reallocation-summary section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.supplier-reallocation-summary section > span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  grid-column: 1 / -1;
  text-transform: uppercase;
}

.supplier-reallocation-summary .is-after {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.supplier-reallocation-summary .is-after.is-invalid {
  background: #fffbeb;
  border-color: #fbbf24;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.22);
}

.supplier-reallocation-summary .is-after.is-invalid strong {
  color: #475569;
}

.supplier-reallocation-summary div,
.supplier-reallocation-receipt-facts div {
  display: grid;
  gap: 3px;
}

.supplier-reallocation-summary small,
.supplier-reallocation-receipt-facts small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.supplier-reallocation-summary strong,
.supplier-reallocation-receipt-facts strong {
  color: #0f172a;
  font-size: 14px;
}

.supplier-reallocation-net-position {
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  margin: 0;
  padding: 10px 12px;
}

.supplier-reallocation-net-position.is-invalid {
  background: #fffbeb;
  border-color: #fbbf24;
  color: #92400e;
}

.supplier-reallocation-overall-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  padding: 9px 12px;
}

.supplier-reallocation-overall-error:empty {
  display: none;
}

.supplier-reallocation-receipts-shell {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 160px;
  overflow: hidden;
}

.supplier-reallocation-receipts-head {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
}

.supplier-reallocation-receipts-head strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.supplier-reallocation-receipts-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.supplier-reallocation-receipts {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  max-height: min(28vh, 270px);
  min-height: 0;
  overflow: auto;
  padding: 10px;
  scrollbar-color: rgba(37, 99, 235, 0.38) transparent;
  scrollbar-width: thin;
}

.supplier-reallocation-receipt {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.45fr) minmax(210px, 1.1fr) minmax(160px, 0.85fr) minmax(92px, 0.4fr);
  min-height: 82px;
  padding: 10px;
}

.supplier-reallocation-receipt.has-error {
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}

.supplier-reallocation-receipt-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.supplier-reallocation-receipt-main strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-reallocation-receipt-main span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
}

.supplier-reallocation-receipt-facts {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.supplier-reallocation-receipt-facts .is-debt strong {
  color: #b42318;
  font-size: 15px;
}

.supplier-reallocation-input {
  display: grid;
  gap: 6px;
}

.supplier-reallocation-input > span:first-child {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.supplier-reallocation-input-control {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  display: flex;
  min-height: 40px;
  overflow: hidden;
}

.supplier-reallocation-input-control:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 92, 255, 0.14);
}

.supplier-reallocation-input-control input {
  border: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-weight: 900;
  min-width: 0;
  outline: 0;
  padding: 9px 0 9px 10px;
  text-align: right;
  width: 100%;
}

.supplier-reallocation-input-control em {
  color: #64748b;
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 800;
  padding: 0 10px 0 6px;
}

.supplier-reallocation-limit-error {
  color: #b42318;
  font-size: 11px;
  font-weight: 800;
  min-height: 14px;
}

.supplier-reallocation-delta {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  justify-self: end;
  padding: 6px 9px;
  white-space: nowrap;
}

.supplier-reallocation-delta.positive {
  background: #dcfce7;
  color: #166534;
}

.supplier-reallocation-delta.negative {
  background: #fee2e2;
  color: #991b1b;
}

.supplier-reallocation-delta.neutral {
  background: #f1f5f9;
  color: #475569;
}

@media (max-width: 1080px) {
  .supplier-payment-reallocation-dialog {
    max-height: calc(100vh - 24px);
    width: min(820px, calc(100vw - 28px));
  }

  .supplier-payment-reallocation-dialog .generic-dialog-field textarea {
    min-height: 62px;
  }

  .supplier-reallocation-receipts {
    max-height: min(24vh, 220px);
  }

  .supplier-reallocation-receipt {
    grid-template-columns: 1fr;
  }

  .supplier-reallocation-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supplier-reallocation-summary section {
    gap: 7px;
    padding: 10px;
  }

  .supplier-reallocation-receipt {
    align-items: stretch;
    min-height: 0;
  }

  .supplier-reallocation-receipt-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .supplier-reallocation-delta {
    justify-self: start;
  }

  .supplier-finance-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.invoice-add-actions {
  align-items: flex-end;
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 190px;
}

.invoice-add-actions strong {
  color: var(--accent-dark);
  font-size: 13px;
  text-align: right;
}

.order-edit-catalog-entry {
  align-items: center;
  background: #f7f8ff;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
  padding: 10px 12px;
  position: relative;
  z-index: 3;
}

.order-edit-catalog-entry div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-edit-catalog-entry span {
  color: var(--muted);
  font-size: 12px;
}

.order-edit-add,
.order-edit-add-unified {
  display: none !important;
}

.invoice-add-panel .order-product-add-unified {
  display: none !important;
}

.order-catalog-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  inset: 0;
  justify-items: center;
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 14px;
  position: fixed;
  z-index: 1250;
}

.order-catalog-dialog {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: min(900px, calc(100dvh - 28px));
  max-height: calc(100dvh - 28px);
  max-width: 1660px;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  width: min(1660px, calc(100vw - 28px));
}

body.order-catalog-open {
  overflow: hidden;
}

.order-catalog-header,
.order-catalog-header-actions,
.order-catalog-toolbar,
.order-catalog-section-head,
.order-catalog-cart-head,
.order-catalog-pagination,
.order-catalog-pagination > div {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.order-catalog-header {
  border-bottom: 1px solid #eef0f5;
  padding-bottom: 10px;
}

.order-catalog-header h2 {
  font-size: 23px;
  letter-spacing: 0;
  margin: 2px 0 3px;
}

.order-catalog-header p,
.order-catalog-cart-head p {
  color: var(--muted);
  margin: 0;
}

.order-catalog-message-slot:empty {
  display: block;
  min-height: 0;
}

.order-catalog-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 260px) minmax(520px, 1fr) minmax(310px, 360px);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.order-catalog-sidebar,
.order-catalog-main,
.order-catalog-cart-panel {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  min-height: 0;
  min-width: 0;
}

.order-catalog-sidebar,
.order-catalog-cart-panel {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 12px;
}

.order-catalog-main {
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 12px;
}

.order-catalog-main > .order-catalog-toolbar {
  grid-row: 1;
}

.order-catalog-main > [data-order-catalog-results] {
  display: grid;
  gap: 12px;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.order-recommendations-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe5ff;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.order-recommendations-panel.compact {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border-color: #fb923c;
  box-shadow: inset 4px 0 0 #f97316, 0 12px 28px rgba(249, 115, 22, 0.08);
  margin: 12px 14px 0;
  padding: 14px;
}

.order-recommendations-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.order-recommendations-head h3 {
  font-size: 16px;
  margin: 2px 0 3px;
}

.order-recommendations-head p,
.order-recommendations-empty {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.order-recommendations-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  min-width: 0;
}

.order-recommendations-panel.compact .order-recommendations-grid {
  grid-auto-columns: minmax(230px, calc((100% - 24px) / 4));
  grid-auto-flow: column;
  grid-template-columns: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
}

.order-recommendations-panel.compact .order-recommendation-card {
  scroll-snap-align: start;
}

.order-catalog-recommendations-panel .order-recommendations-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-height: 188px;
  overflow: auto;
  padding-right: 2px;
}

.order-recommendation-card {
  align-items: start;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 108px;
  min-width: 0;
  padding: 9px;
  position: relative;
}

.order-recommendation-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.order-recommendation-card .product-corner-link {
  left: 34px;
  right: auto;
  top: 6px;
}

.order-recommendation-thumb {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  overflow: hidden;
  width: 46px;
}

.order-recommendation-thumb img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.order-recommendation-thumb > span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.order-recommendation-body {
  align-self: stretch;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-recommendation-body strong {
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.22;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.order-recommendation-body small {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-recommendation-body small {
  color: var(--muted);
  font-size: 11px;
}

.order-recommendation-meta,
.order-recommendation-reasons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.order-recommendation-meta > span:first-child {
  font-weight: 800;
}

.order-recommendation-reasons span {
  background: #eef2ff;
  border: 1px solid #dbe5ff;
  border-radius: 999px;
  color: #3730a3;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 6px;
}

.order-recommendation-card .primary.small {
  grid-column: 2;
  justify-self: start;
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.order-lines-workspace .order-recommendation-body strong {
  font-size: 15px;
}

.order-lines-workspace .order-recommendation-body small {
  font-size: 13px;
}

.order-lines-workspace .order-recommendation-reasons span {
  font-size: 12px;
}

.order-lines-workspace .order-recommendation-card .primary.small {
  font-size: 15px;
  min-height: 36px;
  padding: 0 12px;
}

.order-catalog-search input {
  margin-top: 6px;
}

.order-catalog-filter-section {
  border-top: 1px solid #eef0f5;
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.order-catalog-category-list {
  display: grid;
  gap: 6px;
  max-height: 390px;
  overflow: auto;
}

.order-catalog-category-list button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  color: #101828;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 34px;
  padding: 7px 8px 7px calc(8px + var(--category-level, 0) * 12px);
  text-align: left;
}

.order-catalog-category-list button.active {
  background: #f4f3ff;
  border-color: #a78bfa;
  box-shadow: inset 3px 0 0 #6d5dfc;
  color: #4338ca;
  font-weight: 800;
}

.order-catalog-category-list span,
.order-catalog-card h3,
.order-catalog-cart-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-catalog-category-list span,
.order-catalog-cart-info strong {
  white-space: nowrap;
}

.order-catalog-category-list strong {
  color: #667085;
  font-size: 11px;
}

.order-catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-catalog-tabs button {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  font: inherit;
  min-height: 34px;
  padding: 0 11px;
}

.order-catalog-tabs button.active,
.order-catalog-pagination button.active {
  background: #f4f3ff;
  border-color: #a78bfa;
  color: #4f46e5;
  font-weight: 800;
}

.order-catalog-grid {
  align-content: start;
  display: grid;
  gap: 10px;
  grid-auto-rows: minmax(300px, auto);
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  min-height: 0;
  overflow: auto;
  padding-right: 3px;
}

.order-catalog-card {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  grid-template-rows: 84px minmax(148px, 1fr) auto;
  min-height: 300px;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.order-catalog-card:hover {
  border-color: #a78bfa;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.12);
}

.order-catalog-card.in-cart {
  border-color: #4f46e5;
  box-shadow: inset 0 0 0 1px #4f46e5, 0 12px 28px rgba(79, 70, 229, 0.12);
}

.order-catalog-card.stock-problem {
  border-color: #fbbf24;
}

.order-catalog-card.stock-problem:hover {
  border-color: #f59e0b;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.16);
}

.order-catalog-quick-add {
  align-items: center;
  background: #4f46e5;
  border: 1px solid #4338ca;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.25);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
  z-index: 2;
}

.order-catalog-card.in-cart .order-catalog-quick-add {
  background: #16a34a;
  border-color: #12823d;
}

.product-corner-link {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7def0;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  color: #4f46e5;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  opacity: 0.88;
  position: absolute;
  right: 6px;
  top: 6px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
  width: 24px;
  z-index: 3;
}

.product-corner-link:hover,
.product-corner-link:focus-visible {
  border-color: #4f46e5;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.18);
  opacity: 1;
  outline: none;
  transform: translateY(-1px);
}

.order-catalog-card .product-corner-link {
  right: 46px;
  top: 9px;
}

.order-catalog-card-media {
  align-items: center;
  background: #f8fafc;
  color: #667085;
  display: flex;
  font-size: 34px;
  font-weight: 800;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.order-catalog-card-media img {
  height: 100%;
  object-fit: contain;
  padding: 6px;
  width: 100%;
}

.order-catalog-card-body {
  align-content: start;
  display: grid;
  gap: 5px;
  min-height: 0;
  padding: 8px 10px 9px;
}

.order-catalog-card h3 {
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.3;
  margin: 0 0 2px;
  min-height: 34px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-catalog-card p,
.order-catalog-card-meta,
.order-catalog-price-row span,
.order-catalog-cart-info small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.order-catalog-card-meta,
.order-catalog-price-row {
  display: grid;
  gap: 3px;
}

.order-catalog-card-meta {
  align-content: start;
  min-height: 43px;
}

.order-catalog-card-meta > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-catalog-stock {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  padding: 4px 7px;
  width: fit-content;
}

.order-catalog-stock.success {
  background: #ecfdf3;
  color: #067647;
}

.order-catalog-stock.warning {
  background: #fffaeb;
  color: #b54708;
}

.order-catalog-stock.danger {
  background: #fef3f2;
  color: #b42318;
}

.order-catalog-price-row strong {
  color: #0f172a;
  display: block;
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  white-space: normal;
}

.order-catalog-price-row span {
  font-weight: 700;
}

.order-catalog-cart-badge {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  justify-self: start;
  padding: 4px 8px;
}

.order-catalog-card-actions {
  align-items: center;
  align-self: end;
  background: #ffffff;
  border-top: 1px solid #eef0f5;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(86px, 0.85fr) minmax(88px, 1fr);
  padding: 7px 9px;
}

.order-catalog-card-actions .primary.small {
  font-size: 12px;
  line-height: 1.15;
  min-height: 32px;
  padding: 5px 8px;
  white-space: normal;
  width: 100%;
}

.order-catalog-stepper {
  align-items: center;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 24px minmax(34px, 1fr) 24px;
  min-height: 32px;
  overflow: hidden;
}

.order-catalog-stepper button {
  background: #ffffff;
  border: 0;
  color: #4f46e5;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 30px;
}

.order-catalog-stepper input {
  appearance: textfield;
  border: 0;
  border-left: 1px solid #e4e7ec;
  border-right: 1px solid #e4e7ec;
  height: 30px;
  min-width: 0;
  padding: 0 4px;
  text-align: center;
}

.order-catalog-stepper input::-webkit-outer-spin-button,
.order-catalog-stepper input::-webkit-inner-spin-button,
.order-catalog-cart-controls input[type="number"]::-webkit-outer-spin-button,
.order-catalog-cart-controls input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.order-catalog-cart-controls input[type="number"] {
  appearance: textfield;
}

.order-catalog-cart-panel {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
}

.order-catalog-cart-list {
  align-content: start;
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.order-catalog-cart-row {
  align-items: start;
  align-self: start;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  display: grid;
  gap: 6px 8px;
  grid-template-columns: 34px minmax(0, 1fr) max-content;
  height: max-content;
  padding: 7px;
  padding-right: 30px;
  position: relative;
}

.order-catalog-cart-thumb {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  color: #667085;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  width: 34px;
}

.order-catalog-cart-thumb img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.order-catalog-cart-info,
.order-catalog-cart-controls,
.order-catalog-cart-sum {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-catalog-cart-info {
  align-self: start;
}

.order-catalog-cart-info strong {
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.22;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-catalog-cart-info small {
  font-size: 10.5px;
}

.order-catalog-cart-info .order-catalog-stock {
  font-size: 10px;
  padding: 2px 6px;
}

.order-catalog-cart-controls {
  align-items: end;
  grid-column: 2 / 4;
  grid-row: 2;
  grid-template-columns: 82px 92px;
  justify-content: start;
  justify-self: start;
  max-width: 184px;
  width: max-content;
}

.order-catalog-cart-controls label {
  color: #667085;
  display: grid;
  font-size: 11px;
  gap: 3px;
  min-width: 0;
}

.order-catalog-cart-row .order-catalog-stepper {
  grid-template-columns: 24px 34px 24px;
  min-height: 28px;
  width: 82px;
}

.order-catalog-cart-row .order-catalog-stepper button {
  min-height: 26px;
}

.order-catalog-cart-row .order-catalog-stepper input {
  height: 26px;
}

.order-catalog-cart-controls input[data-order-catalog-cart-price] {
  font-size: 12px;
  min-height: 28px;
  padding: 3px 5px;
  text-align: right;
  width: 92px;
}

.order-catalog-cart-sum {
  align-self: start;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  justify-items: end;
  min-width: 76px;
  text-align: right;
}

.order-catalog-cart-sum strong {
  font-size: 12px;
  white-space: nowrap;
}

.order-catalog-cart-sum .link-button {
  font-size: 11px;
  padding: 0;
}

.order-catalog-summary {
  border-top: 1px solid #eef0f5;
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.order-catalog-summary > div:not(.order-catalog-warning) {
  display: flex;
  justify-content: space-between;
}

.order-catalog-summary .total {
  color: #4f46e5;
  font-size: 17px;
  font-weight: 800;
}

.order-catalog-warning {
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
  color: #b42318;
  font-size: 12px;
  line-height: 1.35;
  padding: 8px;
}

.order-catalog-empty,
.order-catalog-no-results {
  align-self: start;
  background: #f8fafc;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  color: #667085;
  margin: 0;
  padding: 14px;
}

.order-catalog-no-results {
  grid-column: 1 / -1;
}

.order-catalog-commit {
  width: 100%;
}

.order-catalog-pagination {
  border-top: 1px solid #eef0f5;
  color: #667085;
  flex-wrap: wrap;
  font-size: 12px;
  padding-top: 10px;
}

.order-catalog-page-gap {
  color: #667085;
  padding: 0 4px;
}

.confirm-dialog-actions {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  padding-top: 12px;
}

.journal-payment-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.journal-payment-head h2 {
  margin-top: 2px;
}

.journal-payment-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.journal-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.compact-notice {
  margin: 0;
}

.audit-panel {
  display: grid;
  gap: 14px;
  overflow: auto;
}

.audit-filter-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(130px, 0.55fr) minmax(130px, 0.55fr) auto;
}

.audit-filter-grid button {
  padding: 0 14px;
}

.audit-table {
  min-width: 920px;
}

.audit-table th:nth-child(1),
.audit-table td:nth-child(1) {
  width: 150px;
}

.audit-table th:nth-child(2),
.audit-table td:nth-child(2) {
  width: 130px;
}

.audit-table th:nth-child(3),
.audit-table td:nth-child(3) {
  width: 130px;
}

.customer-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.customer-list,
.customer-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.customer-list {
  position: sticky;
  top: 16px;
}

.customer-list-items {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.customer-group-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.customer-history-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-group-filter-row::-webkit-scrollbar {
  display: none;
}

.customer-group-chip {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
}

.customer-group-chip small {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
}

.customer-group-chip.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.customer-segment-banner {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 10px;
}

.customer-segment-banner span {
  color: var(--muted);
  font-size: 12px;
}

.customer-group-manager-open {
  align-items: center;
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.customer-group-manager-open span {
  background: #eef4ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
}

.customer-group-manager-dialog {
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  width: min(940px, calc(100vw - 32px));
}

.group-manager {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.group-manager-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.group-manager-head span {
  color: var(--muted);
  font-size: 12px;
}

.group-manager-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
}

.group-manager-grid label {
  display: grid;
  gap: 4px;
}

.group-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-manager-create-action {
  align-items: end;
  display: flex;
}

.group-manager-note {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.customer-group-admin-list {
  display: grid;
  gap: 8px;
}

.customer-group-admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 8px;
}

.customer-group-admin-head {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
}

.customer-group-admin-title {
  all: unset;
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-group-admin-title strong {
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-group-admin-title span {
  color: var(--muted);
  font-size: 12px;
}

.customer-group-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-group-member-list {
  display: grid;
  gap: 5px;
}

.customer-group-member {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.customer-group-member .link-button {
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-row {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.customer-row-main {
  all: unset;
  cursor: pointer;
  min-width: 0;
}

.customer-row-main span {
  display: block;
  min-width: 0;
}

.customer-row:hover,
.customer-row.active {
  background: #eef8f1;
}

.customer-row.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.customer-row small,
.customer-row-money small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-unified-documents {
  grid-column: 1 / -1;
}

.unified-document-list {
  display: grid;
  gap: 8px;
}

.unified-document-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(128px, 0.55fr) minmax(0, 1.4fr) minmax(130px, 0.55fr);
  padding: 10px;
}

.unified-document-row:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.unified-document-type,
.unified-document-main,
.unified-document-side {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.unified-document-main strong,
.unified-document-main span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.unified-document-type small,
.unified-document-main span,
.unified-document-side small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.unified-document-side {
  justify-items: end;
  text-align: right;
}

.unified-document-side small.warning {
  color: #a15c00;
}

.unified-document-side small.success {
  color: #047857;
}

.unified-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.customer-row-group,
.customer-row-meta {
  color: #1d4ed8 !important;
}

.customer-row-money {
  align-items: end;
  display: grid;
  gap: 4px;
  text-align: right;
}

.customer-row-type-select {
  background: #fff;
  border: 1px solid #f0b76b;
  border-radius: 6px;
  color: #92400e;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  max-width: 132px;
  min-height: 30px;
  padding: 4px 6px;
}

.customer-money-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  padding: 3px 8px;
  white-space: nowrap;
}

.customer-money-badge.debt {
  background: #fff7ed;
  color: #9a3412;
}

.customer-money-badge.credit {
  background: #ecfdf5;
  color: #047857;
}

.tiny-button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
}

.customer-stats {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.customer-card-hero {
  gap: 12px;
}

.customer-vitals {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px 14px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  padding: 11px 13px;
}

.customer-vitals > span {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  gap: 3px;
  min-width: 0;
}

.customer-vitals > span strong {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.customer-vitals-fading {
  color: #9a3412;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.customer-reliability.success strong {
  color: #166534;
}

.customer-reliability.info strong {
  color: #1d4ed8;
}

.customer-reliability.warning strong {
  color: #9a3412;
}

.customer-reliability.danger strong {
  color: #b42318;
}

.customer-reliability-details {
  color: var(--muted);
  font-size: 11px;
  grid-column: 1 / -1;
  line-height: 1.4;
}

.customer-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.customer-card-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.customer-metric-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 6px;
  min-height: 112px;
  min-width: 0;
  padding: 14px 16px;
  text-align: left;
}

.customer-metric-card:hover,
.customer-metric-card.active {
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.customer-metric-card.active {
  box-shadow: inset 0 0 0 1px #7da7f7, 0 10px 22px rgba(15, 23, 42, 0.06);
}

.customer-metric-card span,
.customer-metric-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.customer-metric-card strong {
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1;
}

.customer-metric-card.danger {
  background: #fff7f7;
  border-color: #fecaca;
}

.customer-metric-card.danger strong {
  color: #dc2626;
}

.customer-metric-card.success strong {
  color: #16a34a;
}

.customer-card-drilldown {
  background: #fff;
}

.customer-card-drilldown .panel-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 0;
}

.customer-document-cards {
  display: grid;
  gap: 10px;
}

.customer-document-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 12px 14px;
}

.customer-document-card strong,
.customer-document-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-document-card strong {
  color: var(--ink);
  font-size: 15px;
}

.customer-document-card small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.customer-document-card > span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.customer-reconciliation-panel {
  display: grid;
  gap: 14px;
}

.customer-reconciliation-filters {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(140px, 1fr)) auto;
}

.customer-reconciliation-filters label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.customer-reconciliation-filters input {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  min-height: 36px;
  padding: 7px 9px;
}

.customer-reconciliation-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.customer-reconciliation-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-reconciliation-summary > div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
}

.customer-reconciliation-summary span,
.customer-reconciliation-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-reconciliation-summary strong {
  font-size: 18px;
}

.customer-reconciliation-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.customer-reconciliation-table {
  min-width: 720px;
}

.customer-reconciliation-table th,
.customer-reconciliation-table td {
  vertical-align: top;
}

.customer-reconciliation-table .amount {
  text-align: right;
  white-space: nowrap;
}

.customer-reconciliation-table td strong,
.customer-reconciliation-table td small {
  display: block;
}

.customer-reconciliation-table td small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.customer-shortcuts {
  display: grid;
  gap: 10px;
}

.customer-shortcuts > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.customer-shortcuts > div {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.customer-shortcut-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 4px;
  min-height: 72px;
  min-width: 0;
  padding: 12px 14px;
  text-align: left;
}

.customer-shortcut-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.customer-shortcut-card.active {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.customer-shortcut-card strong,
.customer-shortcut-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-shortcut-card small {
  color: var(--muted);
  font-size: 12px;
}

.customer-delete-link {
  justify-self: center;
  margin-top: 4px;
}

.customer-pay-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 1fr) auto;
}

.customer-pay-compact {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.customer-pay-compact div {
  display: grid;
  gap: 3px;
}

.customer-pay-compact span {
  color: var(--muted);
  font-size: 13px;
}

.customer-pay-main {
  display: grid;
  gap: 8px;
}

.customer-payment-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.draft-note-line {
  grid-column: 1 / -1;
}

.order-note-box,
.document-note {
  background: #fffdf5;
  border: 1px solid #ead79a;
  border-radius: 8px;
  color: #5f4600;
  padding: 10px 12px;
}

.order-note-box {
  display: grid;
  gap: 4px;
}

.order-note-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.document-note {
  margin: 10px 0;
}

.product-master-section,
.bundle-editor,
.bundle-info {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 12px;
}

.bundle-component-picker {
  display: grid;
  gap: 6px;
  min-width: 320px;
}

.bundle-component-results {
  max-height: 260px;
  overflow: auto;
}

.bundle-breakdown {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 2px;
  margin-top: 6px;
}

.sku-fix-dialog {
  max-width: 880px;
}

.sku-fix-product-card {
  align-items: center;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  padding: 10px;
}

.sku-fix-product-card img {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 72px;
  object-fit: contain;
  width: 72px;
}

.sku-fix-create-form {
  margin-top: 0;
}

.sku-fix-package-picker {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 12px;
}

.sku-fix-package-results {
  max-height: 260px;
  overflow: auto;
}

.sku-fix-selected-base {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #14532d;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.sku-fix-selected-base span,
.sku-fix-selected-base small {
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
}

.sku-fix-mode-switch {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sku-fix-existing-tools {
  display: grid;
  gap: 10px;
}

.sku-fix-kind-filter {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sku-fix-kind-filter button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  min-height: 34px;
  padding: 6px 10px;
}

.sku-fix-kind-filter button:hover,
.sku-fix-kind-filter button.active {
  background: #eef8f1;
  border-color: var(--accent);
  color: var(--accent-dark);
}

.sku-fix-existing-results {
  max-height: 300px;
}

.sku-fix-product-identity {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.sku-fix-kind-badge {
  background: #eef2f6;
  border: 1px solid #d5dce5;
  border-radius: 999px;
  color: #344054;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  padding: 3px 7px;
  width: fit-content;
}

.sku-fix-kind-badge.kind-package {
  background: #fff8e6;
  border-color: #ead7a2;
  color: #765b12;
}

.sku-fix-kind-badge.kind-bundle {
  background: #edf6ff;
  border-color: #bfd8ef;
  color: #175b8f;
}

.sku-fix-kind-badge.is-inactive {
  background: #fff1f0;
  border-color: #f0c4c0;
  color: #a32a22;
}

.sku-fix-product-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.sku-fix-product-result .product-result-stock {
  display: grid;
  gap: 2px;
}

.sku-fix-existing-selection {
  background: #f4fbf6;
  border: 1px solid #b9dbc3;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.sku-fix-existing-selection.is-empty {
  background: #f8faf9;
  border-color: var(--line);
  color: var(--muted);
  gap: 3px;
}

.sku-fix-existing-selection > small,
.sku-fix-existing-selection.is-empty small,
.sku-fix-existing-components > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.sku-fix-existing-selection-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.sku-fix-existing-selection-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sku-fix-existing-selection-head > div > span,
.sku-fix-existing-components > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sku-fix-existing-selection-head strong,
.sku-fix-existing-component span {
  overflow-wrap: anywhere;
}

.sku-fix-existing-components {
  border-top: 1px solid #d6e8dc;
  display: grid;
  gap: 7px;
  padding-top: 10px;
}

.sku-fix-existing-component {
  align-items: baseline;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.sku-fix-existing-component > strong {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .sku-fix-mode-switch,
  .sku-fix-kind-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 440px) {
  .sku-fix-product-result {
    grid-template-columns: minmax(0, 1fr);
  }

  .sku-fix-product-result .product-result-stock {
    align-items: baseline;
    display: flex;
    gap: 6px;
    min-width: 0;
    text-align: left;
  }

  .sku-fix-existing-selection-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .sku-fix-existing-component {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }
}

.suggest-chip {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 28px;
  padding: 4px 9px;
}

.suggest-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.suggest-chip.active {
  background: #e7f0ff;
  border-color: #7da7f7;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #7da7f7;
}

.suggest-chip.total {
  background: #fff2d6;
  border-color: #f4c45f;
  color: #8a4b00;
}

.suggest-chip.total.active {
  background: #ffe8a8;
  border-color: #d89a00;
  color: #7a3f00;
}

.selected-payment-sum {
  align-items: center;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 28px;
}

.customer-card-section {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.customer-overview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-overview-grid > div {
  background: #fff;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}

.customer-overview-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.customer-overview-grid strong,
.customer-overview-grid small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-overview-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.customer-card-actions,
.customer-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.customer-danger-zone {
  align-items: center;
  background: #fff7f7;
  border: 1px solid #fecaca;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr) auto;
  padding: 10px;
}

.customer-danger-zone span {
  color: #991b1b;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.customer-danger-target {
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 8px;
  min-width: 0;
  padding: 8px 10px;
}

.customer-danger-target span {
  color: #991b1b;
  font-size: 10px;
  letter-spacing: 0;
  margin: 0 0 3px;
  text-transform: uppercase;
}

.customer-danger-target strong,
.customer-danger-target small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-danger-target strong {
  color: #111827;
  font-size: 14px;
}

.customer-danger-target small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
}

.customer-activity-stream {
  display: grid;
  gap: 8px;
}

.customer-activity-item {
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px;
}

.customer-activity-item p {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  margin: 4px 0;
  white-space: pre-wrap;
}

.customer-activity-item small {
  color: var(--muted);
  font-size: 12px;
}

.customer-empty-state {
  align-items: start;
  color: var(--muted);
  display: grid;
  gap: 4px;
  padding: 16px;
}

.customer-empty-state strong {
  color: var(--ink);
  font-size: 18px;
}

.warning-text {
  color: #a15c00;
}

.customer-edit-form {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
}

.customer-edit-form .customer-phone-editor,
.customer-contact-editor,
.customer-legal-editor,
.customer-internal-note-field,
.customer-requisites-field {
  grid-column: 1 / -1;
}

.customer-edit-actions,
.customer-danger-zone {
  grid-column: 1 / -1;
}

.customer-internal-note-field textarea {
  min-height: 78px;
  resize: vertical;
}

.customer-requisites-field textarea {
  min-height: 110px;
  resize: vertical;
}

.customer-internal-note-field small {
  color: var(--muted);
  font-size: 12px;
}

.customer-internal-note-badge {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 7px;
  vertical-align: middle;
  white-space: nowrap;
}

.customer-business-type-badge {
  align-items: center;
  background: #eef4ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 4px;
  max-width: 190px;
  min-height: 20px;
  overflow: hidden;
  padding: 2px 7px;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.customer-internal-note-alert {
  align-items: start;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  color: #7c2d12;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 12px 14px;
}

.order-customer-note-card {
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.order-customer-note-card.is-empty {
  background: #fffbeb;
  border-color: #fde68a;
}

.order-customer-note-card > button {
  align-self: center;
  white-space: nowrap;
}

.customer-internal-note-alert.compact {
  margin: 10px 0;
  padding: 10px 12px;
}

.customer-internal-note-alert span,
.customer-internal-note-alert small {
  color: #9a3412;
  display: block;
  font-size: 12px;
}

.customer-internal-note-alert strong {
  color: #431407;
  display: block;
  font-size: 15px;
  line-height: 1.35;
  margin-top: 3px;
  white-space: pre-wrap;
}

.customer-internal-note-icon {
  align-items: center;
  background: #f97316;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.site-request-customer-note-editor {
  background: #fff7ed;
  border-color: #fdba74;
  border-left: 4px solid #f97316;
  gap: 10px;
  margin: 10px 0;
  padding: 10px 12px;
}

.site-request-customer-note-head {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.site-request-customer-note-head span,
.site-request-customer-note-head small {
  color: #9a3412;
  display: block;
  font-size: 11px;
  font-weight: 800;
}

.site-request-customer-note-head strong {
  color: #431407;
  display: block;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 2px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.site-request-customer-note-editor.is-empty {
  background: #fffaf0;
}

.site-request-customer-note-head > button {
  justify-self: end;
}

.site-request-customer-note-editor textarea {
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #431407;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 58px;
  padding: 8px 10px;
  resize: vertical;
  width: 100%;
}

.site-request-customer-note-editor textarea:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.18);
  outline: none;
}

.site-request-customer-note-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.site-request-customer-note-actions small {
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
}

.customer-phone-editor {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.customer-contact-editor {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.customer-legal-editor {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
}

.customer-legal-rows {
  display: grid;
  gap: 8px;
}

.customer-legal-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(110px, 0.7fr) minmax(180px, 1.45fr) minmax(130px, 0.75fr) minmax(150px, 1fr) minmax(130px, 0.85fr) auto auto auto;
  min-width: 0;
  padding: 8px;
}

.customer-legal-row.is-inactive {
  opacity: 0.68;
}

.customer-legal-row > * {
  min-width: 0;
}

.customer-legal-toggle {
  align-items: center;
  display: inline-flex;
  flex-direction: row;
  font-size: 12px;
  gap: 5px;
  white-space: nowrap;
}

.customer-legal-toggle input {
  margin: 0;
  min-height: auto;
  width: auto;
}

.customer-legal-summary {
  white-space: pre-line;
}

.customer-contact-rows {
  display: grid;
  gap: 7px;
}

.customer-contact-row {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) auto;
  min-width: 0;
}

.customer-contact-row > * {
  min-width: 0;
}

.customer-phone-editor > * {
  min-width: 0;
}

.customer-phone-editor-head {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  width: 100%;
}

.customer-phone-editor-head > div {
  min-width: 0;
}

.customer-phone-editor-head strong,
.customer-phone-editor-head span {
  display: block;
}

.customer-phone-editor-head span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.customer-phone-rows {
  display: grid;
  gap: 7px;
}

.customer-phone-row {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: 82px minmax(112px, 1fr) minmax(86px, 0.55fr) auto;
  min-width: 0;
  width: 100%;
}

.customer-phone-row input,
.customer-phone-row button,
.customer-phone-primary {
  font-size: 12px;
  min-width: 0;
}

.customer-phone-row input {
  padding-left: 7px;
  padding-right: 7px;
}

.customer-phone-row input[data-customer-phone-value] {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.customer-phone-row .danger-button {
  padding-left: 7px;
  padding-right: 7px;
}

.customer-phone-primary {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.customer-phone-primary input {
  width: auto;
}

.customer-phone-primary span {
  border-radius: 999px;
  padding: 2px 6px;
}

.customer-phone-primary.is-primary span {
  background: #ecfdf3;
  color: #067647;
  font-weight: 800;
}

.customer-phone-primary.is-extra span {
  background: #f2f4f7;
  color: #475467;
  font-weight: 700;
}

.customer-sections {
  display: grid;
  gap: 18px;
}

.customer-payment-allocation {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.customer-payment-allocation strong {
  color: var(--accent-dark);
}

.customer-payment-allocation small,
.customer-payment-timing {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.customer-payment-timing b {
  color: #344054;
  font-weight: 700;
}

.customer-payment-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.customer-payment-table {
  min-width: 880px;
}

.customer-payment-advance {
  background: #fff2d6;
  border: 1px solid #f4c45f;
  color: #8a4b00;
  font-weight: 700;
  white-space: nowrap;
}

.customer-payment-editor {
  background: #f8fafc;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin-top: 12px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  scroll-margin-block-start: 18px;
}

.customer-payment-editor.is-open {
  border-color: #84adff;
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.12);
  outline: none;
}

.customer-payment-editor-head,
.customer-payment-editor-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.customer-payment-editor-head strong {
  display: block;
  font-size: 16px;
}

.customer-payment-editor-head span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.customer-payment-editor-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-payment-editor-grid > label {
  min-width: 0;
}

.customer-payment-editor-grid input,
.customer-payment-editor-grid select {
  min-width: 0;
  width: 100%;
}

.customer-payment-editor [hidden] {
  display: none !important;
}

.customer-payment-editor-note {
  grid-column: 1 / -1;
}

.customer-payment-editor-list {
  display: grid;
  gap: 10px;
}

.customer-payment-editor-allocation-head {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.customer-payment-editor-allocation-head > div {
  min-width: 0;
}

.customer-payment-editor-allocation-head strong,
.customer-payment-editor-allocation-head span {
  display: block;
}

.customer-payment-editor-allocation-head span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.customer-payment-editor-doc {
  align-items: center;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 24px minmax(0, 1fr) 150px;
  padding: 12px;
}

.customer-payment-editor-doc.active {
  background: #ecfdf3;
  border-color: #86efac;
}

.customer-payment-editor-doc-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.customer-payment-editor-doc-main strong,
.customer-payment-editor-doc-main span,
.customer-payment-editor-doc-main small {
  min-width: 0;
}

.customer-payment-editor-doc-main span,
.customer-payment-editor-doc-main small {
  color: var(--muted);
}

.customer-payment-editor-doc-toggle {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: center;
}

.customer-payment-editor-doc-toggle input {
  accent-color: var(--accent);
  height: 18px;
  margin: 0;
  width: 18px;
}

.customer-payment-editor-doc-amount {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 5px;
}

.customer-payment-editor-doc-amount input {
  font-size: 15px;
  font-weight: 800;
  text-align: right;
}

.customer-payment-editor-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.customer-payment-editor-summary span {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.customer-payment-editor-summary small {
  color: var(--muted);
}

.customer-payment-editor-summary strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.customer-payment-editor-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-weight: 800;
  padding: 10px 12px;
}

.customer-payment-editor-warning.is-info {
  align-items: center;
  background: #eef4ff;
  border-color: #b2ccff;
  color: #1849a9;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.customer-payment-correction-history {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.customer-payment-correction-history span,
.customer-payment-correction-history small {
  color: var(--muted);
}

.customer-payment-correction-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.customer-payment-correction-details[open] summary {
  margin-bottom: 8px;
}

.customer-payment-correction-history {
  max-height: 180px;
  overflow: auto;
}

.customer-payment-correction-history > strong {
  font-size: 14px;
}

.customer-payment-correction-history div {
  border-top: 1px solid #eef2f7;
  display: grid;
  gap: 3px;
  padding-top: 8px;
}

.customer-payment-editor-actions-main {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.danger-link {
  color: #b42318;
}

.purchase-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 360px) minmax(540px, 1fr);
  margin-bottom: 16px;
}

.purchase-layout.single {
  grid-template-columns: minmax(0, 1fr);
}

.purchase-history {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 1fr);
}

.purchase-history.has-selection {
  grid-template-columns: minmax(320px, 0.8fr) minmax(520px, 1.2fr);
}

.purchase-stage {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.supplier-form,
.purchase-form {
  display: grid;
  gap: 12px;
}

.purchase-head {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.55fr) minmax(160px, 1fr);
}

.purchase-line-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(90px, 0.35fr) minmax(100px, 0.4fr) auto;
}

.purchase-catalog-launcher {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.purchase-catalog-launcher div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.purchase-catalog-launcher strong {
  color: var(--ink);
  font-size: 15px;
}

.purchase-catalog-launcher span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

#purchase-form .purchase-line-form,
#purchase-edit-form .purchase-line-form {
  display: none;
}

.purchase-product-picker {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.purchase-product-picker button {
  min-height: 38px;
}

.section-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.purchase-price-hint {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 10px 12px;
}

.purchase-price-hint span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-price-hint strong {
  color: var(--ink);
}

.supplier-row,
[data-select-purchase-receipt] {
  cursor: pointer;
}

.supplier-row:hover td,
[data-select-purchase-receipt]:hover td {
  background: #f4fbf6;
}

.purchase-receipt-detail {
  min-width: 0;
}

.supplier-finance-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.supplier-finance-summary-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.supplier-finance-summary-row div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
}

.supplier-finance-summary-row div.payable {
  background: #fffbeb;
  border-color: #fde68a;
}

.supplier-finance-summary-row div.advance {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.supplier-finance-summary-row div.settled {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.supplier-finance-summary-row span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.supplier-finance-summary-row strong {
  color: #0f172a;
  font-size: 15px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.supplier-finance-flow {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supplier-finance-flow span {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  padding: 7px 10px;
}

.supplier-stats {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.supplier-sections {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.supplier-ledger {
  min-width: 0;
  overflow: auto;
}

.supplier-ledger table {
  min-width: 980px;
}

.supplier-reconciliation-table th {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.supplier-reconciliation-table th.amount,
.supplier-reconciliation-table td.amount {
  text-align: right;
  white-space: nowrap;
}

.supplier-reconciliation-type {
  background: #f1f5f9;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  padding: 4px 8px;
}

.supplier-reconciliation-balance {
  min-width: 150px;
  white-space: nowrap;
}

.supplier-reconciliation-balance strong,
.supplier-reconciliation-balance small {
  display: block;
}

.supplier-reconciliation-balance small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  margin-top: 2px;
}

.supplier-reconciliation-balance.payable strong {
  color: #b45309;
}

.supplier-reconciliation-balance.advance strong {
  color: #047857;
}

.supplier-reconciliation-balance.settled strong {
  color: var(--primary);
}

.supplier-reconciliation-note {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #475569;
  display: -webkit-box;
  max-width: 240px;
  overflow: hidden;
}

@media (max-width: 1080px) {
  .supplier-finance-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.supplier-directory {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
}

.supplier-directory-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.supplier-directory-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.supplier-directory-head h2 {
  font-size: 28px;
  margin: 0;
}

.supplier-directory-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.supplier-directory-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px);
  padding: 12px;
}

.supplier-list-panel {
  overflow: hidden;
  padding: 0;
}

.supplier-directory-table {
  border: 0;
}

.supplier-directory-table th,
.supplier-directory-table td {
  padding: 12px 14px;
}

.supplier-directory-table td:first-child {
  min-width: 180px;
}

.supplier-table-footer {
  color: var(--muted);
  font-size: 12px;
  padding: 12px 14px;
}

.supplier-directory-card {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  position: sticky;
  top: 12px;
}

.supplier-directory-card.empty {
  min-height: 220px;
}

.supplier-card-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.supplier-card-head h2 {
  font-size: 20px;
  margin: 4px 0 0;
}

.supplier-card-fields {
  display: grid;
  gap: 12px;
}

.supplier-card-fields div {
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1fr);
}

.supplier-card-fields span {
  color: var(--muted);
}

.supplier-card-fields strong {
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.supplier-card-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  overflow: auto;
}

.supplier-card-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  padding: 10px 6px;
  white-space: nowrap;
}

.supplier-card-tabs button.active {
  border-bottom-color: var(--accent);
  color: var(--accent-dark);
}

.supplier-card-tab-body {
  min-width: 0;
  overflow: auto;
}

.supplier-card-receipts {
  min-width: 520px;
}

.supplier-card-document {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
}

.supplier-card-document span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.supplier-card-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.supplier-card-summary div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.supplier-card-summary span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.supplier-card-summary strong {
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

.supplier-card-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.supplier-edit-form,
.supplier-create-panel {
  display: grid;
  gap: 12px;
}

.supplier-edit-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-edit-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.supplier-documents-workspace {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
}

.supplier-documents-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.supplier-order-toolbar {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px) minmax(180px, 240px);
}

.purchase-receipt-toolbar {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 190px) minmax(190px, 260px);
}

.purchase-receipt-v2-kpis {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.purchase-receipts-workspace-v2 .supplier-order-editor-panel {
  overflow: visible;
}

.purchase-receipt-card-v2 .print-document {
  display: none;
}

.supplier-document-row {
  cursor: pointer;
}

.supplier-document-row:hover td {
  background: #f4fbf6;
}

.supplier-document-card {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  position: sticky;
  top: 12px;
}

.supplier-document-card h3 {
  font-size: 14px;
  margin: 0 0 8px;
}

.supplier-document-card.empty {
  min-height: 220px;
}

.supplier-document-note {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  line-height: 1.4;
  padding: 10px;
}

.supplier-document-actions {
  display: grid;
  gap: 10px;
}

.supplier-documents-workspace .supplier-list-panel {
  min-width: 0;
}

.supplier-documents-workspace .supplier-list-panel .procurement-table-shell {
  width: 100%;
}

.supplier-documents-workspace .supplier-directory-table {
  table-layout: fixed;
}

.supplier-documents-workspace .supplier-directory-table th,
.supplier-documents-workspace .supplier-directory-table td {
  overflow-wrap: anywhere;
}

.supplier-documents-workspace .supplier-directory-table th:last-child,
.supplier-documents-workspace .supplier-directory-table td:last-child {
  width: 86px;
  white-space: nowrap;
}

.supplier-documents-workspace .supplier-order-list-table {
  min-width: 980px;
}

.purchase-receipts-workspace-v2 .supplier-order-list-table {
  min-width: 940px;
}

.procurement-document-workspace {
  max-height: none;
  min-width: 0;
  overflow: visible;
  position: static;
}

.procurement-document-header {
  align-items: start;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 12px;
  position: sticky;
  top: 0;
  z-index: 8;
}

.procurement-document-title {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.procurement-document-title h2 {
  line-height: 1.1;
  margin: 0;
  overflow-wrap: anywhere;
}

.procurement-document-badges,
.procurement-document-header-actions,
.procurement-action-footer,
.procurement-sticky-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.procurement-document-header-actions {
  justify-content: flex-end;
}

.procurement-document-back {
  white-space: nowrap;
}

.procurement-action-menu {
  position: relative;
}

.procurement-action-menu summary {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.procurement-action-menu-list {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 6px;
  min-width: 230px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 15;
}

.procurement-action-menu-list > * {
  justify-content: flex-start;
  text-align: left;
  width: 100%;
}

.procurement-kpi-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  min-width: 0;
}

.procurement-kpi-strip > div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 10px 12px;
}

.procurement-kpi-strip span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.procurement-kpi-strip strong {
  color: var(--ink);
  display: block;
  font-size: 16px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.procurement-kpi-strip .attention {
  border-color: #fecaca;
  background: #fff7f7;
}

.procurement-kpi-strip.is-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.procurement-document-grid {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  min-width: 0;
}

.procurement-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.procurement-section.is-wide {
  grid-column: 1 / -1;
}

.procurement-section h3 {
  font-size: 14px;
  margin: 0;
}

.procurement-definition-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.procurement-definition-grid div {
  min-width: 0;
}

.procurement-definition-grid span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.procurement-definition-grid strong {
  color: var(--ink);
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.procurement-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.procurement-table-shell table {
  margin: 0;
  min-width: 760px;
  width: 100%;
}

.procurement-table-shell th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.procurement-product-cell {
  min-width: 220px;
  white-space: normal;
}

.procurement-action-footer,
.procurement-sticky-footer {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  bottom: 0;
  justify-content: flex-end;
  padding: 10px;
  position: sticky;
  z-index: 7;
}

.procurement-correction-workspace {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.procurement-correction-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 0.8fr);
  min-width: 0;
}

.procurement-correction-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.procurement-correction-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  position: sticky;
  top: 86px;
}

.procurement-correction-summary h3 {
  margin: 0;
}

.procurement-correction-review-workspace {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.procurement-review-header {
  grid-template-columns: auto minmax(0, 1fr);
}

.procurement-review-warning ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.procurement-review-impact-strip {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.procurement-review-section-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.procurement-review-section-head h3,
.procurement-review-section-head p {
  margin: 0;
}

.procurement-review-toggle {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
}

.procurement-review-table-head,
.procurement-review-line {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.5fr) minmax(120px, 0.7fr) minmax(130px, 0.8fr) minmax(160px, 0.9fr) minmax(190px, 1fr);
  min-width: 0;
}

.procurement-review-table-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
  text-transform: uppercase;
}

.procurement-review-lines {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.procurement-review-line {
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.procurement-review-line.is-unchanged {
  background: #f8fafc;
}

.procurement-review-product,
.procurement-review-values,
.procurement-review-impact {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.procurement-review-product strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.procurement-review-product small {
  color: var(--muted);
}

.procurement-review-change .status {
  font-size: 13px;
}

.procurement-review-values span,
.procurement-review-impact span,
.procurement-review-docfields div,
.procurement-review-impact-grid div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 7px 8px;
}

.procurement-review-values small,
.procurement-review-docfields span,
.procurement-review-impact-grid span {
  color: var(--muted);
  display: block;
  font-size: 11px;
}

.procurement-review-values strong,
.procurement-review-impact-grid strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
  margin-top: 2px;
  white-space: nowrap;
}

.procurement-review-values .procurement-review-delta strong {
  white-space: normal;
}

.procurement-review-impact {
  align-content: start;
}

.procurement-review-impact span {
  color: var(--ink);
  font-size: 12px;
}

.procurement-review-docfields,
.procurement-review-impact-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.procurement-review-docfields div {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr) auto minmax(0, 1fr);
}

.procurement-review-docfields strong {
  overflow-wrap: anywhere;
}

.procurement-review-reason textarea {
  min-height: 92px;
  resize: vertical;
}

.procurement-review-footer {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr) auto;
}

.procurement-review-footer [data-purchase-correction-submit-hint] {
  align-self: center;
}

.procurement-edit-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 2400px) {
  .supplier-documents-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .supplier-documents-workspace > .supplier-document-card {
    max-height: none;
    max-width: 100%;
    min-width: 0;
    position: static;
    width: 100%;
  }
}

@media (max-width: 1439px) {
  .procurement-document-grid,
  .procurement-correction-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .procurement-correction-summary {
    position: static;
  }
}

@media (max-width: 1439px) {
  .procurement-document-header {
    grid-template-columns: minmax(0, 1fr);
    position: sticky;
  }

  .procurement-document-header-actions {
    justify-content: flex-start;
  }

  .procurement-kpi-strip,
  .purchase-receipt-v2-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .procurement-review-impact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .procurement-review-table-head {
    display: none;
  }

  .procurement-review-line {
    grid-template-columns: minmax(0, 1fr);
  }

  .procurement-review-product strong {
    white-space: normal;
  }

  .procurement-review-values {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .procurement-review-impact-grid,
  .procurement-review-docfields {
    grid-template-columns: minmax(0, 1fr);
  }

  .procurement-review-docfields div {
    grid-template-columns: minmax(0, 1fr);
  }

  .procurement-review-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .procurement-edit-fields,
  .procurement-definition-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .procurement-action-footer,
  .procurement-sticky-footer {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .procurement-kpi-strip,
  .procurement-kpi-strip.is-compact,
  .purchase-receipt-v2-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
}

.as-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.supplier-order-editor-panel .product-purchase-history {
  display: none;
}

.supplier-order-editor-toolbar {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.supplier-order-editor-toolbar span {
  color: var(--ink);
  font-weight: 800;
}

.mini-stats,
.product-finance-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-stats div,
.product-finance-grid div {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.mini-stats span,
.product-finance-grid span {
  color: var(--muted);
  font-size: 12px;
}

.mini-stats strong,
.product-finance-grid strong {
  font-size: 15px;
}

.product-purchase-history {
  display: grid;
  gap: 8px;
}

.product-purchase-history h3 {
  margin: 2px 0 0;
}

.catalog-command {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 16px;
}

.catalog-command h2 {
  margin-top: 2px;
}

.catalog-command p {
  color: var(--muted);
  margin: 6px 0 0;
}

.catalog-cart {
  align-items: center;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: auto auto;
  min-width: 210px;
  padding: 10px;
}

.catalog-cart span {
  color: var(--muted);
  font-size: 12px;
}

.catalog-cart strong {
  font-size: 24px;
  text-align: right;
}

.catalog-cart button {
  grid-column: 1 / -1;
}

.catalog-workspace {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  min-width: 0;
}

.catalog-sidebar,
.catalog-products-panel,
.catalog-preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.catalog-sidebar,
.catalog-preview {
  display: grid;
  gap: 12px;
  padding: 12px;
  position: sticky;
  top: 16px;
}

.catalog-products-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.catalog-products-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.catalog-products-head h3,
.catalog-sidebar h3 {
  margin: 0;
}

.catalog-products-head p {
  margin-top: 3px;
}

.catalog-search-box input {
  margin-top: 6px;
}

.catalog-sidebar-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.catalog-category-list {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.catalog-category-list button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
}

.catalog-category-list button.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.catalog-category-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-category-list strong {
  color: var(--muted);
  font-size: 12px;
}

.order-catalog-category-list .category-tree-row,
.catalog-category-list .category-tree-row {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: 26px minmax(0, 1fr);
  padding-left: calc(var(--category-level, 0) * 14px);
}

.order-catalog-category-list .category-tree-toggle,
.catalog-category-list .category-tree-toggle {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 17px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 26px;
}

.order-catalog-category-list .category-tree-toggle.empty,
.catalog-category-list .category-tree-toggle.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.order-catalog-category-list .category-tree-select,
.catalog-category-list .category-tree-select {
  padding: 7px 8px;
}

.order-catalog-category-list .category-tree-select span,
.catalog-category-list .category-tree-select span {
  min-width: 0;
}

.catalog-admin-tools {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.catalog-admin-tools summary {
  cursor: pointer;
  font-weight: 700;
}

.catalog-admin-tools .category-create,
.catalog-admin-tools .category-manager {
  margin: 10px 0 0;
}

.catalog-admin-tools .category-create {
  grid-template-columns: 1fr;
}

.catalog-admin-tools .category-manager-list {
  grid-template-columns: 1fr;
}

.catalog-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1.3fr) minmax(180px, 0.8fr) minmax(160px, 0.7fr) minmax(150px, 0.65fr);
  margin-bottom: 12px;
}

.catalog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.catalog-chips button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 34px;
  padding: 0 12px;
}

.catalog-chips button.active {
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.category-create {
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) auto;
  margin-bottom: 14px;
  padding: 12px;
}

.category-manager {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
}

.category-manager-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.category-manager-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding: 8px 10px;
}

.category-manager-row span {
  display: grid;
  min-width: 0;
}

.category-manager-row strong,
.category-manager-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-manager-row small {
  color: var(--muted);
  font-size: 12px;
}

.catalog-grid {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .catalog-workspace {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .catalog-workspace {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    position: static;
  }

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

@media (max-width: 520px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

/* Purchases: supplier-receipt journal and document workspace. */
body[data-current-view="purchaseReceipts"] .topbar #page-title,
body[data-current-view="purchaseReceipts"] .topbar #page-subtitle {
  display: none;
}

body[data-current-view="purchaseReceipts"] .purchase-receipt-toolbar {
  grid-template-columns: minmax(260px, 1fr) minmax(210px, 280px);
}

body[data-current-view="purchaseReceipts"] .purchase-receipt-v2-kpis {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

body[data-current-view="purchaseReceipts"] .purchase-receipt-v2-kpis .toolbar-stat {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 10px 14px;
}

body[data-current-view="purchaseReceipts"] .purchase-receipt-v2-kpis .toolbar-stat span {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

body[data-current-view="purchaseReceipts"] .purchase-receipt-v2-kpis .toolbar-stat strong {
  font-size: 17px;
}

body[data-current-view="purchaseReceipts"] .purchase-receipt-v2-kpis .toolbar-stat:nth-child(2) {
  border-top: 3px solid #12b76a;
}

body[data-current-view="purchaseReceipts"] .purchase-receipt-v2-kpis .toolbar-stat.attention {
  border-top: 3px solid #f04438;
}

body[data-current-view="purchaseReceipts"] .purchase-receipt-v2-kpis .toolbar-stat.attention strong {
  color: #b42318;
}

body[data-current-view="purchaseReceipts"] .so-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-current-view="purchaseReceipts"] .so-chip {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 7px 12px;
}

body[data-current-view="purchaseReceipts"] .so-chip:hover,
body[data-current-view="purchaseReceipts"] .so-chip:focus-visible {
  border-color: #84ad98;
  outline: none;
}

body[data-current-view="purchaseReceipts"] .so-chip.active {
  background: #eef7f1;
  border-color: #87c39f;
  color: #14532d;
}

body[data-current-view="purchaseReceipts"] .so-chip.danger {
  color: #b42318;
}

body[data-current-view="purchaseReceipts"] .so-chip.danger.active {
  background: #fff3f1;
  border-color: #fda29b;
}

body[data-current-view="purchaseReceipts"] .so-chip.warn {
  color: #a15c07;
}

body[data-current-view="purchaseReceipts"] .so-chip.warn.active {
  background: #fff8e8;
  border-color: #f2c45f;
}

body[data-current-view="purchaseReceipts"] .so-chip.ok {
  color: #027a48;
}

body[data-current-view="purchaseReceipts"] .so-chip.ok.active {
  background: #ecfdf3;
  border-color: #86d3aa;
}

body[data-current-view="purchaseReceipts"] .so-compact-table {
  min-width: 640px;
}

body[data-current-view="purchaseReceipts"] .so-compact-table th,
body[data-current-view="purchaseReceipts"] .so-compact-table td {
  padding-bottom: 10px;
  padding-top: 10px;
  vertical-align: top;
}

body[data-current-view="purchaseReceipts"] .so-compact-table th:nth-child(1),
body[data-current-view="purchaseReceipts"] .so-compact-table td:nth-child(1) {
  width: 18%;
}

body[data-current-view="purchaseReceipts"] .so-compact-table th:nth-child(2),
body[data-current-view="purchaseReceipts"] .so-compact-table td:nth-child(2) {
  width: 32%;
}

body[data-current-view="purchaseReceipts"] .so-compact-table th:nth-child(3),
body[data-current-view="purchaseReceipts"] .so-compact-table td:nth-child(3) {
  width: 15%;
}

body[data-current-view="purchaseReceipts"] .so-compact-table th:nth-child(4),
body[data-current-view="purchaseReceipts"] .so-compact-table td:nth-child(4) {
  text-align: right;
  white-space: nowrap;
  width: 18%;
}

body[data-current-view="purchaseReceipts"] .so-compact-table th:last-child,
body[data-current-view="purchaseReceipts"] .so-compact-table td:last-child {
  white-space: normal;
  width: 17%;
}

body[data-current-view="purchaseReceipts"] .so-row-number {
  color: #175cd3;
}

body[data-current-view="purchaseReceipts"] .supplier-document-card {
  grid-template-columns: minmax(0, 1fr);
}

body[data-current-view="purchaseReceipts"] .supplier-document-row:focus-visible td {
  box-shadow: inset 0 0 0 2px #84ad98;
}

.pr-variance-note {
  color: #a15c07;
  font-size: 11px;
  font-weight: 700;
}

.pr-card-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pr-accept-summary {
  background: #ecfdf3;
  border: 1px solid #a6f4c5;
  border-radius: 8px;
  color: #027a48;
  font-size: 12px;
  padding: 8px 10px;
}

.pr-accept-summary.has-variance {
  background: #fff8e8;
  border-color: #f2c45f;
  color: #a15c07;
  font-weight: 700;
}

body[data-current-view="purchaseReceipts"] .supplier-documents-workspace.so-focus {
  grid-template-columns: minmax(0, 1fr) !important;
}

body[data-current-view="purchaseReceipts"] .supplier-documents-workspace.so-focus .supplier-documents-main {
  margin: 0 auto;
  max-width: 1160px;
  width: 100%;
}

body[data-current-view="purchaseReceipts"] .procurement-document-workspace {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
  max-width: 1160px;
  padding: 20px 24px 24px;
  width: 100%;
}

body[data-current-view="purchaseReceipts"] .supplier-document-card:not(.supplier-document-full-card) .procurement-table-shell table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

body[data-current-view="purchaseReceipts"] .supplier-document-full-card .procurement-movements-table {
  min-width: 640px;
  table-layout: fixed;
}

body[data-current-view="purchaseReceipts"] .supplier-document-full-card .procurement-history-table {
  min-width: 430px;
}

@media (min-width: 1280px) {
  body[data-current-view="purchaseReceipts"] .supplier-documents-workspace:not(.so-focus) {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 400px) !important;
  }

  body[data-current-view="purchaseReceipts"] .supplier-documents-workspace:not(.so-focus) > .supplier-document-card {
    max-height: calc(100vh - 112px);
    position: sticky;
    top: 12px;
  }
}

@media (max-width: 1279px) {
  body[data-current-view="purchaseReceipts"] .supplier-documents-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-current-view="purchaseReceipts"] .supplier-documents-workspace:not(.so-focus) > .supplier-document-card {
    display: none;
  }
}

@media (max-width: 900px) {
  body[data-current-view="purchaseReceipts"] .supplier-directory-head,
  body[data-current-view="purchaseReceipts"] .purchase-receipt-toolbar {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="purchaseReceipts"] .supplier-directory-head {
    flex-direction: column;
  }

  body[data-current-view="purchaseReceipts"] .supplier-directory-head button {
    width: 100%;
  }

  body[data-current-view="purchaseReceipts"] .purchase-receipt-v2-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="purchaseReceipts"] .so-compact-table,
  body[data-current-view="purchaseReceipts"] .so-compact-table tbody,
  body[data-current-view="purchaseReceipts"] .so-compact-table tr,
  body[data-current-view="purchaseReceipts"] .so-compact-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  body[data-current-view="purchaseReceipts"] .so-compact-table {
    min-width: 0;
  }

  body[data-current-view="purchaseReceipts"] .so-compact-table thead {
    display: none;
  }

  body[data-current-view="purchaseReceipts"] .so-compact-table tbody {
    display: grid;
    gap: 8px;
    padding: 8px;
  }

  body[data-current-view="purchaseReceipts"] .so-compact-table tr {
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    display: grid;
    gap: 7px 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
  }

  body[data-current-view="purchaseReceipts"] .so-compact-table tr.selected-row {
    background: #eef7f1;
    border-color: #87c39f;
  }

  body[data-current-view="purchaseReceipts"] .so-compact-table tr.selected-row td {
    background: transparent;
  }

  body[data-current-view="purchaseReceipts"] .so-compact-table td,
  body[data-current-view="purchaseReceipts"] .so-compact-table td:last-child {
    border: 0;
    padding: 0;
    white-space: normal;
    width: auto !important;
  }

  body[data-current-view="purchaseReceipts"] .so-compact-table td:nth-child(2),
  body[data-current-view="purchaseReceipts"] .so-compact-table td:last-child {
    grid-column: 1 / -1;
  }

  body[data-current-view="purchaseReceipts"] .so-compact-table td::before {
    color: #667085;
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: uppercase;
  }

  body[data-current-view="purchaseReceipts"] .procurement-document-workspace {
    box-shadow: none;
    padding: 12px;
  }
}

@media (max-width: 520px) {
  body[data-current-view="purchaseReceipts"] .so-chip {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: 9px;
  }

  .pr-card-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
}

.catalog-pagination,
.catalog-pagination > div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.catalog-pagination {
  border-top: 1px solid var(--line);
  color: var(--muted);
  flex-wrap: wrap;
  font-size: 12px;
  padding-top: 10px;
}

.catalog-pagination select {
  min-height: 34px;
  width: auto;
}

.catalog-pagination button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.catalog-page-gap {
  color: var(--muted);
  padding: 0 4px;
}

.catalog-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  grid-template-rows: 118px 1fr auto;
  min-width: 0;
  overflow: hidden;
}

.catalog-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.12);
}

.catalog-media {
  align-items: center;
  background: #eef3f8;
  color: #344054;
  display: flex;
  font-size: 34px;
  font-weight: 700;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}

.catalog-media img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.catalog-card-body {
  display: grid;
  gap: 6px;
  padding: 9px;
}

.catalog-card-head,
.catalog-card-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.catalog-card-head span,
.catalog-meta,
.catalog-card-body p {
  color: var(--muted);
  font-size: 12px;
}

.catalog-card-body h3 {
  font-size: 13px;
  line-height: 1.25;
  margin: 0;
}

.catalog-card-body p {
  margin: 0;
  min-height: 28px;
  overflow: hidden;
}

.catalog-stock-badge {
  border-radius: 999px;
  justify-self: start;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.catalog-stock-badge.success {
  background: #eef8f1;
  color: var(--accent-dark);
}

.catalog-stock-badge.warning {
  background: #fff7d6;
  color: #775200;
}

.catalog-stock-badge.danger {
  background: #fee2e2;
  color: #7f1d1d;
}

.catalog-stock-badge.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-meta span {
  background: #f6f7f9;
  border-radius: 999px;
  padding: 3px 7px;
}

.catalog-card-actions {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  padding: 8px 9px;
}

.catalog-card-actions button {
  padding: 0 10px;
}

.catalog-card-actions strong {
  font-size: 13px;
}

.catalog-preview-head h2 {
  font-size: 18px;
  line-height: 1.2;
  margin: 4px 0 0;
}

.catalog-preview-media {
  align-items: center;
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  display: flex;
  font-size: 42px;
  font-weight: 800;
  justify-content: center;
  min-height: 230px;
  overflow: hidden;
}

.catalog-preview-media img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.catalog-preview-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.catalog-preview-stats > div,
.catalog-preview-info > div {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
}

.catalog-preview-stats span,
.catalog-preview-info span {
  color: var(--muted);
  font-size: 12px;
}

.catalog-preview-stats strong,
.catalog-preview-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-preview-info {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.catalog-preview-note {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 10px;
}

.catalog-preview-actions {
  display: grid;
  gap: 8px;
}

.catalog-product-modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.46);
  display: grid;
  inset: 0;
  justify-items: center;
  overflow: auto;
  padding: 16px;
  position: fixed;
  z-index: 120;
}

.catalog-product-dialog {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 32px);
  overflow: hidden;
  padding: 14px;
  width: min(1180px, 100%);
}

@media (min-width: 901px) {
  .catalog-product-modal-backdrop {
    left: 240px;
  }

  body.sidebar-collapsed .catalog-product-modal-backdrop {
    left: 56px;
  }
}

.catalog-product-dialog-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.catalog-product-dialog-head h2 {
  font-size: 22px;
  line-height: 1.18;
  margin: 3px 0 0;
}

.catalog-product-dialog-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.catalog-product-dialog-body {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.catalog-product-dialog.catalog-product-mode-details {
  padding: 0;
}

.catalog-product-dialog.catalog-product-mode-details .catalog-product-dialog-body {
  display: grid;
  min-height: 0;
  padding: 0;
}

.product-card-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.product-card-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 16px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.product-card-title-row {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.product-card-identity {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.product-card-photo {
  flex: 0 0 auto;
}

.product-card-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}

.product-card-eyebrow span {
  background: #eef6f1;
  border: 1px solid #dbe9df;
  border-radius: 999px;
  color: #23533a;
  font-size: 12px;
  padding: 3px 7px;
}

.product-card-header h2 {
  font-size: 24px;
  line-height: 1.18;
  margin: 0;
  overflow-wrap: anywhere;
}

.product-card-header p {
  color: var(--muted);
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.product-card-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.product-card-shell .primary {
  background: var(--primary);
  border-color: #0847c2;
  color: #ffffff;
}

.product-card-shell .primary:disabled {
  background: #94a3b8;
  border-color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.86;
}

.product-card-action-menu {
  position: relative;
}

.product-card-action-menu summary {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  min-height: 36px;
}

.product-card-menu-trigger,
.product-card-close-button {
  align-items: center;
  display: inline-flex;
  flex: 0 0 38px;
  font-size: 22px;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

.product-card-close-button {
  font-size: 24px;
}

.product-card-action-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
}

.product-card-action-panel button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  padding: 9px 10px;
  text-align: left;
}

.product-card-action-panel button:hover,
.product-card-action-panel button:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.product-card-action-panel hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 0;
}

.product-card-action-heading {
  color: #b42318;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 4px 10px 0;
}

.product-card-action-panel .danger-link {
  color: #b42318;
  font-weight: 800;
}

.product-card-action-panel .danger-link:hover,
.product-card-action-panel .danger-link:focus-visible {
  background: #fef3f2;
}

.product-card-summary-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card-metric,
.product-card-field {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
}

.product-card-metric span,
.product-card-field span {
  color: var(--muted);
  font-size: 12px;
}

.product-card-metric strong,
.product-card-field strong {
  color: var(--text);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.product-card-metric small,
.product-card-field small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.product-card-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.product-card-tabs button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 12px;
  scroll-snap-align: center;
  white-space: nowrap;
}

.product-card-tabs button.active {
  background: #e9f5ef;
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.product-card-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.product-card-section {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.product-card-section-head {
  align-items: start;
  display: flex;
  justify-content: space-between;
}

.product-card-section-head h3 {
  margin: 0;
}

.product-card-section-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.product-card-field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-external-sku-manager {
  display: grid;
  gap: 0;
}

.product-external-sku-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px 14px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1.2fr) auto;
  padding: 12px 0;
}

.product-external-sku-row:first-child {
  padding-top: 0;
}

.product-external-sku-row:last-of-type {
  border-bottom: 0;
}

.product-external-sku-channel,
.product-external-sku-primary {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-external-sku-channel span {
  color: var(--muted);
  font-size: 12px;
}

.product-external-sku-primary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-external-sku-primary code,
.product-external-sku-alias code {
  overflow-wrap: anywhere;
}

.product-external-sku-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.product-external-sku-aliases {
  align-items: start;
  display: grid;
  gap: 7px;
  grid-column: 2 / -1;
}

.product-external-sku-aliases > span {
  color: var(--muted);
  font-size: 12px;
}

.product-external-sku-aliases > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-external-sku-alias {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  gap: 6px;
  max-width: 100%;
  padding: 5px 7px;
}

.product-external-sku-alias.is-primary {
  background: #eef8f2;
  border-color: #a8d8ba;
}

.product-external-sku-alias small {
  color: #27714a;
}

.product-external-sku-alias button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--danger);
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  height: 22px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 22px;
}

.product-external-sku-loading,
.product-external-sku-note {
  margin: 8px 0 0;
}

.product-external-sku-note {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

@media (max-width: 760px) {
  .product-external-sku-row {
    grid-template-columns: 1fr;
  }

  .product-external-sku-actions {
    justify-content: flex-start;
  }

  .product-external-sku-aliases {
    grid-column: 1;
  }
}

.product-card-inline-actions,
.product-card-edit-intro {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.product-card-edit-intro {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.product-card-edit-intro span {
  color: var(--muted);
}

.product-card-edit-form {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.product-card-edit-footer {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid var(--line);
  bottom: 0;
  box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.08);
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: end;
  margin: 4px -14px -14px;
  padding: 12px 14px;
  position: sticky;
  z-index: 3;
}

.product-card-side-effect {
  background: #fffdf5;
  border: 1px solid #f2df9b;
  border-radius: 8px;
  padding: 12px;
}

.product-card-side-effect summary {
  cursor: pointer;
  font-weight: 700;
}

.product-card-save-scope {
  border-color: #dbeafe;
}

.product-accounting-section {
  border-color: #dbeafe;
}

.product-accounting-hero {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
}

.product-accounting-hero > div,
.product-accounting-summary {
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
}

.product-accounting-hero span,
.product-accounting-status span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.product-accounting-hero strong,
.product-accounting-status strong {
  color: var(--text);
  display: block;
  font-size: 18px;
}

.product-accounting-hero p,
.product-accounting-status p,
.product-accounting-summary {
  color: #475467;
  margin: 6px 0 0;
}

.product-accounting-status {
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.product-accounting-status ul {
  margin: 0;
  padding-left: 18px;
}

.product-accounting-status.tone-success {
  background: #ecfdf3;
  border: 1px solid #abefc6;
}

.product-accounting-status.tone-warning {
  background: #fffaeb;
  border: 1px solid #fedf89;
}

.product-accounting-status.tone-danger {
  background: #fef3f2;
  border: 1px solid #fecdca;
}

.product-accounting-edit-panel {
  display: grid;
  gap: 10px;
}

.product-accounting-table-wrap {
  overflow-x: auto;
}

.product-accounting-components td:first-child,
.product-stock-impact-table td:first-child {
  min-width: 220px;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.status-pill.success {
  background: #dcfce7;
  color: #067647;
}

.status-pill.warning {
  background: #fef3c7;
  color: #92400e;
}

.product-card-unsaved-backdrop {
  z-index: 8;
}

.product-card-unsaved-dialog {
  max-width: 420px;
}

.product-card-nested-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  inset: 0;
  justify-items: center;
  overflow: auto;
  padding: 18px;
  position: fixed;
  z-index: 180;
}

.product-card-nested-dialog {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  display: grid;
  gap: 0;
  max-height: calc(100dvh - 36px);
  min-height: 0;
  overflow: hidden;
  width: min(920px, calc(100vw - 36px));
}

.product-card-nested-head {
  align-items: start;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.product-card-nested-head h3 {
  margin: 2px 0 0;
}

.product-card-nested-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.product-card-nested-body {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.catalog-product-dialog .detail-head {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 10px;
}

.catalog-product-dialog .detail-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-product-dialog .wide-field,
.catalog-product-dialog .product-extra-section,
.catalog-product-dialog .prom-card-editor,
.catalog-product-dialog .bundle-editor {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .catalog-product-dialog .detail-form {
    grid-template-columns: 1fr;
  }

  .catalog-product-dialog-head {
    display: grid;
  }

  .catalog-product-dialog {
    max-height: calc(100dvh - 24px);
    width: min(100%, calc(100vw - 24px));
  }

  .product-card-title-row {
    display: grid;
  }

  .product-card-header-actions {
    flex-wrap: nowrap;
    justify-content: start;
    width: 100%;
  }

  .product-card-header-actions > .primary {
    flex: 1 1 auto;
    min-width: 0;
  }

  .product-card-summary-row {
    display: flex;
    overflow-x: auto;
  }

  .product-card-metric {
    min-width: 138px;
  }

  .product-card-field-grid {
    grid-template-columns: 1fr;
  }

  .product-accounting-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .catalog-product-modal-backdrop {
    padding: 0;
  }

  .catalog-product-dialog {
    border-radius: 0;
    max-height: 100dvh;
    min-height: 100dvh;
    width: 100vw;
  }

  .product-card-header,
  .product-card-body {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .product-card-header h2 {
    font-size: 20px;
  }

  .product-card-header-actions > button,
  .product-card-header-actions summary {
    min-height: 44px;
  }

  .product-card-menu-trigger,
  .product-card-close-button {
    flex-basis: 44px;
    min-width: 44px;
    width: 44px;
  }

  .product-card-action-panel {
    left: auto;
    max-width: calc(100vw - 24px);
    right: 0;
  }

  .product-card-summary-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .product-card-metric {
    min-width: 0;
    padding: 9px;
  }

  .product-card-tabs {
    margin-right: -12px;
    padding-right: 12px;
  }

  .product-card-edit-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .product-accounting-table-wrap {
    overflow: visible;
  }

  .product-stock-impact-table,
  .product-stock-impact-table thead,
  .product-stock-impact-table tbody,
  .product-stock-impact-table tr,
  .product-stock-impact-table th,
  .product-stock-impact-table td,
  .product-accounting-components,
  .product-accounting-components thead,
  .product-accounting-components tbody,
  .product-accounting-components tr,
  .product-accounting-components th,
  .product-accounting-components td {
    display: block;
  }

  .product-stock-impact-table thead,
  .product-accounting-components thead {
    display: none;
  }

  .product-stock-impact-table tr,
  .product-accounting-components tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
  }

  .product-stock-impact-table td,
  .product-accounting-components td {
    align-items: start;
    display: grid;
    gap: 4px;
    grid-template-columns: 110px minmax(0, 1fr);
    min-width: 0;
  }

  .product-stock-impact-table td::before,
  .product-accounting-components td::before {
    color: var(--muted);
    content: attr(aria-label);
    font-size: 12px;
    font-weight: 700;
  }
}

.catalog-empty {
  grid-column: 1 / -1;
}

.catalog-page {
  display: grid;
  gap: 14px;
}

.catalog-page .catalog-command {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  margin-bottom: 0;
  padding: 16px;
}

.catalog-title-block {
  min-width: 260px;
}

.catalog-title-block h2 {
  font-size: 28px;
  line-height: 1.1;
  margin: 2px 0 0;
}

.catalog-title-block p {
  color: #667085;
  margin: 6px 0 0;
}

.catalog-head-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.catalog-head-actions button {
  min-height: 38px;
  white-space: nowrap;
}

.catalog-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.catalog-kpi-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  position: relative;
}

.catalog-kpi-card::before {
  border-radius: 8px 0 0 8px;
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 4px;
}

.catalog-kpi-card span,
.catalog-kpi-card small {
  color: #667085;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-kpi-card span {
  font-size: 12px;
  font-weight: 700;
}

.catalog-kpi-card strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1.05;
}

.catalog-kpi-card small {
  font-size: 11px;
}

.catalog-kpi-card.tone-blue::before {
  background: #2563eb;
}

.catalog-kpi-card.tone-green::before {
  background: #16a34a;
}

.catalog-kpi-card.tone-orange::before {
  background: #f59e0b;
}

.catalog-kpi-card.tone-red::before {
  background: #ef4444;
}

.catalog-kpi-card.tone-violet::before {
  background: #7c3aed;
}

.catalog-kpi-card.tone-teal::before {
  background: #0d9488;
}

.catalog-page .catalog-workspace {
  align-items: start;
  gap: 14px;
  grid-template-columns: minmax(390px, 430px) minmax(0, 1fr);
}

.catalog-page .catalog-sidebar,
.catalog-page .catalog-products-panel {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.catalog-page .catalog-sidebar {
  gap: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 12px;
}

.catalog-sidebar-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.catalog-sidebar-title h3 {
  font-size: 18px;
  margin: 2px 0 0;
}

.catalog-sidebar-title strong {
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  padding: 4px 9px;
}

.catalog-page .catalog-category-list {
  gap: 6px;
  max-height: calc(100vh - 260px);
  min-height: 430px;
}

.catalog-page .catalog-category-list button {
  border-color: #dbe3ef;
  border-radius: 8px;
  min-height: 38px;
}

.catalog-page .catalog-category-list button:hover {
  background: #f8fbff;
  border-color: #b9c8dd;
}

.catalog-page .catalog-category-list button.active {
  background: #eef6ff;
  border-color: #2f80ed;
  box-shadow: inset 4px 0 0 #2f80ed;
  color: #185abc;
}

.catalog-page .catalog-admin-tools {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 10px;
}

.catalog-page .catalog-products-panel {
  gap: 12px;
  padding: 12px;
}

.catalog-page .catalog-products-head {
  align-items: center;
  border-bottom: 0;
  padding-bottom: 0;
}

.catalog-page .catalog-products-head h3 {
  font-size: 22px;
  line-height: 1.1;
}

.catalog-page .catalog-products-head p {
  color: #667085;
  margin: 4px 0 0;
}

.catalog-page .catalog-products-head .status {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #15803d;
  font-weight: 800;
  padding: 5px 10px;
}

.catalog-filter-panel {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1.6fr) repeat(5, minmax(132px, 1fr));
  padding: 10px;
}

.catalog-filter-panel label {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.catalog-filter-panel input,
.catalog-filter-panel select {
  background: #ffffff;
  margin-top: 5px;
  min-height: 38px;
}

.catalog-page .catalog-grid {
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-page .catalog-card {
  background: #ffffff;
  border-color: #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
  grid-template-rows: 136px minmax(168px, 1fr) auto;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.catalog-page .catalog-card:hover {
  border-color: #9bb5d6;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.catalog-page .catalog-card.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14), 0 12px 28px rgba(15, 23, 42, 0.08);
}

.catalog-page .catalog-media {
  background: #f8fafc;
  border-bottom: 1px solid #e6edf5;
  font-size: 30px;
  min-width: 0;
  padding: 12px;
}

.catalog-page .catalog-media img {
  height: 100%;
  max-height: 112px;
  object-fit: contain;
  width: 100%;
}

.catalog-page .catalog-card-body {
  align-content: start;
  gap: 7px;
  padding: 10px;
}

.catalog-page .catalog-card-head span,
.catalog-page .catalog-meta,
.catalog-page .catalog-card-body p {
  font-size: 11px;
}

.catalog-page .catalog-card-head span,
.catalog-page .catalog-card-body p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-page .catalog-card-head strong {
  color: #15803d;
  font-size: 12px;
  white-space: nowrap;
}

.catalog-page .catalog-card-body h3 {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.24;
  min-height: 52px;
  overflow: hidden;
}

.catalog-badge-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 26px;
}

.catalog-page .catalog-stock-badge {
  font-size: 11px;
  line-height: 1.1;
  padding: 4px 7px;
}

.catalog-stock-badge.kind {
  background: #f5f3ff;
  color: #5b21b6;
}

.catalog-page .catalog-meta span {
  max-width: 100%;
}

.catalog-page .catalog-card-actions {
  background: #fbfdff;
  border-top-color: #e6edf5;
  padding: 9px 10px;
}

.catalog-page .catalog-card-actions strong {
  color: #0f172a;
  display: block;
  font-size: 14px;
  margin-bottom: 7px;
}

.catalog-page .catalog-card-actions > div {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
}

.catalog-page .catalog-card-actions button {
  min-height: 34px;
  padding: 0 8px;
}

.catalog-page .catalog-pagination {
  border-top-color: #dbe3ef;
}

@media (max-width: 1540px) {
  .catalog-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .catalog-page .catalog-workspace {
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  }

  .catalog-page .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .catalog-page .catalog-command {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-head-actions {
    justify-content: flex-start;
  }

  .catalog-page .catalog-workspace,
  .catalog-filter-panel {
    grid-template-columns: 1fr;
  }

  .catalog-page .catalog-sidebar {
    max-height: none;
    position: static;
  }

  .catalog-page .catalog-category-list {
    max-height: 360px;
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .catalog-kpi-grid,
  .catalog-page .catalog-grid {
    grid-template-columns: 1fr;
  }
}

.catalog-page {
  background: #ffffff;
  color: #0f172a;
  display: grid;
  gap: 14px;
}

.catalog-hero {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.catalog-title-block h1 {
  color: #081125;
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.catalog-title-block p {
  color: #667085;
  font-size: 14px;
  margin: 6px 0 0;
}

.catalog-page .catalog-kpi-grid {
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.catalog-page .catalog-kpi-card {
  align-items: center;
  border-color: #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 12px;
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 74px;
  padding: 12px 14px;
}

.catalog-page .catalog-kpi-card::before {
  display: none;
}

.catalog-kpi-icon {
  align-items: center;
  border-radius: 8px;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.catalog-kpi-icon svg,
.catalog-action-button svg,
.catalog-side-search svg,
.catalog-create-group-button svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 22px;
}

.catalog-page .catalog-kpi-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.catalog-page .catalog-kpi-card > div > span {
  color: #667085;
  font-size: 13px;
  font-weight: 500;
}

.catalog-page .catalog-kpi-card strong {
  color: #081125;
  font-size: 22px;
  line-height: 1;
}

.catalog-page .catalog-kpi-card.tone-blue .catalog-kpi-icon {
  color: #0b5cff;
}

.catalog-page .catalog-kpi-card.tone-green .catalog-kpi-icon {
  color: #16a34a;
}

.catalog-page .catalog-kpi-card.tone-red .catalog-kpi-icon {
  color: #ef4444;
}

.catalog-page .catalog-kpi-card.tone-orange .catalog-kpi-icon {
  color: #f97316;
}

.catalog-page .catalog-kpi-card.tone-violet .catalog-kpi-icon {
  color: #7c3aed;
}

.catalog-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.catalog-action-button {
  align-items: center;
  display: inline-flex;
  gap: 9px;
  min-height: 40px;
  padding: 0 16px;
}

.catalog-action-button svg {
  height: 19px;
  width: 19px;
}

.catalog-action-button.attention-button {
  border-color: #fecaca;
  color: #dc2626;
}

.catalog-page .catalog-workspace {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(300px, 320px) minmax(0, 1fr);
}

.catalog-page .catalog-sidebar {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 0;
}

.catalog-sidebar-panel,
.catalog-page .catalog-products-panel {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.catalog-sidebar-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.catalog-sidebar-title h3 {
  color: #081125;
  font-size: 18px;
  line-height: 1.15;
  margin: 0;
}

.catalog-side-search {
  align-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  color: #98a2b3;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0 12px;
}

.catalog-side-search input {
  border: 0;
  min-height: 38px;
  padding: 0;
}

.catalog-side-search input:focus {
  box-shadow: none;
  outline: 0;
}

.catalog-page .catalog-category-list,
.catalog-product-group-list {
  display: grid;
  gap: 0;
  max-height: 390px;
  overflow: auto;
}

.catalog-page .catalog-category-list button,
.catalog-product-group-list button {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  border-radius: 0;
  color: #344054;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 0 12px;
  text-align: left;
}

.catalog-page .catalog-category-list button:hover,
.catalog-product-group-list button:hover {
  background: #f8fbff;
}

.catalog-page .catalog-category-list button.active,
.catalog-product-group-list button.active {
  background: #eaf2ff;
  border-color: #d5e4ff;
  box-shadow: inset 3px 0 0 #0b5cff;
  color: #0b5cff;
}

.catalog-page .catalog-category-list strong,
.catalog-product-group-list strong {
  color: inherit;
  font-size: 13px;
  font-weight: 500;
}

.catalog-page .catalog-category-list .category-tree-row {
  gap: 0;
  grid-template-columns: 28px minmax(0, 1fr);
  padding-left: calc(var(--category-level, 0) * 14px);
}

.catalog-page .catalog-category-list .category-tree-toggle {
  background: transparent;
  border: 0;
  color: #0f172a;
  height: 42px;
  min-height: 42px;
  width: 28px;
}

.catalog-side-empty,
.catalog-product-groups-panel > .muted {
  color: #667085;
  font-size: 13px;
  margin: 0;
}

.catalog-create-group-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
}

.catalog-page .catalog-products-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.catalog-page .catalog-products-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.catalog-page .catalog-products-head h3 {
  color: #081125;
  font-size: 19px;
  line-height: 1.15;
  margin: 0;
}

.catalog-page .catalog-products-head p {
  color: #667085;
  font-size: 13px;
  margin: 4px 0 0;
}

.catalog-page .catalog-filter-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(320px, 2fr) repeat(4, minmax(128px, 0.75fr)) auto;
  padding: 0;
}

.catalog-page .catalog-filter-panel label {
  display: block;
  min-width: 0;
}

.catalog-page .catalog-filter-panel input,
.catalog-page .catalog-filter-panel select {
  background: #ffffff;
  border-color: #dbe3ef;
  border-radius: 8px;
  margin: 0;
  min-height: 38px;
}

.catalog-search-box input {
  padding-left: 14px;
}

.catalog-reset-filters {
  align-self: center;
  white-space: nowrap;
}

.catalog-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-filter-chips button {
  align-items: center;
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 6px;
  color: #0b5cff;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
}

.catalog-page .catalog-grid {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-page .catalog-card {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: none;
  grid-template-rows: 136px minmax(162px, 1fr) auto;
  overflow: hidden;
}

.catalog-page .catalog-card:hover,
.catalog-page .catalog-card.active {
  border-color: #0b5cff;
  box-shadow: 0 0 0 1px rgba(11, 92, 255, 0.24);
  transform: none;
}

.catalog-page .catalog-media {
  background: #ffffff;
  border: 0;
  min-height: 136px;
  padding: 12px 14px 2px;
}

.catalog-page .catalog-media img {
  height: 100%;
  max-height: 120px;
  object-fit: contain;
  width: 100%;
}

.catalog-page .catalog-card-body {
  gap: 6px;
  padding: 7px 12px 9px;
}

.catalog-page .catalog-card-body h3 {
  -webkit-line-clamp: 3;
  color: #081125;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.18;
  min-height: 50px;
}

.catalog-page .catalog-card-head {
  gap: 8px;
}

.catalog-page .catalog-card-head span,
.catalog-page .catalog-card-body p,
.catalog-page .catalog-meta {
  font-size: 12px;
}

.catalog-page .catalog-card-head span,
.catalog-page .catalog-card-body p,
.catalog-page .catalog-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-page .catalog-badge-row {
  min-height: 24px;
}

.catalog-page .catalog-stock-badge {
  border-radius: 5px;
  font-size: 11px;
  padding: 4px 7px;
}

.catalog-page .catalog-meta span {
  background: transparent;
  border-radius: 0;
  color: #667085;
  padding: 0;
}

.catalog-page .catalog-card-actions {
  background: #ffffff;
  border-top: 0;
  padding: 0 12px 12px;
}

.catalog-page .catalog-card-actions strong {
  color: #081125;
  font-size: 15px;
  line-height: 1.15;
  margin: 0 0 8px;
}

.catalog-page .catalog-card-actions > div {
  grid-template-columns: 1fr 1fr;
}

.catalog-page .catalog-card-actions button {
  border-radius: 6px;
  min-height: 36px;
}

.catalog-page .catalog-card-actions button.primary {
  background: #0b5cff;
}

.catalog-page .catalog-pagination {
  border-top: 0;
  color: #667085;
  padding-top: 2px;
}

@media (max-width: 1500px) {
  .catalog-page .catalog-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-page .catalog-filter-panel {
    grid-template-columns: minmax(280px, 1fr) repeat(2, minmax(128px, 0.7fr));
  }
}

@media (max-width: 1240px) {
  .catalog-page .catalog-workspace {
    grid-template-columns: minmax(280px, 310px) minmax(0, 1fr);
  }

  .catalog-page .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .catalog-page .catalog-workspace,
  .catalog-page .catalog-filter-panel {
    grid-template-columns: 1fr;
  }

  .catalog-page .catalog-sidebar {
    max-height: none;
    position: static;
  }
}

@media (max-width: 760px) {
  .catalog-page .catalog-kpi-grid,
  .catalog-page .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .catalog-action-button {
    justify-content: center;
  }
}

.price-list-builder {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

.price-list-controls,
.price-list-preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 14px;
}

.price-list-controls {
  display: grid;
  gap: 12px;
}

.price-list-grid {
  display: grid;
  gap: 10px;
}

.price-list-switches {
  display: grid;
  gap: 6px;
}

.price-list-category-head,
.price-list-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.price-list-category-head > div,
.price-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price-list-categories {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  max-height: 420px;
  overflow: auto;
}

.price-list-category {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 8px 10px;
}

.price-list-category:last-child {
  border-bottom: 0;
}

.price-list-category span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-category strong {
  color: var(--muted);
  font-size: 12px;
}

.price-list-preview {
  display: grid;
  gap: 12px;
}

.pricing-workspace {
  display: grid;
  gap: 14px;
}

.pricing-workspace-head {
  align-items: end;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.pricing-head-actions,
.pricing-export-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pricing-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.pricing-tabs button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 40px;
  padding: 7px 8px;
}

.pricing-tabs button.active {
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 800;
}

.pricing-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.pricing-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.pricing-table {
  min-width: 820px;
}

.pricing-search-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.pricing-picker-results {
  max-height: 240px;
  min-height: 0;
}

.pricing-picker-selected {
  margin: 0;
  min-width: 0;
}

.pricing-picker-selected.is-empty {
  opacity: 0.78;
}

.pricing-picker-error {
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
  margin: -2px 0 0;
}

.customer-discount-preview-form .pricing-search-picker,
.customer-discount-settings-form .pricing-search-picker {
  align-self: stretch;
}

.customer-discounts-workspace {
  background: #ffffff;
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow-x: clip;
}

body[data-current-view="pricing"] {
  background: #ffffff;
}

body[data-current-view="pricing"] .sidebar,
body[data-current-view="pricing"] .shell {
  background: #ffffff;
}

.customer-discounts-hero {
  background: var(--panel);
  margin: 0;
}

.customer-discount-workspaces {
  align-items: stretch;
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.customer-discount-workspaces button {
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  flex: 0 0 min(260px, 78vw);
  gap: 2px;
  min-height: 58px;
  padding: 10px 12px;
  text-align: left;
}

.customer-discount-workspaces button.active {
  background: var(--panel);
  border-color: var(--primary);
  box-shadow: inset 0 -3px 0 var(--primary);
  color: #155fa0;
}

.customer-discount-workspaces button span {
  font-weight: 800;
}

.customer-discount-workspaces button small {
  color: var(--muted);
}

.customer-discounts-layout,
.customer-discounts-panel,
.customer-discounts-table-shell {
  background: #ffffff;
  min-width: 0;
}

.customer-discounts-workspace .pricing-table,
.customer-discounts-workspace .pricing-table th,
.customer-discounts-workspace .pricing-table td,
.customer-discounts-workspace .pricing-table tbody,
.customer-discounts-workspace .pricing-table thead {
  background: #ffffff;
}

.customer-discount-rule-cards {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 10px 0;
}

.customer-discount-rule-cards div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.customer-discount-rule-cards span,
.customer-discount-secondary {
  color: var(--muted);
  font-size: 12px;
}

.customer-discounts-loyalty-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  min-width: 0;
}

.customer-discounts-calculator-panel .customer-discount-preview-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.customer-discounts-calculator-panel .customer-discount-preview-form button {
  align-self: end;
}

.customer-discounts-workspace .primary,
.customer-discount-settings-drawer .primary,
.customer-discount-loyalty-dialog .primary {
  background: var(--primary);
  border-color: #0847c3;
  color: #fff;
}

.customer-discounts-workspace .notice,
.customer-discounts-workspace .channel-publish-summary span,
.customer-discounts-workspace .customer-mini-card,
.customer-discount-settings-drawer .customer-mini-card,
.customer-discount-settings-drawer .customer-discount-form-section {
  background: var(--panel);
}

.customer-discount-drawer-backdrop {
  background: rgba(15, 23, 42, 0.28);
  inset: 0;
  position: fixed;
  z-index: 80;
}

.customer-discount-settings-drawer {
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(15, 23, 42, 0.18);
  display: grid;
  grid-template-rows: 1fr;
  height: 100dvh;
  max-width: min(720px, 100vw);
  min-width: min(620px, 100vw);
  overflow: hidden;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 81;
}

.customer-discount-settings-form {
  background: #ffffff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.customer-discount-drawer-head {
  align-items: start;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 18px;
}

.customer-discount-drawer-head h3 {
  margin: 2px 0 4px;
}

.customer-discount-drawer-head p {
  color: var(--muted);
  margin: 0;
}

.customer-discount-form-body {
  background: #ffffff;
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 18px;
}

.customer-discount-form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 0;
  min-width: 0;
  padding: 12px;
}

.customer-discount-form-section legend {
  font-weight: 800;
  padding: 0 6px;
}

.customer-discount-form-footer {
  align-items: center;
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 18px max(12px, env(safe-area-inset-bottom));
}

.generic-dialog-field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pricing-table td,
.pricing-table th {
  vertical-align: top;
}

.pricing-products-layout,
.pricing-price-list-layout,
.pricing-channel-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.pricing-repricing-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.channel-pricing-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.channel-pricing-header {
  align-items: end;
  display: flex;
  justify-content: space-between;
}

.channel-pricing-header h3,
.channel-pricing-step-head h3 {
  margin: 3px 0 4px;
}

.channel-pricing-header p,
.channel-pricing-step-head p {
  color: var(--muted);
  margin: 0;
}

.channel-pricing-steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.channel-pricing-steps button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 52px;
  padding: 9px 10px;
  text-align: left;
}

.channel-pricing-steps button span {
  align-items: center;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.channel-pricing-steps button.active {
  border-color: var(--primary);
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.channel-pricing-steps button.active span,
.channel-pricing-steps button.complete span {
  background: #e8f8ef;
  color: #087443;
}

.channel-pricing-main {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
}

.channel-pricing-step-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.channel-pricing-choice-grid {
  display: grid;
  gap: 10px;
}

.channel-pricing-choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.channel-pricing-choice-grid.two,
.channel-pricing-rule-grid,
.channel-pricing-advanced-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.channel-pricing-choice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 12px;
  text-align: left;
}

.channel-pricing-choice span,
.channel-pricing-selection-summary {
  color: var(--muted);
  font-size: 13px;
}

.channel-pricing-choice.active {
  background: #eef8f3;
  border-color: var(--primary);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.channel-pricing-field,
.channel-pricing-fieldset {
  display: grid;
  gap: 6px;
}

.channel-pricing-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.channel-pricing-fieldset legend {
  font-weight: 800;
  margin-bottom: 8px;
}

.channel-pricing-product-picker {
  display: grid;
  gap: 8px;
}

.channel-pricing-product-results {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 250px;
  overflow: auto;
}

.channel-pricing-product-results button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  text-align: left;
}

.channel-pricing-product-results button span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-pricing-product-results button.active {
  background: #eef8f3;
  border-color: var(--primary);
}

.channel-pricing-step-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.channel-pricing-summary-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.channel-pricing-summary-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.channel-pricing-summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.channel-pricing-summary-grid strong {
  font-size: 22px;
}

.channel-pricing-preview-table .pricing-table {
  min-width: 1160px;
}

.channel-pricing-preview-tools {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.channel-pricing-preview-search {
  display: grid;
  gap: 5px;
}

.channel-pricing-preview-search span,
.channel-pricing-preview-count {
  color: var(--muted);
  font-size: 12px;
}

.channel-pricing-preview-filters,
.channel-pricing-preview-bulk {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.channel-pricing-preview-filters button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  min-height: 38px;
  padding: 7px 10px;
}

.channel-pricing-preview-filters button span {
  color: inherit;
  font-weight: 800;
  margin-left: 3px;
}

.channel-pricing-preview-filters button.active {
  background: #eef8f3;
  border-color: var(--primary);
  color: #087443;
}

.channel-pricing-apply-cell {
  text-align: center;
  width: 96px;
}

.channel-pricing-apply-cell input {
  height: 18px;
  margin: 0;
  width: 18px;
}

.channel-pricing-row-excluded td:not(.channel-pricing-apply-cell) {
  color: var(--muted);
  opacity: 0.68;
}

.channel-pricing-row-excluded td:nth-child(6) strong {
  font-weight: 600;
}

.channel-pricing-advanced {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.channel-pricing-advanced > summary {
  cursor: pointer;
  font-weight: 800;
  padding: 13px 16px;
}

.channel-pricing-advanced-body {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding: 14px 16px 16px;
}

.pricing-wide {
  grid-column: 1 / -1;
}

.pricing-side {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 16px;
}

.pricing-product-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  max-height: 540px;
  overflow: auto;
}

.pricing-product-row {
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  text-align: left;
}

.pricing-product-row:last-child {
  border-bottom: 0;
}

.pricing-product-row.active {
  background: #eef7f3;
  color: var(--accent-dark);
}

.pricing-product-row span,
.pricing-product-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-form {
  align-content: start;
}

.pricing-form label {
  display: grid;
  gap: 5px;
}

.pricing-form textarea {
  resize: vertical;
}

.pricing-product-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pricing-product-chips button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  padding: 5px 9px;
}

.pricing-product-chips button.active {
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 800;
}

.pricing-empty {
  color: var(--muted);
  padding: 12px;
}

.pricing-channel-main,
.channel-publish-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.channel-publish-workspace {
  display: grid;
  gap: 12px;
  min-width: 0;
}

@media (max-width: 920px) {
  .customer-discount-rule-cards,
  .customer-discounts-loyalty-grid,
  .customer-discounts-calculator-panel .customer-discount-preview-form {
    grid-template-columns: 1fr;
  }

  .customer-discount-settings-drawer {
    border-left: 0;
    border-radius: 14px 14px 0 0;
    bottom: 0;
    height: min(88dvh, 720px);
    max-width: 100vw;
    min-width: 0;
    top: auto;
    width: 100vw;
  }
}

@media (max-width: 560px) {
  .customer-discounts-workspace {
    gap: 10px;
  }

  .customer-discount-workspaces button {
    flex-basis: min(220px, 76vw);
    min-height: 54px;
    padding: 9px 10px;
  }

  .customer-discount-drawer-head,
  .customer-discount-form-body,
  .customer-discount-form-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .customer-discount-form-footer {
    justify-content: stretch;
  }

  .customer-discount-form-footer button {
    flex: 1 1 0;
  }
}

.channel-publish-side {
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.channel-publish-profile-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  overflow: hidden;
}

.channel-publish-profile-list button {
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-height: 64px;
  padding: 10px;
  text-align: left;
}

.channel-publish-profile-list button:last-child {
  border-bottom: 0;
}

.channel-publish-profile-list button.active {
  background: #eef7f3;
  color: var(--accent-dark);
}

.channel-publish-profile-list span,
.channel-publish-profile-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-publish-safety-note,
.channel-publish-mapping-note,
.channel-publish-export-note {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 3px;
  padding: 10px;
}

.channel-publish-safety-note strong,
.channel-publish-mapping-note strong {
  color: var(--ink);
}

.channel-publish-preview-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.channel-publish-preview-form button[type="submit"] {
  min-height: 40px;
}

.channel-publish-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.channel-publish-warning-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.channel-publish-warning-legend span {
  background: #fff8e6;
  border: 1px solid #f5d48b;
  border-radius: 999px;
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.channel-publish-summary span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 9px 10px;
}

.channel-publish-summary small {
  color: var(--muted);
  font-size: 12px;
}

.channel-publish-summary strong {
  font-size: 18px;
}

.channel-publish-table {
  min-width: 980px;
}

.channel-publish-preview-table + .channel-publish-preview-table {
  margin-top: 2px;
}

.channel-price-batch {
  display: grid;
  gap: 18px;
}

.channel-price-batch-head {
  align-items: flex-start;
}

.channel-price-batch-channel {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}

.channel-price-batch-channel button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.channel-price-batch-channel button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 3px rgb(15 23 42 / 12%);
}

.channel-price-batch-builder {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.channel-price-batch-picker {
  position: relative;
}

.channel-price-batch-picker .pricing-picker-results {
  z-index: 12;
}

.channel-price-batch-add-label {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.channel-price-batch-selection {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}

.channel-price-batch-selection-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

.channel-price-batch-selection-head span,
.channel-price-batch-selected-list span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.channel-price-batch-selection-head small,
.channel-price-batch-selected-list small {
  color: var(--muted);
}

.channel-price-batch-selected-list {
  display: grid;
  max-height: 222px;
  overflow-y: auto;
}

.channel-price-batch-selected-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.channel-price-batch-selected-list > div:last-child {
  border-bottom: 0;
}

.channel-price-batch-selected-list p {
  margin: 0;
  padding: 18px 13px;
  color: var(--muted);
}

.channel-price-batch-selected-list .icon-button {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.channel-price-batch-builder-actions,
.channel-price-batch-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.channel-price-batch-builder-actions > span,
.channel-price-batch-footer span {
  color: var(--muted);
}

.channel-price-batch-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.channel-price-batch-summary > span {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}

.channel-price-batch-summary > span:last-child {
  border-right: 0;
}

.channel-price-batch-summary small {
  color: var(--muted);
}

.channel-price-batch-summary strong {
  font-size: 20px;
}

.channel-price-batch-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.channel-price-batch-filters,
.channel-price-batch-select-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.channel-price-batch-filters button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.channel-price-batch-filters button.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #eff6ff;
}

.channel-price-batch-table td:nth-child(1) {
  width: 48px;
  text-align: center;
}

.channel-price-batch-table td:nth-child(4),
.channel-price-batch-table td:nth-child(5),
.channel-price-batch-table td:nth-child(6) {
  white-space: nowrap;
}

.channel-price-batch-table td > small {
  display: block;
  max-width: 310px;
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.channel-price-batch-table .channel-price-batch-check {
  width: 18px;
  height: 18px;
}

.channel-price-batch-published {
  background: rgb(22 163 74 / 6%);
}

.channel-price-batch-footer {
  padding-top: 4px;
}

.channel-price-batch-footer > div {
  display: grid;
  gap: 3px;
}

.channel-price-batch-result {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 6px;
  background: #f8fafc;
}

.channel-price-batch-result.success {
  border-left-color: var(--accent);
}

.channel-price-batch-result.warning {
  border-left-color: var(--warn);
}

.channel-price-batch-result span {
  color: var(--muted);
}

.channel-publish-pilot-tools {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.channel-publish-pilot-tools > summary {
  padding: 13px 16px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.channel-publish-pilot-grid {
  display: grid;
  gap: 16px;
  padding: 0 12px 12px;
}

.prom-single-sku-pilot {
  border-top: 3px solid #16794b;
  gap: 16px;
}

.prom-single-sku-head {
  align-items: flex-start;
}

.prom-single-sku-head .eyebrow {
  color: #16794b;
}

.prom-single-sku-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.prom-single-sku-form > button {
  min-height: 42px;
  min-width: 132px;
}

.prom-single-sku-picker {
  position: relative;
}

.prom-single-sku-picker .pricing-picker-results {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
  left: 0;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
}

.prom-single-sku-selection {
  align-items: center;
  background: #f5faf7;
  border: 1px solid #b9dfca;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 50px;
  padding: 8px 10px;
}

.prom-single-sku-selection > span,
.prom-single-sku-result-head > div,
.prom-single-sku-footer > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.prom-single-sku-selection small,
.prom-single-sku-result-head span,
.prom-single-sku-result-head small,
.prom-single-sku-footer span {
  color: var(--muted);
}

.prom-single-sku-selection small,
.prom-single-sku-result-head strong,
.prom-single-sku-result-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prom-single-sku-empty {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 14px 2px 2px;
}

.prom-single-sku-result {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.prom-single-sku-result-head,
.prom-single-sku-footer {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.prom-single-sku-result-head > small {
  flex: 0 0 auto;
}

.prom-single-sku-blockers {
  background: #fff4f2;
  border: 1px solid #f1b7ae;
  border-radius: 8px;
  color: #9f2d20;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

.prom-single-sku-blockers p {
  margin: 0;
}

.prom-single-sku-comparison {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.prom-single-sku-comparison > div {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(150px, 1.25fr) repeat(3, minmax(110px, 0.85fr));
  min-height: 52px;
  padding: 9px 12px;
}

.prom-single-sku-comparison > div:last-child {
  border-bottom: 0;
}

.prom-single-sku-comparison-head {
  background: #f7f9fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  min-height: 38px !important;
}

.prom-single-sku-comparison .positive {
  color: #137a48;
  font-weight: 800;
}

.prom-single-sku-comparison .negative {
  color: #b54708;
  font-weight: 800;
}

.prom-single-sku-footer {
  background: #f7f9fb;
  border-radius: 8px;
  padding: 10px 12px;
}

.prom-single-sku-footer > button {
  flex: 0 0 auto;
}

.pricing-table tr.selected-row td {
  background: #eef7f3;
}

.pricing-table .warning-row td {
  background: #fff8e6;
}

.pricing-table .danger-row td {
  background: #fff1f0;
}

@media (max-width: 1100px) {
  .pricing-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pricing-products-layout,
  .pricing-price-list-layout,
  .pricing-repricing-grid,
  .pricing-channel-layout {
    grid-template-columns: 1fr;
  }

  .pricing-side {
    position: static;
  }

  .channel-price-batch-builder {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-pricing-choice-grid.three,
  .channel-pricing-product-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-pricing-preview-tools {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .channel-pricing-preview-bulk {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .channel-price-batch .channel-price-batch-head,
  .channel-price-batch .channel-price-batch-builder-actions,
  .channel-price-batch .channel-price-batch-footer,
  .channel-price-batch .channel-price-batch-toolbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-price-batch-channel {
    width: 100%;
  }

  .channel-price-batch-builder {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-price-batch-builder-actions .primary,
  .channel-price-batch-footer .primary {
    width: 100%;
  }

  .channel-price-batch-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-price-batch-summary > span:nth-child(2) {
    border-right: 0;
  }

  .channel-price-batch-summary > span:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .channel-price-batch-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-price-batch-filters button:first-child {
    grid-column: 1 / -1;
  }

  .channel-price-batch-select-actions {
    justify-content: space-between;
  }

  .channel-price-batch-table-shell {
    overflow: visible;
  }

  .channel-price-batch-table,
  .channel-price-batch-table tbody,
  .channel-price-batch-table tr,
  .channel-price-batch-table td {
    display: block;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .channel-price-batch-table {
    table-layout: auto;
  }

  .channel-price-batch-table thead {
    display: none;
  }

  .channel-price-batch-table tbody {
    display: grid;
    gap: 10px;
  }

  .channel-price-batch-table tr {
    border: 1px solid var(--line);
    border-radius: 7px;
    overflow: hidden;
  }

  .channel-price-batch-table td,
  .channel-price-batch-table td:nth-child(1) {
    display: grid;
    grid-template-columns: minmax(100px, 0.7fr) minmax(0, 1.3fr);
    gap: 10px;
    align-items: start;
    width: auto;
    padding: 9px 11px;
    text-align: left;
    white-space: normal;
  }

  .channel-price-batch-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
  }

  .channel-price-batch-table td > small,
  .channel-price-batch-table td > strong,
  .channel-price-batch-table td > span {
    grid-column: 2;
  }

  .channel-price-batch-table td:nth-child(1) .channel-price-batch-check {
    grid-column: 2;
  }

  .horoshop-single-sku-pilot .prom-single-sku-result-head span {
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .prom-single-sku-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .prom-single-sku-form > button {
    width: 100%;
  }

  .prom-single-sku-result-head,
  .prom-single-sku-footer {
    align-items: stretch;
    display: grid;
    gap: 10px;
  }

  .prom-single-sku-result-head > small {
    justify-self: start;
  }

  .prom-single-sku-comparison-head {
    display: none !important;
  }

  .prom-single-sku-comparison > div:not(.prom-single-sku-comparison-head) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .prom-single-sku-comparison > div:not(.prom-single-sku-comparison-head) > strong {
    grid-column: 1 / -1;
  }

  .prom-single-sku-comparison span[data-label] {
    display: grid;
    gap: 3px;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .prom-single-sku-comparison span[data-label]::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
  }

  .prom-single-sku-footer > button {
    width: 100%;
  }
}

@media (max-width: 780px) {
  .channel-pricing-steps,
  .channel-pricing-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-pricing-choice-grid.three,
  .channel-pricing-choice-grid.two,
  .channel-pricing-rule-grid,
  .channel-pricing-advanced-fields,
  .channel-pricing-product-results {
    grid-template-columns: 1fr;
  }

  .channel-pricing-main {
    padding: 14px;
  }

  .channel-pricing-preview-tools {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .channel-pricing-preview-bulk {
    grid-column: auto;
  }
}

.price-list-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.price-list-table {
  min-width: 820px;
}

.price-list-table th:nth-child(1),
.price-list-table td:nth-child(1) {
  width: 150px;
}

.price-list-table th:nth-child(2),
.price-list-table td:nth-child(2) {
  min-width: 360px;
}

.price-list-group-row td {
  background: #ddefe7;
  color: #143b2d;
  font-weight: 800;
}

.warehouse-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(160px, 0.5fr) minmax(110px, 0.35fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.toolbar-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 34px;
  padding: 5px 9px;
}

.toolbar-stat span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.toolbar-stat strong {
  font-size: 16px;
}

.button-link {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.ghost.button-link {
  padding: 0 12px;
}

.product-thumb,
.product-detail-thumb {
  align-items: center;
  background: #eef1f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  margin-right: 8px;
  overflow: hidden;
  vertical-align: middle;
  width: 36px;
}

.product-thumb img,
.product-detail-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product-detail-thumb {
  height: 58px;
  margin-right: 10px;
  width: 58px;
}

.supplier-order-workarea {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.supplier-order-summary-cards {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(108px, 1fr));
  min-width: min(420px, 100%);
}

.supplier-order-head-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.45fr) minmax(260px, 1fr);
}

.supplier-order-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(340px, 0.95fr) minmax(420px, 1.05fr);
  min-width: 0;
}

.inventory-document-bar {
  align-items: end;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(130px, 0.55fr) minmax(170px, 0.75fr) minmax(220px, 1fr) auto;
  padding: 12px;
}

.inventory-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 0.82fr) minmax(520px, 1.18fr);
  min-width: 0;
}

.inventory-summary-cards {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.inventory-product-list {
  max-height: 560px;
}

.inventory-catalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.inventory-product {
  text-align: left;
}

.inventory-lines {
  border-color: #26323f;
}

.inventory-lines-head .check-line {
  white-space: nowrap;
}

.inventory-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 560px;
  overflow: auto;
}

.inventory-table {
  border: 0;
  margin: 0;
  min-width: 980px;
}

.inventory-product-cell {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 260px;
}

.inventory-product-cell strong,
.inventory-product-cell span {
  display: block;
}

.inventory-product-cell span {
  color: var(--muted);
  font-size: 12px;
}

.inventory-actions,
.inventory-journal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.inventory-journal {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 12px;
}

.supplier-order-catalog,
.supplier-order-lines {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
}

.supplier-order-lines {
  border-color: #26323f;
}

.supplier-panel-head {
  align-items: start;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.supplier-panel-head h3 {
  margin: 0;
}

.supplier-order-product-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  min-width: 0;
  overflow: auto;
  overflow-x: hidden;
}

.supplier-order-catalog .catalog-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.45fr);
  margin-bottom: 0;
  min-width: 0;
}

.supplier-order-catalog label {
  min-width: 0;
}

.warehouse-suite-page .stock-transfer-workarea,
.warehouse-suite-page .inventory-workarea {
  background: #ffffff;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.035);
  gap: 12px;
  overflow: hidden;
  padding: 14px;
}

.warehouse-suite-page .stock-transfer-workarea .detail-head,
.warehouse-suite-page .inventory-workarea .detail-head {
  border-bottom: 1px solid #e6edf5;
  margin: -14px -14px 0;
  padding: 13px 14px;
}

.warehouse-suite-page .stock-transfer-workarea .detail-head h2,
.warehouse-suite-page .inventory-workarea .detail-head h2 {
  font-size: 18px;
}

.warehouse-suite-page .stock-transfer-workarea .supplier-order-head-grid,
.warehouse-suite-page .inventory-workarea .inventory-document-bar {
  background: #f8fafc;
  border-color: #e4ebf4;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.warehouse-suite-page .stock-transfer-workarea .supplier-order-layout,
.warehouse-suite-page .inventory-workarea .inventory-layout {
  grid-template-columns: minmax(260px, 0.82fr) minmax(360px, 1.18fr);
}

.warehouse-suite-page .stock-transfer-workarea .supplier-order-product-list,
.warehouse-suite-page .inventory-workarea .supplier-order-product-list {
  max-height: 500px;
}

.warehouse-suite-page .stock-transfer-workarea .supplier-order-lines,
.warehouse-suite-page .inventory-workarea .supplier-order-lines {
  border-color: #dfe7f2;
}

.warehouse-suite-page .stock-transfer-workarea .supplier-order-line-table,
.warehouse-suite-page .inventory-workarea .inventory-table {
  min-width: 0;
  width: 100%;
}

.warehouse-suite-page .stock-transfer-workarea .supplier-order-line-table th,
.warehouse-suite-page .stock-transfer-workarea .supplier-order-line-table td,
.warehouse-suite-page .inventory-workarea .inventory-table th,
.warehouse-suite-page .inventory-workarea .inventory-table td {
  font-size: 12px;
  padding: 7px 8px;
}

.warehouse-suite-page .stock-transfer-workarea .supplier-order-product,
.warehouse-suite-page .inventory-workarea .supplier-order-product {
  border-color: #e4ebf4;
  border-radius: 8px;
}

.supplier-order-catalog-cta {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
}

.supplier-order-catalog-cta div {
  display: grid;
  gap: 5px;
}

.supplier-order-catalog-cta strong {
  color: var(--ink);
  font-size: 15px;
}

.supplier-order-catalog-cta span,
.supplier-order-catalog-hints span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.supplier-order-catalog-hints {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.supplier-order-catalog-hints span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
}

.supplier-order-product {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) max-content;
  justify-self: stretch;
  max-width: 100%;
  min-width: 0;
  padding: 8px;
  width: 100%;
}

.supplier-order-product > div {
  min-width: 0;
}

.supplier-order-product strong,
.supplier-order-product span,
.supplier-order-product small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-order-product span,
.supplier-order-product small {
  color: var(--muted);
}

.supplier-order-line-table td:first-child {
  min-width: 260px;
}

.negative-stock-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.negative-stock-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reorder-summary {
  align-items: stretch;
}

.negative-stock-table td:nth-child(2) {
  min-width: 240px;
}

.negative-stock-table td:nth-child(2) .product-thumb {
  vertical-align: middle;
}

.negative-stock-include {
  text-align: center;
  width: 72px;
}

.negative-stock-quantity {
  max-width: 96px;
}

.negative-stock-table small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.negative-stock-row-skipped {
  opacity: 0.55;
}

.negative-stock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stock-adjustment-result-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.38);
  display: flex;
  justify-content: center;
  padding: 22px;
  z-index: 80;
}

.stock-adjustment-result-dialog {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 14px;
  max-height: min(760px, calc(100vh - 44px));
  max-width: 980px;
  overflow: auto;
  padding: 18px;
  width: min(980px, 100%);
}

.stock-adjustment-result-dialog header,
.stock-adjustment-result-dialog footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.stock-adjustment-result-dialog h2 {
  color: #0f172a;
  font-size: 22px;
  line-height: 1.15;
  margin: 2px 0 5px;
}

.stock-adjustment-result-dialog p {
  color: #667085;
  font-size: 13px;
  margin: 0;
}

.stock-adjustment-result-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stock-adjustment-result-summary div {
  background: #f8fafc;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px 12px;
}

.stock-adjustment-result-summary span,
.stock-adjustment-result-table small {
  color: #667085;
  font-size: 12px;
}

.stock-adjustment-result-summary strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.15;
}

.stock-adjustment-result-note {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e3a8a;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.stock-adjustment-result-note strong {
  font-size: 13px;
}

.stock-adjustment-result-note span {
  font-size: 13px;
}

.stock-adjustment-result-table-wrap {
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  max-height: 320px;
  overflow: auto;
}

.stock-adjustment-result-table {
  margin: 0;
  width: 100%;
}

.stock-adjustment-result-table th,
.stock-adjustment-result-table td {
  border-bottom: 1px solid #eef2f6;
  vertical-align: middle;
}

.stock-adjustment-result-table tbody tr:last-child td {
  border-bottom: 0;
}

.reorder-table th:nth-child(3),
.reorder-table td:nth-child(3),
.reorder-table th:nth-child(4),
.reorder-table td:nth-child(4) {
  width: 110px;
}

.reorder-table th:nth-child(5),
.reorder-table td:nth-child(5) {
  width: 150px;
}

.reorder-actions {
  min-width: 220px;
}

.reorder-workarea {
  gap: 14px;
}

.reorder-hero {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid #b42318;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  padding: 14px 16px;
}

.reorder-hero h2 {
  margin: 4px 0 0;
}

.reorder-kicker {
  color: #b42318;
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.reorder-stat-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
}

.reorder-stat.attention {
  background: #fff1f1;
  border-color: #efb3b3;
}

.reorder-stat.attention strong {
  color: #b42318;
}

.reorder-action-bar {
  align-items: center;
  background: #fff7d6;
  border: 1px solid #e7c665;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.reorder-action-bar strong,
.reorder-action-bar span {
  display: block;
}

.reorder-action-bar span {
  color: #775200;
  font-size: 13px;
  margin-top: 2px;
}

.reorder-main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reorder-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 66vh;
  overflow: auto;
}

.reorder-table {
  margin-top: 0;
  min-width: 1080px;
  table-layout: fixed;
}

.reorder-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.reorder-table th:nth-child(1),
.reorder-table td:nth-child(1) {
  width: 72px;
}

.reorder-table th:nth-child(2),
.reorder-table td:nth-child(2) {
  width: 34%;
}

.reorder-table th:nth-child(3),
.reorder-table td:nth-child(3),
.reorder-table th:nth-child(4),
.reorder-table td:nth-child(4),
.reorder-table th:nth-child(5),
.reorder-table td:nth-child(5),
.reorder-table th:nth-child(6),
.reorder-table td:nth-child(6) {
  width: 120px;
}

.reorder-table th:nth-child(7),
.reorder-table td:nth-child(7) {
  width: 250px;
}

.reorder-product-cell {
  min-width: 0;
}

.reorder-product-wrap {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.reorder-product-wrap .product-thumb {
  flex: 0 0 auto;
  margin-right: 0;
}

.reorder-product-wrap > div {
  min-width: 0;
}

.reorder-product-wrap strong,
.reorder-product-wrap span,
.reorder-product-wrap small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reorder-product-wrap span,
.reorder-product-wrap small {
  color: var(--muted);
}

.reorder-shortage {
  background: #fff1f1;
  border: 1px solid #efb3b3;
  border-radius: 999px;
  color: #b42318;
  display: inline-block;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.reorder-money {
  white-space: nowrap;
}

.reorder-empty {
  background: #eef8f1;
  border: 1px solid #b7dfc3;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 16px;
}

.reorder-empty span {
  color: var(--muted);
}

.toolbar-stat.delivery-risk-stat.attention {
  background: #fff7d6;
  border-color: #e7c665;
}

.toolbar-stat.delivery-risk-stat.attention strong {
  color: #775200;
}

.toolbar-stat.sku-risk-stat.attention {
  background: #ffe4e4;
  border-color: #f0a8a8;
}

.toolbar-stat.sku-risk-stat.attention strong {
  color: #b42318;
}

.warehouse-admin {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  min-width: 0;
}

.warehouse-admin.reorder-mode,
.warehouse-admin.supplier-order-mode {
  grid-template-columns: minmax(0, 1fr);
}

.warehouse-admin.reorder-mode .warehouse-list,
.warehouse-admin.supplier-order-mode .warehouse-list {
  display: none;
}

.warehouse-admin.reorder-mode .warehouse-detail,
.warehouse-admin.supplier-order-mode .warehouse-detail {
  max-width: none;
  position: static;
}

.warehouse-list,
.warehouse-detail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.warehouse-list {
  min-width: 0;
  overflow: auto;
}

.warehouse-list table {
  border: 0;
  min-width: 1040px;
}

.warehouse-detail {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: visible;
  padding: 12px;
  position: sticky;
  top: 16px;
}

.detail-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.detail-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.purchase-receipt-edit {
  display: grid;
  gap: 12px;
}

.tabs {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, 1fr);
}

.tabs button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 34px;
}

.tabs button.active {
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
}

.detail-form {
  display: grid;
  gap: 10px;
}

#product-edit-form {
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#product-edit-form > label:first-child,
#product-edit-form > .check-line,
#product-edit-form > .product-master-section,
#product-edit-form > .bundle-editor {
  grid-column: 1 / -1;
}

#product-edit-form button {
  min-height: 36px;
}

.warehouse-detail #product-edit-form label {
  gap: 3px;
}

.warehouse-detail #product-edit-form input,
.warehouse-detail #product-edit-form select {
  min-height: 32px;
  padding: 5px 8px;
}

.product-extra-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.product-extra-section summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 700;
}

.compact-product-stats {
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-product-stats div {
  border-radius: 6px;
  padding: 7px;
}

.compact-product-stats strong {
  font-size: 13px;
}

.order-back-button {
  justify-self: start;
}

.check-line {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.check-line input {
  min-height: auto;
  width: auto;
}

.movement-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 420px;
  max-width: 100%;
  overflow: auto;
}

.movement-table {
  border: 0;
  margin: 0;
  min-width: 820px;
  table-layout: fixed;
}

.movement-table th,
.movement-table td {
  padding: 8px;
}

.movement-table th {
  white-space: nowrap;
}

.movement-date {
  width: 132px;
}

.movement-product {
  width: 190px;
}

.movement-warehouse {
  width: 120px;
}

.movement-type {
  width: 92px;
}

.movement-qty {
  width: 78px;
}

.movement-source {
  width: 230px;
}

.movement-price {
  width: 78px;
}

.movement-table .stacked-link span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movement-source-cell {
  line-height: 1.35;
}

.movement-source-cell strong {
  display: inline-block;
  margin-bottom: 2px;
}

.product-location-panel {
  display: grid;
  gap: 12px;
}

.location-create-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(90px, 0.6fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.location-create-form button {
  min-height: 38px;
}

.empty-detail {
  display: grid;
  gap: 6px;
  min-height: 160px;
  place-content: center;
  text-align: center;
}

.warehouse-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.warehouse-grid .panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.warehouse-dashboard-page {
  background: #ffffff;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.warehouse-dashboard-head {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.warehouse-dashboard-head h1 {
  color: #111827;
  font-size: 24px;
}

.warehouse-head-actions,
.warehouse-stock-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.warehouse-tabs {
  border-bottom: 1px solid #dfe5ef;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
  padding-bottom: 6px;
}

.warehouse-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  color: #475467;
  flex: 0 1 auto;
  font-size: 13px;
  font-weight: 700;
  min-height: 38px;
  padding: 0 10px;
  white-space: nowrap;
}

.warehouse-tabs button.active,
.warehouse-tabs button.active-soft {
  border-bottom-color: #635bff;
  color: #4f46e5;
}

.warehouse-module-nav {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}

.warehouse-module-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  color: #172033;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 66px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
}

.warehouse-module-button:hover:not(:disabled) {
  border-color: #bfdbfe;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.09);
  transform: translateY(-1px);
}

.warehouse-module-button.active {
  background: #eef5ff;
  border-color: #2563eb;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.14);
}

.warehouse-module-button.is-warning:not(.active) {
  border-color: #fed7aa;
}

.warehouse-module-button.is-danger:not(.active) {
  border-color: #fecaca;
}

.warehouse-module-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.warehouse-module-icon {
  align-items: center;
  background: #eef4ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 18px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  line-height: 1;
}

.warehouse-module-button.is-warning .warehouse-module-icon {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.warehouse-module-button.is-danger .warehouse-module-icon {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.warehouse-module-button strong,
.warehouse-module-button small {
  display: block;
  min-width: 0;
}

.warehouse-module-button strong {
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-module-button small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 2px;
}

.warehouse-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.warehouse-kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 14px;
  position: relative;
}

.warehouse-kpi-card::after {
  border-radius: 999px;
  content: "";
  height: 34px;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
}

.warehouse-kpi-card span,
.warehouse-kpi-card small {
  color: var(--muted);
  font-size: 12px;
}

.warehouse-kpi-card strong {
  color: #111827;
  font-size: 25px;
}

.warehouse-kpi-card.kpi-purple::after {
  background: #f0edff;
}

.warehouse-kpi-card.kpi-blue::after {
  background: #e8f1ff;
}

.warehouse-kpi-card.kpi-amber::after {
  background: #fff3db;
}

.warehouse-kpi-card.kpi-red::after {
  background: #ffe9ec;
}

.warehouse-suite-page {
  background: #ffffff;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.warehouse-suite-head {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-width: 0;
}

.warehouse-suite-head h1 {
  color: #071225;
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
}

.warehouse-suite-head p {
  color: #607089;
  font-size: 14px;
  margin: 5px 0 0;
}

.warehouse-suite-head-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.warehouse-action-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
}

.warehouse-action-icon {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.warehouse-action-icon svg,
.warehouse-suite-tabs button span svg,
.warehouse-suite-metric-icon svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 19px;
}

.warehouse-action-button.ghost .warehouse-action-icon {
  background: #eef5ff;
  color: #155eef;
}

.warehouse-action-button.primary .warehouse-action-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.warehouse-suite-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.warehouse-suite-tabs button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  color: #1b2a41;
  display: grid;
  gap: 3px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 58px;
  padding: 8px 11px;
  text-align: left;
}

.warehouse-suite-tabs button span {
  align-items: center;
  background: #f0f6ff;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  color: #155eef;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.warehouse-suite-tabs button strong,
.warehouse-suite-tabs button small {
  display: block;
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-suite-tabs button strong {
  font-size: 13px;
  line-height: 1.15;
}

.warehouse-suite-tabs button small {
  color: #66758d;
  font-size: 11px;
  font-weight: 800;
}

.warehouse-suite-tabs button.active {
  background: #eef5ff;
  border-color: #155eef;
  box-shadow: 0 12px 28px rgba(21, 94, 239, 0.12);
}

.warehouse-suite-tabs button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.warehouse-suite-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.warehouse-suite-metric {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 2px 11px;
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 78px;
  padding: 12px 14px;
}

.warehouse-suite-metric-icon {
  align-items: center;
  background: #edf5ff;
  border-radius: 10px;
  color: #155eef;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 3;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.warehouse-suite-metric span:not(.warehouse-suite-metric-icon),
.warehouse-suite-metric small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.warehouse-suite-metric strong {
  color: #071225;
  font-size: 22px;
  line-height: 1.1;
}

.warehouse-suite-metric.is-green .warehouse-suite-metric-icon {
  background: #e8f8ee;
  color: #0f9f55;
}

.warehouse-suite-metric.is-red .warehouse-suite-metric-icon {
  background: #fff1f1;
  color: #e11d48;
}

.warehouse-suite-metric.is-orange .warehouse-suite-metric-icon {
  background: #fff7e8;
  color: #f97316;
}

.warehouse-suite-metric.is-purple .warehouse-suite-metric-icon {
  background: #f3efff;
  color: #6d28d9;
}

.warehouse-suite-grid {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(250px, 290px) minmax(0, 1fr) minmax(310px, 360px);
  min-width: 0;
}

.warehouse-suite-grid.no-right {
  grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
}

.warehouse-suite-grid.no-left {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
}

.warehouse-suite-grid.no-left.no-right {
  grid-template-columns: minmax(0, 1fr);
}

.warehouse-suite-main,
.warehouse-suite-left,
.warehouse-suite-right {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.warehouse-suite-right {
  position: sticky;
  top: 14px;
}

.warehouse-suite-right .supplier-document-card {
  max-height: calc(100vh - 180px);
  overflow: auto;
  position: static;
}

.warehouse-suite-right .supplier-card-fields {
  gap: 8px;
}

.warehouse-suite-right .supplier-card-fields div {
  grid-template-columns: minmax(86px, 0.44fr) minmax(0, 1fr);
}

.warehouse-suite-right .supplier-document-card h3 {
  font-size: 13px;
}

.warehouse-suite-right .supplier-card-receipts {
  min-width: 0;
  width: 100%;
}

.warehouse-suite-right .supplier-card-receipts th,
.warehouse-suite-right .supplier-card-receipts td {
  font-size: 11px;
  padding: 6px 7px;
}

.warehouse-suite-right .supplier-document-actions {
  gap: 8px;
}

.warehouse-filter-card,
.warehouse-table-card,
.warehouse-side-card-v3 {
  background: #ffffff;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.warehouse-filter-card {
  display: grid;
  gap: 11px;
  padding: 14px;
}

.warehouse-filter-card h2,
.warehouse-side-card-v3 h2,
.warehouse-table-head h2 {
  color: #14213d;
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.warehouse-filter-card label {
  color: #475569;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.warehouse-filter-card input,
.warehouse-filter-card select {
  min-width: 0;
  width: 100%;
}

.warehouse-receipt-control {
  display: grid;
  gap: 12px;
}

.warehouse-receipt-control-head h2 {
  color: #071225;
  font-size: 18px;
  line-height: 1.15;
  margin: 3px 0 0;
}

.warehouse-receipt-mode-buttons {
  display: grid;
  gap: 8px;
}

.warehouse-receipt-mode-buttons button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  color: #152033;
  display: grid;
  gap: 3px 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 58px;
  padding: 9px 11px;
  text-align: left;
}

.warehouse-receipt-mode-buttons button > span {
  align-items: center;
  background: #f0f6ff;
  border: 1px solid #d8e6ff;
  border-radius: 9px;
  color: #155eef;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.warehouse-receipt-mode-buttons button svg,
.warehouse-receipt-actions button svg,
.warehouse-receipt-filter-toggle svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.warehouse-receipt-mode-buttons strong,
.warehouse-receipt-mode-buttons small {
  display: block;
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-receipt-mode-buttons strong {
  font-size: 13px;
}

.warehouse-receipt-mode-buttons small {
  color: #66758d;
  font-size: 11px;
  font-weight: 800;
}

.warehouse-receipt-mode-buttons button.active {
  background: #eef5ff;
  border-color: #155eef;
  box-shadow: 0 10px 24px rgba(21, 94, 239, 0.12);
}

.warehouse-receipt-actions {
  display: grid;
  gap: 8px;
}

.warehouse-receipt-actions button,
.warehouse-receipt-filter-toggle {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
}

.warehouse-receipt-inline-filters {
  background: #f8fafc;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.warehouse-receipt-filter-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.warehouse-receipt-filter-head strong {
  color: #071225;
  font-size: 13px;
}

.warehouse-receipt-help {
  display: grid;
  gap: 8px;
}

.warehouse-receipt-help div {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
}

.warehouse-receipt-help strong {
  color: #0f172a;
  font-size: 12px;
}

.warehouse-receipt-help span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.warehouse-receipt-list-card .warehouse-table-head p {
  max-width: 780px;
}

.warehouse-filter-summary {
  display: grid;
  gap: 8px;
}

.warehouse-filter-summary div {
  background: #f8fafc;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 10px;
}

.warehouse-filter-summary span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.warehouse-filter-summary strong {
  color: #111827;
  font-size: 15px;
}

.warehouse-table-card {
  overflow: hidden;
}

.warehouse-table-head {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e6edf5;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 13px 14px;
}

.warehouse-table-head p {
  color: #64748b;
  font-size: 12px;
  margin: 3px 0 0;
}

.warehouse-table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.warehouse-table-card .warehouse-stock-table-shell {
  border: 0;
  border-radius: 0;
  max-height: 640px;
}

.warehouse-table-card .warehouse-stock-table th {
  background: #f7f9fc;
  color: #475569;
  font-size: 11px;
  white-space: nowrap;
}

.warehouse-table-card .warehouse-stock-table td {
  font-size: 12px;
  vertical-align: middle;
}

.warehouse-table-card .warehouse-product-cell strong {
  color: #111827;
  font-size: 13px;
}

.warehouse-table-footer {
  border-top: 1px solid #e6edf5;
  color: #64748b;
  font-size: 12px;
  padding: 10px 14px;
}

.warehouse-side-card-v3 {
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 14px;
}

.warehouse-side-card-v3.empty {
  color: #64748b;
  min-height: 210px;
}

.warehouse-side-product-head {
  align-items: start;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.warehouse-side-product-photo {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 72px;
  height: 72px;
  justify-content: center;
  overflow: hidden;
  width: 72px;
}

.warehouse-side-product-photo img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.warehouse-side-product-head h2 {
  font-size: 17px;
  margin: 7px 0 4px;
}

.warehouse-side-product-head p {
  color: #64748b;
  font-size: 12px;
  margin: 0;
}

.warehouse-side-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.warehouse-side-stats div {
  background: #f8fafc;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}

.warehouse-side-stats span,
.warehouse-side-stats small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.warehouse-side-stats strong {
  color: #111827;
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-side-actions {
  display: grid;
  gap: 8px;
}

.warehouse-side-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.warehouse-side-card-head span {
  align-items: center;
  background: #eef5ff;
  border-radius: 999px;
  color: #155eef;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  min-width: 30px;
  padding: 5px 9px;
}

.warehouse-movement-list,
.warehouse-document-list,
.warehouse-reserved-products {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
}

.warehouse-movement-row,
.warehouse-document-row,
.warehouse-reserved-product {
  background: #f8fafc;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  color: #18243a;
  display: grid;
  gap: 3px;
  padding: 10px;
  text-align: left;
}

.warehouse-movement-row span,
.warehouse-movement-row small,
.warehouse-document-row span,
.warehouse-document-row small,
.warehouse-reserved-product span,
.warehouse-reserved-product small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.warehouse-movement-row strong,
.warehouse-document-row strong,
.warehouse-reserved-product strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.25;
}

.warehouse-reserved-product b {
  color: #155eef;
  font-size: 14px;
}

button.warehouse-reserved-product {
  cursor: pointer;
  font: inherit;
  width: 100%;
}

button.warehouse-reserved-product:hover,
button.warehouse-reserved-product:focus-visible,
button.warehouse-reserved-product.selected {
  background: #eef5ff;
  border-color: #155eef;
  outline: none;
}

button.warehouse-reserved-product:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.warehouse-reserved-search {
  color: #475569;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.warehouse-reserved-search input {
  min-width: 0;
  width: 100%;
}

.warehouse-reserved-active-filter {
  background: #eef5ff;
  border: 1px solid #bfd5ff;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.warehouse-reserved-active-filter span {
  color: #155eef;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.warehouse-reserved-active-filter strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.warehouse-reserved-active-filter .link-button {
  justify-self: start;
}

.product-reservation-breakdown {
  background: #f8fafc;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
}

.product-reservation-breakdown.is-compact {
  margin-top: 0;
  padding: 10px;
}

.product-reservation-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.product-reservation-head h3 {
  color: #111827;
  font-size: 14px;
  margin: 0;
}

.product-reservation-head p {
  color: #64748b;
  font-size: 11px;
  margin: 3px 0 0;
}

.product-reservation-head > strong {
  color: #155eef;
  flex: 0 0 auto;
  font-size: 14px;
}

.product-reservation-list {
  display: grid;
  gap: 7px;
  max-height: 280px;
  overflow: auto;
}

.product-reservation-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 9px;
}

.product-reservation-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-reservation-row > div > strong,
.product-reservation-row > div > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-reservation-row > div > strong {
  color: #111827;
  font-size: 12px;
}

.product-reservation-row > div > span {
  color: #64748b;
  font-size: 11px;
}

.product-reservation-row > b {
  color: #111827;
  font-size: 12px;
  white-space: nowrap;
}

.product-reservation-empty {
  margin: 0;
}

.warehouse-document-control-card {
  align-content: start;
}

.warehouse-document-control-list {
  display: grid;
  gap: 8px;
}

.warehouse-document-control-step {
  align-items: start;
  background: #f8fafc;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 10px;
}

.warehouse-document-control-step span {
  align-items: center;
  background: #eaf1ff;
  border-radius: 999px;
  color: #155eef;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.warehouse-document-control-step strong {
  color: #111827;
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.warehouse-document-control-step small {
  color: #64748b;
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.warehouse-document-control-step.active {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.warehouse-document-control-step.active span {
  background: #dcfce7;
  color: #15803d;
}

.warehouse-document-control-step.warning {
  background: #fff7ed;
  border-color: #fed7aa;
}

.warehouse-document-control-step.warning span {
  background: #ffedd5;
  color: #c2410c;
}

.warehouse-document-control-note {
  background: #f8fafc;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.warehouse-document-control-note span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.warehouse-document-control-note strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.warehouse-document-control-note small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.warehouse-stock-tool-side .detail-form {
  border: 0;
  box-shadow: none;
  padding: 0;
}

@media (max-width: 1320px) {
  .warehouse-suite-grid,
  .warehouse-suite-grid.no-right {
    grid-template-columns: 1fr;
  }

  .warehouse-suite-right {
    position: static;
  }

  .warehouse-suite-tabs,
  .warehouse-suite-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .warehouse-suite-head {
    display: grid;
  }

  .warehouse-suite-tabs,
  .warehouse-suite-metrics {
    grid-template-columns: 1fr;
  }
}

.warehouse-assembly-page {
  background: #ffffff;
}

.warehouse-assembly-workspace {
  background: #ffffff;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 20px;
  padding: 0;
}

.warehouse-assembly-workspace .warehouse-work-head {
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 0;
}

.warehouse-assembly-workspace .warehouse-work-head h2 {
  color: #101828;
  font-size: 32px;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
}

.warehouse-assembly-workspace .warehouse-work-head p {
  color: #667085;
  font-size: 15px;
  margin: 6px 0 0;
}

.warehouse-work-search {
  flex: 0 1 420px;
}

.warehouse-work-search input {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  color: #101828;
  font-size: 15px;
  min-height: 54px;
  padding: 0 20px;
  width: 100%;
}

.warehouse-channel-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.warehouse-channel-tabs button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
}

.warehouse-channel-tabs button.active {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
  color: #1d4ed8;
}

.warehouse-channel-tabs strong {
  background: #f2f4f7;
  border-radius: 999px;
  color: #344054;
  min-width: 28px;
  padding: 2px 8px;
  text-align: center;
}

.warehouse-channel-tabs button.active strong {
  background: #dbeafe;
  color: #1d4ed8;
}

.warehouse-channel-tabs .warehouse-info-tab {
  border-color: #c7d7fe;
  color: #1d4ed8;
}

.warehouse-channel-tabs .warehouse-info-tab .warehouse-assembly-icon {
  height: 24px;
  width: 24px;
}

.warehouse-channel-tabs .warehouse-info-tab .warehouse-assembly-icon svg {
  height: 15px;
  width: 15px;
}

.warehouse-channel-tabs .warehouse-info-tab.active,
.warehouse-channel-tabs .warehouse-info-tab:hover {
  background: #eef2ff;
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.warehouse-route-card {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.04);
  display: grid;
  gap: 16px;
  padding: 20px 24px;
}

.warehouse-route-card-head,
.warehouse-route-subhead,
.warehouse-route-select-row,
.warehouse-route-actions,
.warehouse-route-archive-tools,
.warehouse-route-period-shift {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.warehouse-route-card-head h3 {
  color: #101828;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 4px;
}

.warehouse-route-card-head p,
.warehouse-route-subhead span,
.warehouse-route-select-row span,
.warehouse-route-history-row small,
.warehouse-route-order small {
  color: #667085;
}

.warehouse-route-summary,
.warehouse-route-form,
.warehouse-route-archive-stats {
  display: grid;
  gap: 12px;
}

.warehouse-route-summary {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.warehouse-route-summary button,
.warehouse-route-order,
.warehouse-route-history-row {
  background: #f8fafc;
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  color: #101828;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.warehouse-route-summary button {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
}

.warehouse-route-summary button:disabled {
  cursor: default;
  opacity: 0.58;
}

.warehouse-route-summary strong {
  color: #2563eb;
  font-size: 28px;
  line-height: 1;
}

.warehouse-route-builder,
.warehouse-route-archive {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.warehouse-route-form {
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr);
}

.warehouse-route-form label {
  color: #344054;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.warehouse-route-form input,
.warehouse-route-archive-tools input {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 10px;
  color: #101828;
  font: inherit;
  min-height: 42px;
  padding: 0 12px;
}

.warehouse-route-orders,
.warehouse-route-history {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.warehouse-route-order,
.warehouse-route-history-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px;
}

.warehouse-route-order.selected {
  background: #ecfdf3;
  border-color: #86efac;
}

.warehouse-route-check {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #15803d;
  display: inline-flex;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.warehouse-route-archive-tools {
  align-items: stretch;
  flex-wrap: wrap;
}

.warehouse-route-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warehouse-route-periods button {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  min-height: 36px;
  padding: 0 13px;
}

.warehouse-route-periods button.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.warehouse-route-archive-tools input {
  flex: 1 1 260px;
}

.warehouse-route-archive-stats {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.warehouse-route-archive-stats span {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.warehouse-route-history-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.warehouse-shipment-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  color: #101828;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  padding: 12px;
}

.warehouse-shipment-row:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.warehouse-shipment-row.selected {
  background: #eff6ff;
  border-color: #93c5fd;
}

.warehouse-shipment-registry-archive-row {
  background: #f8fafc;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.warehouse-shipment-main {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 3px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.warehouse-shipment-row strong,
.warehouse-shipment-row small {
  overflow-wrap: anywhere;
}

.warehouse-shipment-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: right;
}

.warehouse-shipment-row b {
  color: #2563eb;
  font-size: 18px;
}

.warehouse-shipment-check {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.warehouse-shipment-check input {
  accent-color: #2563eb;
  height: 18px;
  margin: 0;
  width: 18px;
}

.warehouse-shipment-editor {
  display: grid;
  gap: 10px;
}

.warehouse-shipment-editor .warehouse-work-table {
  margin: 0;
}

.warehouse-shipment-note {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 12px;
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  padding: 10px;
}

.warehouse-shipment-note input {
  border: 1px solid #d8e0ec;
  border-radius: 9px;
  color: #101828;
  font: inherit;
  font-weight: 700;
  padding: 9px 10px;
}

.warehouse-shipment-archive-head {
  margin-top: 14px;
}

.warehouse-route-empty {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #667085;
  padding: 18px;
  text-align: center;
}

.warehouse-assembly-kpis {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(9, minmax(112px, 1fr));
}

.warehouse-kpi-filter {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 16px;
  color: #475467;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px 10px;
  grid-template-areas:
    "icon value"
    "label label";
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 92px;
  padding: 16px 18px;
  text-align: left;
}

.warehouse-kpi-filter .warehouse-assembly-icon {
  grid-area: icon;
}

.warehouse-kpi-filter > span:not(.warehouse-assembly-icon) {
  font-size: 14px;
  font-weight: 700;
  grid-area: label;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.warehouse-kpi-filter strong {
  color: #344054;
  font-size: 30px;
  grid-area: value;
  justify-self: end;
  line-height: 1;
  white-space: nowrap;
}

.warehouse-kpi-filter.active {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.warehouse-kpi-filter.tone-blue {
  background: #eef2ff;
}

.warehouse-kpi-filter.tone-cyan {
  background: #e6fffb;
}

.warehouse-kpi-filter.tone-green {
  background: #ecfdf3;
}

.warehouse-kpi-filter.tone-orange {
  background: #fff7ed;
}

.warehouse-kpi-filter.tone-urgent {
  background: #fff1f2;
  border-color: #fecdd3;
}

.warehouse-kpi-filter.tone-yellow {
  background: #fffbeb;
}

.warehouse-kpi-filter.tone-sky {
  background: #eff6ff;
}

.warehouse-kpi-filter.tone-gray {
  background: #f2f4f7;
}

.warehouse-kpi-filter.tone-red {
  background: #fef3f2;
}

.warehouse-kpi-filter.tone-blue strong,
.warehouse-kpi-filter.tone-sky strong {
  color: #2563eb;
}

.warehouse-kpi-filter.tone-cyan strong {
  color: #0e7490;
}

.warehouse-kpi-filter.tone-green strong {
  color: #15803d;
}

.warehouse-kpi-filter.tone-orange strong {
  color: #c2410c;
}

.warehouse-kpi-filter.tone-yellow strong {
  color: #a16207;
}

.warehouse-kpi-filter.tone-red strong {
  color: #b42318;
}

.warehouse-kpi-filter.tone-urgent strong {
  color: #be123c;
}

.warehouse-kpi-overview {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 18px;
  padding: 20px;
}

.warehouse-kpi-overview-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.warehouse-kpi-overview-head h3 {
  margin: 0;
}

.warehouse-kpi-overview-head p {
  color: #667085;
  margin: 4px 0 0;
}

.warehouse-kpi-overview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.warehouse-kpi-overview-card {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 14px;
}

.warehouse-kpi-overview-card span {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.warehouse-kpi-overview-card strong {
  color: #2563eb;
  font-size: 24px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.warehouse-kpi-overview-card small {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.warehouse-kpi-overview-card.tone-green strong {
  color: #15803d;
}

.warehouse-kpi-overview-card.tone-cyan strong {
  color: #0e7490;
}

.warehouse-kpi-overview-card.tone-purple strong {
  color: #7c3aed;
}

.warehouse-kpi-overview-card.tone-orange strong {
  color: #c2410c;
}

.warehouse-kpi-overview-card.tone-red strong {
  color: #b42318;
}

.warehouse-lifecycle-card,
.warehouse-work-table-card {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.04);
}

.warehouse-lifecycle-card {
  display: grid;
  gap: 22px;
  padding: 24px 28px;
}

.warehouse-lifecycle-card h3 {
  color: #101828;
  font-size: 22px;
  margin: 0 0 6px;
}

.warehouse-lifecycle-card p {
  color: #667085;
  margin: 0;
}

.warehouse-lifecycle-flow {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(8, minmax(132px, 1fr));
  overflow-x: auto;
  padding: 2px 0 4px;
}

.warehouse-lifecycle-step {
  align-items: center;
  border: 1px solid #cfd6e4;
  border-radius: 14px;
  color: #344054;
  display: grid;
  gap: 8px;
  min-height: 86px;
  padding: 14px 12px;
  position: relative;
  text-align: center;
}

.warehouse-lifecycle-step:not(:last-child)::after {
  background: #98a2b3;
  content: "";
  height: 2px;
  left: calc(100% + 4px);
  position: absolute;
  top: 50%;
  width: 16px;
}

.warehouse-lifecycle-step.active {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #312e81;
}

.warehouse-lifecycle-step strong {
  font-size: 14px;
}

.warehouse-lifecycle-step small {
  color: #667085;
  font-size: 12px;
}

.warehouse-work-table-card {
  display: grid;
  gap: 14px;
  padding: 20px 24px;
}

.warehouse-assembly-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.warehouse-assembly-tabs button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  white-space: nowrap;
}

.warehouse-assembly-tabs button.active {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
  color: #1d4ed8;
}

.warehouse-assembly-tabs strong {
  background: #eef2ff;
  border-radius: 999px;
  color: #2563eb;
  flex: 0 0 auto;
  min-width: 26px;
  padding: 2px 7px;
  text-align: center;
}

.warehouse-work-table-shell {
  overflow-x: auto;
}

.warehouse-assembly-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1340px;
  table-layout: fixed;
  width: 100%;
}

.warehouse-assembly-table th {
  background: #ffffff;
  border-bottom: 1px solid #e4e7ec;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  padding: 12px 10px;
  text-align: left;
}

.warehouse-assembly-table td {
  border-bottom: 1px solid #eef2f6;
  color: #101828;
  padding: 14px 10px;
  vertical-align: middle;
}

.warehouse-assembly-table th:nth-child(1),
.warehouse-assembly-table td:nth-child(1) {
  width: 150px;
}

.warehouse-assembly-table th:nth-child(2),
.warehouse-assembly-table td:nth-child(2) {
  width: 200px;
}

.warehouse-assembly-table th:nth-child(3),
.warehouse-assembly-table td:nth-child(3) {
  width: 190px;
}

.warehouse-assembly-table th:nth-child(4),
.warehouse-assembly-table td:nth-child(4) {
  width: 320px;
}

.warehouse-assembly-table th:nth-child(5),
.warehouse-assembly-table td:nth-child(5) {
  width: 300px;
}

.warehouse-assembly-table th:nth-child(6),
.warehouse-assembly-table td:nth-child(6) {
  width: 165px;
}

.warehouse-assembly-table td:nth-child(4),
.warehouse-work-table td:nth-child(5) {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.warehouse-delivery-number {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.warehouse-assembly-row small,
.warehouse-assembly-table td small {
  color: #667085;
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.warehouse-assembly-row .strong-link {
  color: #101828;
  font-size: 15px;
  font-weight: 900;
  padding: 0;
  text-decoration: none;
}

.warehouse-payment-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.warehouse-payment-line {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: 48px minmax(0, 1fr);
  min-width: 0;
}

.warehouse-payment-line > span:first-child {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.warehouse-payment-cell .site-request-state-badge,
.warehouse-payment-cell .order-payment-marker {
  max-width: 100%;
  width: fit-content;
}

.warehouse-payment-cell .order-payment-marker {
  margin-top: 0;
}

.warehouse-payment-cell small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  margin-top: 0;
}

.warehouse-source-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  margin-top: 7px;
  padding: 6px 8px;
  width: fit-content;
}

.warehouse-source-pill.uman {
  background: #ecfdf3;
  color: #15803d;
}

.warehouse-source-pill.online {
  background: #eff6ff;
  color: #1d4ed8;
}

.warehouse-work-row-routed {
  background: #f8fafc;
}

.warehouse-work-warning-row {
  background: #fffbeb;
}

.warehouse-work-change-row {
  background: #fff7ed;
}

.warehouse-work-resume-row {
  background: #fffbeb;
}

.warehouse-change-badge {
  align-items: center;
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 999px;
  color: #92400e;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
  line-height: 1;
  margin-top: 6px;
  padding: 5px 8px;
  white-space: nowrap;
}

.warehouse-resume-badge {
  background: #fff7ed;
  border-color: #fb923c;
  color: #9a3412;
}

.warehouse-change-badge svg {
  height: 14px;
  width: 14px;
}

.warehouse-quote-urgent-row {
  background: #fff1f2;
}

.warehouse-quote-urgent-row td {
  border-bottom-color: #fecdd3;
}

.warehouse-quote-urgent-badge {
  background: #be123c;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  margin-top: 6px;
  padding: 6px 9px;
  width: fit-content;
}

.warehouse-work-row-closed {
  opacity: 0.78;
}

.warehouse-progress-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.warehouse-progress-chip {
  background: #e5e7eb;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #667085;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 7px;
  white-space: nowrap;
}

.warehouse-progress-chip.done {
  background: #dcfce7;
  color: #15803d;
}

.warehouse-progress-chip.active {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1d4ed8;
}

.warehouse-progress-chip.blocked {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}

.warehouse-progress-note {
  color: #667085;
  display: block;
  font-size: 12px;
  margin-top: 6px;
}

.warehouse-pick-shortage-note,
.warehouse-problem-reasons {
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  margin-top: 6px;
}

.warehouse-problem-reasons {
  display: grid;
  gap: 5px;
}

.warehouse-problem-reason {
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
  color: #b42318;
  display: grid;
  gap: 3px;
  padding: 6px 8px;
}

.warehouse-problem-reason.warning {
  background: #fffbeb;
  border-color: #fedf89;
  color: #b54708;
}

.warehouse-problem-reason.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.warehouse-resume-banner {
  align-items: flex-start;
  background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 100%);
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #9a3412;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  margin-top: 7px;
  padding: 8px 10px;
}

.warehouse-resume-banner .warehouse-assembly-icon {
  background: #ffedd5;
  color: #c2410c;
  margin-top: 1px;
}

.warehouse-resume-banner strong {
  color: #7c2d12;
  display: block;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
}

.warehouse-resume-banner small {
  color: #9a3412;
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.warehouse-next-action {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.warehouse-next-button,
.warehouse-next-muted,
.warehouse-next-danger {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  min-width: 148px;
  padding: 0 16px;
  text-align: center;
}

.warehouse-next-button {
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
}

.warehouse-next-button:hover {
  background: #1d4ed8;
}

.warehouse-next-button:disabled {
  background: #f2f4f7;
  border-color: #d0d5dd;
  color: #667085;
  cursor: not-allowed;
}

.warehouse-next-muted {
  background: #f2f4f7;
  border-color: #d0d5dd;
  color: #667085;
}

.warehouse-next-danger {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}

.warehouse-more-actions {
  position: relative;
}

.warehouse-more-actions summary {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #667085;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  list-style: none;
  width: 38px;
}

.warehouse-more-actions summary::-webkit-details-marker {
  display: none;
}

.warehouse-more-actions[open] summary,
.warehouse-more-actions summary:hover {
  background: #eef2ff;
  color: #1d4ed8;
}

.warehouse-more-actions > div {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.14);
  display: grid;
  min-width: 190px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
}

.warehouse-more-actions button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  padding: 0 10px;
  text-align: left;
}

.warehouse-more-actions button:hover {
  background: #f2f4f7;
}

.warehouse-interface-rule {
  background: #101828;
  border-radius: 14px;
  color: #f9fafb;
  font-size: 15px;
  padding: 18px 24px;
}

.warehouse-interface-rule strong {
  color: #ffffff;
}

.warehouse-picking-inline-row td,
.warehouse-work-inline-row td {
  background: #f8fafc;
  border-bottom: 1px solid #d8e0ec;
  padding: 0 10px 16px;
}

.warehouse-picking-panel {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 16px;
  overflow: hidden;
}

.warehouse-picking-head {
  align-items: flex-start;
  border-bottom: 1px solid #e4e7ec;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px;
}

.warehouse-picking-head > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.warehouse-picking-head strong {
  color: #101828;
  font-size: 18px;
  font-weight: 950;
}

.warehouse-picking-head span,
.warehouse-picking-context {
  color: #667085;
  font-size: 13px;
  font-weight: 750;
}

.warehouse-picking-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.warehouse-picking-table-shell {
  overflow-x: auto;
}

.warehouse-picking-table {
  border-collapse: collapse;
  width: 100%;
}

.warehouse-picking-table th {
  background: #f8fafc;
  border-bottom: 1px solid #e4e7ec;
  color: #667085;
  font-size: 11px;
  font-weight: 950;
  padding: 10px 12px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.warehouse-picking-table td {
  background: transparent;
  border-bottom: 1px solid #edf1f7;
  padding: 12px;
  vertical-align: middle;
}

.warehouse-picking-table tbody tr {
  cursor: pointer;
}

.warehouse-picking-table tbody tr:hover td {
  background: #f8fbff;
}

.warehouse-picking-table td small {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 750;
  margin-top: 3px;
}

.warehouse-picking-table input[type="checkbox"] {
  accent-color: #155eef;
  cursor: pointer;
  height: 44px;
  width: 44px;
}

.warehouse-pick-mobile-meta,
.warehouse-pick-mobile-fact-toggle,
.warehouse-pick-mobile-required {
  display: none;
}

.warehouse-picking-actions {
  align-items: stretch;
  border-top: 1px solid #e4e7ec;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  padding: 14px 16px 16px;
}

.warehouse-picking-actions .primary {
  font-size: 15px;
  min-height: 46px;
  width: 100%;
}

.warehouse-picking-actions .ghost {
  min-height: 46px;
}

@media (max-width: 768px) {
  .warehouse-picking-head {
    align-items: stretch;
    display: grid;
  }

  .warehouse-picking-head .ghost {
    justify-self: start;
  }

  .warehouse-picking-table-shell {
    overflow-x: visible;
  }

  .warehouse-picking-table,
  .warehouse-picking-table tbody,
  .warehouse-picking-table tr,
  .warehouse-picking-table td {
    display: block;
  }

  .warehouse-picking-table thead {
    display: none;
  }

  .warehouse-picking-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .warehouse-picking-table tbody tr {
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    display: grid;
    gap: 6px 8px;
    grid-template-areas:
      "photo product check"
      "fact fact fact";
    grid-template-columns: 42px minmax(0, 1fr) 46px;
    padding: 12px;
  }

  .warehouse-picking-table td {
    border: 0;
    min-width: 0;
    padding: 0;
  }

  .warehouse-pick-photo,
  .warehouse-picking-table td:nth-child(1) {
    grid-area: photo;
  }

  .warehouse-pick-location,
  .warehouse-pick-sku,
  .warehouse-pick-available,
  .warehouse-picking-table td:nth-child(2),
  .warehouse-picking-table td:nth-child(3),
  .warehouse-picking-table td:nth-child(7) {
    display: none;
  }

  .warehouse-pick-product,
  .warehouse-picking-table td:nth-child(4) {
    grid-area: product;
  }

  .warehouse-pick-required,
  .warehouse-picking-table td:nth-child(5) {
    display: none;
  }

  .warehouse-pick-mobile-required {
    display: block;
    text-align: right;
  }

  .warehouse-pick-mobile-required strong {
    color: #101828;
    display: block;
    font-size: 20px;
    line-height: 1;
  }

  .warehouse-pick-mobile-required small {
    color: #667085;
    display: block;
    font-size: 11px;
    font-weight: 850;
    margin-top: 3px;
    white-space: nowrap;
  }

  .warehouse-pick-fact-cell,
  .warehouse-picking-table td:nth-child(6) {
    grid-area: fact;
    margin-top: 4px;
  }

  .warehouse-picking-card-row.fact-closed .warehouse-pick-fact-cell {
    display: none;
  }

  .warehouse-pick-check,
  .warehouse-picking-table td:nth-child(8) {
    align-self: start;
    display: grid;
    gap: 7px;
    grid-area: check;
    justify-self: end;
    justify-items: end;
  }

  .warehouse-pick-product > strong,
  .warehouse-picking-table td:nth-child(4) strong {
    display: block;
    font-size: 14px;
    line-height: 1.25;
    overflow: visible;
    overflow-wrap: anywhere;
  }

  .warehouse-pick-product > small:not(.warehouse-pick-mobile-meta) {
    display: none;
  }

  .warehouse-pick-mobile-meta {
    color: #667085;
    display: block;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.3;
    margin-top: 4px;
    max-width: 100%;
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .warehouse-pick-mobile-fact-toggle {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #d8e0ec;
    border-radius: 999px;
    color: #475467;
    cursor: pointer;
    display: inline-flex;
    font-size: 11.5px;
    font-weight: 850;
    margin-top: 5px;
    min-height: 26px;
    padding: 3px 8px;
  }

  .warehouse-picking-card-row.fact-open .warehouse-pick-mobile-fact-toggle {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
  }

  .warehouse-pick-fact {
    min-height: 44px;
  }

  .warehouse-picking-actions {
    grid-template-columns: 1fr;
  }

  .warehouse-picking-actions .primary,
  .warehouse-picking-actions .ghost {
    width: 100%;
  }
}

.warehouse-pick-fact-cell {
  min-width: 132px;
  vertical-align: middle;
}

.warehouse-pick-fact-control {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 32px minmax(54px, 1fr) 32px;
  min-width: 126px;
  overflow: hidden;
}

.warehouse-pick-fact-control button {
  align-items: center;
  background: #f8fafc;
  border: 0;
  color: #1d4ed8;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  justify-content: center;
  min-height: 36px;
  padding: 0;
}

.warehouse-pick-fact-control button:hover {
  background: #e0ecff;
}

.warehouse-pick-fact {
  appearance: textfield;
  -moz-appearance: textfield;
  background: #ffffff;
  border: 0;
  border-left: 1px solid #e4ebf4;
  border-right: 1px solid #e4ebf4;
  color: #0f172a;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  min-height: 36px;
  min-width: 54px;
  padding: 0 6px;
  text-align: center;
  width: 100%;
}

.warehouse-pick-fact::-webkit-outer-spin-button,
.warehouse-pick-fact::-webkit-inner-spin-button {
  margin: 0;
}

.warehouse-pick-fact:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: -2px;
}

.warehouse-pick-fact-footer {
  align-items: center;
  display: flex;
  gap: 7px;
  justify-content: space-between;
  margin-top: 5px;
}

.warehouse-pick-fact-hint {
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;
  padding: 4px 6px;
  white-space: nowrap;
}

.warehouse-pick-fact-hint.ok {
  background: #dcfce7;
  color: #15803d;
}

.warehouse-pick-fact-hint.short {
  background: #fef3f2;
  color: #b42318;
}

.warehouse-pick-fact-hint.over {
  background: #eff6ff;
  color: #1d4ed8;
}

.warehouse-work-inline-form {
  align-items: end;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  margin-top: 10px;
  padding: 14px;
}

.warehouse-work-inline-form > div:first-child {
  display: grid;
  gap: 4px;
  grid-column: 1 / -1;
}

.warehouse-work-inline-form > div:first-child span {
  color: #667085;
  font-size: 13px;
}

.warehouse-work-inline-form label {
  color: #475467;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.warehouse-work-inline-form input,
.warehouse-work-inline-form select,
.warehouse-work-inline-form textarea {
  border: 1px solid #d8e0ec;
  border-radius: 9px;
  font: inherit;
  min-height: 36px;
  padding: 8px 10px;
}

.warehouse-work-inline-form textarea {
  min-height: 76px;
  resize: vertical;
}

.warehouse-work-wide {
  grid-column: span 2;
}

.warehouse-work-inline-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.warehouse-delivery-inline-form {
  align-items: stretch;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.warehouse-delivery-inline-form .delivery-wide {
  grid-column: span 2;
}

.warehouse-delivery-inline-form .delivery-full {
  grid-column: 1 / -1;
}

.warehouse-work-inline-form > .warehouse-delivery-inline-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.warehouse-delivery-payment-hint {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.warehouse-delivery-inline-actions {
  grid-column: 1 / -1;
}

.warehouse-analytics-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(320px, 1.25fr) minmax(260px, 0.85fr) minmax(260px, 0.85fr);
}

.warehouse-chart-card,
.warehouse-stock-card,
.warehouse-side-card,
.warehouse-full-detail,
.warehouse-wide-workarea {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.05);
  min-width: 0;
  padding: 12px;
}

.prom-export-admin {
  display: grid;
  gap: 14px;
}

.prom-export-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.prom-export-toolbar {
  align-items: end;
}

.prom-export-table td {
  vertical-align: middle;
}

.prom-export-row-warning {
  background: #fffaf0;
}

.prom-export-row-published {
  background: #f8fafc;
  color: #475467;
}

.prom-export-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  padding: 5px 8px;
}

.prom-export-status.success {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #15803d;
}

.prom-export-status.warning {
  background: #fffbeb;
  border-color: #fed7aa;
  color: #b54708;
}

.prom-export-status.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b42318;
}

.prom-export-status.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.prom-export-status.muted {
  background: #f8fafc;
  color: #64748b;
}

.prom-export-message {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 5px;
  max-width: 260px;
}

.prom-export-result {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.prom-export-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.prom-card-editor {
  border-color: rgba(37, 99, 235, 0.18);
}

.prom-card-form {
  margin-top: 10px;
}

.prom-card-form .wide-field,
.prom-card-form .prom-card-meta {
  grid-column: 1 / -1;
}

.prom-card-form textarea {
  min-height: 120px;
  line-height: 1.35;
  resize: vertical;
}

.prom-card-form textarea[name="promDescription"] {
  min-height: 220px;
}

.prom-card-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
}

.warehouse-card-head,
.warehouse-stock-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.warehouse-card-head h3,
.warehouse-stock-head h3 {
  font-size: 15px;
  margin: 0;
}

.warehouse-card-head p,
.warehouse-stock-head p {
  font-size: 12px;
  margin-top: 3px;
}

.warehouse-chip,
.warehouse-filter-pill {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #475467;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  white-space: nowrap;
}

.warehouse-trend {
  align-items: end;
  background: linear-gradient(180deg, #fbfcff 0, #f5f7fb 100%);
  border: 1px solid #eef1f5;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(12, 1fr);
  height: 150px;
  margin-top: 12px;
  padding: 16px;
}

.warehouse-trend span {
  background: linear-gradient(180deg, #6d5dfc, #47b7f5);
  border-radius: 999px 999px 2px 2px;
  min-height: 12px;
}

.warehouse-chart-legend {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.warehouse-chart-legend span {
  color: var(--muted);
  font-size: 12px;
}

.warehouse-bars {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.warehouse-bar-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(90px, 1fr) minmax(80px, 1fr) max-content;
}

.warehouse-bar-row span,
.warehouse-bar-row strong {
  font-size: 12px;
}

.warehouse-bar-row span {
  color: #475467;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-bar-row div {
  background: #edf1f7;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.warehouse-bar-row i {
  background: #635bff;
  border-radius: inherit;
  display: block;
  height: 100%;
}

.warehouse-dashboard-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  min-width: 0;
}

.warehouse-main-column,
.warehouse-side-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.warehouse-side-column {
  position: sticky;
  top: 12px;
}

.warehouse-full-detail {
  display: grid;
  gap: 12px;
}

.warehouse-focused-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  min-width: 0;
}

.warehouse-focused-picker .warehouse-stock-table-shell {
  max-height: calc(100vh - 330px);
  min-height: 420px;
}

.warehouse-focused-action {
  align-self: start;
  display: grid;
  gap: 12px;
}

.warehouse-focused-action > .detail-form,
.warehouse-focused-action > .supplier-order-workarea {
  margin: 0;
}

.write-off-journal {
  overflow: hidden;
}

.write-off-journal .section-head {
  align-items: start;
  gap: 14px;
}

.write-off-journal .compact-kpis {
  margin: 0;
  min-width: 420px;
}

.write-off-table {
  min-width: 980px;
}

.write-off-table th,
.write-off-table td {
  vertical-align: top;
}

.warehouse-stock-card {
  display: grid;
  gap: 12px;
}

.warehouse-dashboard-page .warehouse-toolbar {
  align-items: end;
  background: #fbfcff;
  border: 1px solid #e6ebf4;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.35fr) minmax(130px, 0.28fr) auto;
  margin-bottom: 0;
  padding: 8px;
}

.warehouse-dashboard-page .warehouse-toolbar label {
  font-size: 12px;
}

.warehouse-dashboard-page .warehouse-toolbar input,
.warehouse-dashboard-page .warehouse-toolbar select {
  min-height: 32px;
  padding: 5px 8px;
}

.warehouse-stock-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: calc(100vh - 470px);
  min-height: 360px;
  overflow: auto;
}

.warehouse-table-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 10px;
  justify-content: space-between;
}

.warehouse-table-footer strong {
  color: #4f46e5;
}

.warehouse-stock-table {
  border: 0;
  min-width: 1160px;
}

.warehouse-stock-table th,
.warehouse-stock-table td {
  font-size: 12px;
  line-height: 1.18;
  padding: 6px 8px;
  vertical-align: middle;
}

.warehouse-stock-table th {
  background: #f8fafc;
  color: #4b5563;
  position: sticky;
  top: 0;
  z-index: 2;
}

.warehouse-product-cell {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 250px;
}

.warehouse-product-cell .product-thumb {
  flex: 0 0 auto;
  margin-right: 0;
}

.warehouse-product-cell strong,
.warehouse-product-cell span,
.warehouse-row-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-product-cell span,
.warehouse-row-sub {
  color: var(--muted);
  font-size: 11px;
}

.warehouse-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 7px;
  white-space: nowrap;
}

.warehouse-status.status-success {
  background: #eaf8f0;
  border-color: #b7dfc3;
  color: #127446;
}

.warehouse-status.status-warning {
  background: #fff7d6;
  border-color: #e7c665;
  color: #775200;
}

.warehouse-status.status-danger {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.warehouse-status.status-info {
  background: #eef3ff;
  border-color: #cfd8ff;
  color: #344054;
}

.warehouse-status.status-muted {
  background: #f2f4f7;
  color: #667085;
}

.warehouse-stock-row.selected-row td {
  background: #eef2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
}

.warehouse-stock-row:hover td {
  background: #f6f8ff;
}

.warehouse-alert-list,
.warehouse-operation-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.warehouse-alert {
  background: #fbfcff;
  border: 1px solid #e6ebf4;
  border-radius: 8px;
  display: grid;
  gap: 2px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 58px;
  padding: 8px;
  text-align: left;
}

.warehouse-alert span {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  justify-content: center;
  min-height: 34px;
}

.warehouse-alert strong,
.warehouse-alert small {
  display: block;
}

.warehouse-alert small {
  color: var(--muted);
  font-size: 12px;
}

.warehouse-alert.alert-danger span {
  background: #ffe4e4;
  color: #b42318;
}

.warehouse-alert.alert-warning span {
  background: #fff7d6;
  color: #775200;
}

.warehouse-alert.alert-info span {
  background: #eef3ff;
  color: #4f46e5;
}

.warehouse-alert.alert-success span {
  background: #eaf8f0;
  color: #127446;
}

.warehouse-operation {
  border-bottom: 1px solid #eef1f5;
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
}

.warehouse-operation:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.warehouse-operation span,
.warehouse-operation small {
  color: var(--muted);
  font-size: 11px;
}

.warehouse-operation strong {
  font-size: 12px;
  line-height: 1.3;
}

.warehouse-usage {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.warehouse-usage > div {
  background: #edf1f7;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.warehouse-usage > div span {
  background: #635bff;
  display: block;
  height: 100%;
}

.warehouse-usage strong {
  font-size: 18px;
}

.warehouse-usage small {
  color: var(--muted);
}

.warehouse-dashboard-detail {
  max-height: calc(100vh - 120px);
  overflow: auto;
  position: static;
}

.warehouse-wide-workarea {
  overflow: auto;
}

.selected-row td {
  background: #eef8f1;
}

.product-row {
  cursor: pointer;
}

.product-row:hover td {
  background: #f4fbf6;
}

.movement-panel {
  margin-top: 16px;
}

.order-card {
  margin-bottom: 16px;
}

.order-detail-page {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.order-detail-top {
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 18px;
}

.order-detail-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.order-detail-hero-top {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: 170px minmax(140px, 0.8fr) minmax(160px, 1fr) minmax(150px, 0.85fr) minmax(135px, 0.75fr) minmax(135px, 0.75fr);
}

.order-detail-hero .order-back-button {
  align-self: stretch;
  min-height: 44px;
  white-space: nowrap;
}

.order-hero-meta {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
}

.order-hero-meta > span {
  color: #667085;
  font-size: var(--work-label-font-size);
  font-weight: 900;
  text-transform: uppercase;
}

.order-hero-meta > strong {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: var(--work-hero-value-font-size);
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-hero-meta > small {
  color: var(--muted);
  font-size: var(--work-meta-font-size);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-hero-amount strong {
  color: #0f172a;
  font-size: var(--work-amount-font-size);
}

.order-hero-route > strong,
.order-hero-document > strong {
  overflow: visible;
}

.order-detail-hero-actions {
  border-top: 1px solid #edf1f7;
  justify-content: flex-end;
  padding-top: 8px;
}

.order-detail-hero-actions > button,
.order-detail-hero-actions .order-print-menu-wrap > button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
  min-width: 120px;
}

.order-action-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}

.order-action-icon {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 22px;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.order-action-icon svg {
  display: block;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.order-action-button.primary .order-action-icon,
.primary.order-action-button .order-action-icon {
  background: rgba(255, 255, 255, 0.16);
}

.order-action-button.ghost .order-action-icon,
.ghost.order-action-button .order-action-icon {
  background: #eff6ff;
  color: #2563eb;
}

.order-action-button.danger-button .order-action-icon {
  background: #fff1f2;
  color: #dc2626;
}

.order-detail-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.order-detail-title h2 {
  font-size: 24px;
}

.order-detail-actions,
.order-lines-actions,
.order-side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.order-detail-actions button {
  padding: 0 14px;
}

.order-print-menu-wrap {
  position: relative;
}

.order-print-menu {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 6px;
  min-width: 240px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
}

.order-print-menu button {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 2px;
  height: auto;
  justify-items: start;
  min-height: 48px;
  padding: 9px 10px;
  text-align: left;
}

.order-print-menu button:hover {
  background: #eef6ff;
  border-color: #bfdbfe;
}

.order-print-menu button:disabled {
  background: #f1f5f9;
  border-color: transparent;
  color: #94a3b8;
  cursor: not-allowed;
}

.order-print-menu button.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.order-print-menu span {
  font-size: 13px;
  font-weight: 700;
}

.order-print-menu strong {
  color: var(--muted);
  font-size: 12px;
}

.order-detail-tabs {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 12px;
}

.order-detail-tabs a {
  border-bottom: 2px solid transparent;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  padding: 13px 10px 11px;
  text-decoration: none;
  white-space: nowrap;
}

.order-detail-tabs a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.order-detail-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 330px);
  min-width: 0;
}

.order-detail-layout-full {
  grid-template-columns: minmax(0, 1fr);
}

.order-detail-main,
.order-detail-side {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.order-detail-main > *,
.order-detail-side > * {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.order-detail-side {
  position: sticky;
  top: 12px;
}

.order-detail-panel,
.order-side-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
}

.order-detail-panel h3,
.order-side-card h3 {
  font-size: 16px;
  margin: 0;
}

.order-info-panel {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.order-info-column {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-right: 14px;
}

.order-info-column:last-child {
  border-right: 0;
  padding-right: 0;
}

.order-work-summary {
  background: #f8fafc;
  display: grid;
  gap: 10px;
  overflow: hidden;
  padding: 12px;
}

.order-work-identity {
  background: #ffffff;
}

.order-work-summary-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr);
}

.order-work-summary-cell {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px;
}

.order-work-summary-cell span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-work-summary-cell:nth-child(1) {
  border-left-color: #0f172a;
}

.order-work-summary-cell:nth-child(2) {
  border-left-color: #0ea5e9;
}

.order-work-summary-cell-status {
  border-left-color: #4f46e5;
}

.order-work-summary-cell-payment {
  border-left-color: #f59e0b;
}

.order-work-summary-cell strong {
  align-items: center;
  display: flex;
  min-height: 28px;
  min-width: 0;
}

.order-work-summary-cell small {
  color: #667085;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-work-summary-cell-status .order-workflow-inline-editor,
.order-work-summary-cell-status .manager-status-inline-editor,
.order-work-summary-cell-payment .order-payment-marker,
.order-work-summary-cell-payment .site-request-state-badge {
  width: fit-content;
}

.order-manager-status-inline-editor .site-status-inline-select {
  min-width: 0;
}

.order-work-core-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr);
}

.order-detail-core-grid {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

.order-detail-side-stack {
  align-self: start;
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.order-detail-lines-grid {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.order-detail-lines-grid > * {
  min-width: 0;
}

.order-status-band {
  align-items: stretch;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.order-status-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  display: grid;
  gap: 3px 6px;
  min-width: 0;
  padding: 7px 9px;
}

.order-status-card::before {
  align-items: center;
  background-color: #eff6ff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 22px 22px;
  border-radius: 50%;
  color: #2563eb;
  content: "";
  display: inline-flex;
  grid-row: 1 / span 2;
  height: 23px;
  justify-content: center;
  width: 23px;
}

.order-status-card {
  grid-template-columns: 25px minmax(0, 1fr);
}

.order-status-card span {
  color: #667085;
  font-size: var(--work-label-font-size);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.order-status-card strong {
  align-items: center;
  display: flex;
  min-width: 0;
}

.order-status-card-value {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.order-status-card-value strong {
  min-width: 0;
}

.order-payment-link-trigger,
.order-status-mini-action {
  max-width: 100%;
  min-height: 27px;
  overflow-wrap: anywhere;
  padding: 3px 8px;
  white-space: normal;
}

.order-status-payment-due-form {
  background: #ffffff;
  border: 1px solid #e5ebf3;
  border-radius: 7px;
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 7px;
}

.order-status-payment-due-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-status-payment-due-form input {
  min-width: 0;
  width: 100%;
}

.order-status-card-main {
  border-left-color: #16a34a;
}

.order-status-card-main::before {
  background-color: #dcfce7;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8.5' stroke='%2316A34A' stroke-width='2'/%3E%3Cpath d='M8 12.3l2.5 2.5L16.5 9' stroke='%2316A34A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.order-status-card-document {
  border-left-color: #7c3aed;
}

.order-status-card-document::before {
  background-color: #f3e8ff;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 4h7l4 4v12H7z' stroke='%237C3AED' stroke-width='1.8'/%3E%3Cpath d='M14 4v5h5' stroke='%237C3AED' stroke-width='1.8'/%3E%3Cpath d='M10 13h5M10 16h4' stroke='%237C3AED' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.order-status-card-payment {
  border-left-color: #2563eb;
}

.order-status-card-payment::before {
  background-color: #dbeafe;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='6.5' width='16' height='11' rx='2' stroke='%232563EB' stroke-width='1.8'/%3E%3Cpath d='M4.5 10h15' stroke='%232563EB' stroke-width='1.8'/%3E%3Cpath d='M8 14h4' stroke='%232563EB' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.order-status-card-finance {
  border-left-color: #f59e0b;
}

.order-status-card-finance::before {
  background-color: #fef3c7;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8.5' stroke='%23F59E0B' stroke-width='2'/%3E%3Cpath d='M12 7.5V12l3 2' stroke='%23F59E0B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.order-status-card-reminder {
  border-left-color: #f59e0b;
}

.order-status-card-reminder::before {
  background-color: #fff7ed;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8.5' stroke='%23F59E0B' stroke-width='2'/%3E%3Cpath d='M12 7.5v5l3 2' stroke='%23F59E0B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7.5 4.5l-2 2M16.5 4.5l2 2' stroke='%23F59E0B' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.order-status-card-reminder.is-open {
  grid-column: span 2;
}

.order-next-step-panel {
  align-items: center;
  border-left-width: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: space-between;
}

.order-next-step-panel > div:first-child {
  display: grid;
  flex: 1 1 320px;
  gap: 3px;
  min-width: 0;
}

.order-next-step-panel strong {
  color: var(--ink);
}

.order-next-step-panel span {
  color: #475467;
  line-height: 1.35;
}

.order-next-step-warning {
  border-left-color: #f59e0b;
}

.order-next-step-danger {
  border-left-color: #dc2626;
}

.order-next-step-success {
  border-left-color: #16a34a;
}

.order-next-step-actions {
  flex: 0 1 auto;
}

.order-revision-marker {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 8px 10px;
}

.order-revision-marker strong {
  color: #9a3412;
  font-size: 13px;
}

.order-revision-marker span {
  color: #7c2d12;
  font-size: 12px;
  line-height: 1.35;
}

.order-work-table-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.order-work-table-card h3 {
  background: #e0f2fe;
  color: #075985;
  font-size: 15px;
  margin: 0;
  padding: 8px 10px;
  text-align: left;
}

.order-work-table-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
  min-height: 31px;
}

.order-work-table-row.order-phone-row {
  grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr) 36px;
}

.order-work-table-row + .order-work-table-row {
  border-top: 1px solid var(--line);
}

.order-work-table-row span,
.order-work-table-row strong {
  align-items: center;
  display: flex;
  min-width: 0;
  padding: 6px 9px;
}

.order-work-table-row span {
  background: #f8fbff;
  border-right: 1px solid var(--line);
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.order-work-table-row strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.order-work-table-row .link-button {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: left;
}

.order-work-quick-facts {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
}

.order-work-quick-facts div {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
}

.order-work-quick-facts div:last-child {
  border-right: 0;
}

.order-work-quick-facts span,
.order-work-comment span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-work-quick-facts strong,
.order-work-comment strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.order-work-comment {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  border-top: 1px solid #f4d277;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.order-field-row {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(88px, 0.5fr) minmax(0, 1fr);
  min-width: 0;
}

.order-field-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-field-row strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-field-row .link-button {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.order-finance-card {
  gap: 8px;
}

.order-finance-card,
.order-documents-card {
  display: grid;
  gap: 8px;
}

.order-card-section-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.order-card-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.order-finance-total {
  display: grid;
  gap: 4px;
  padding-top: 0;
  text-align: right;
}

.order-finance-total span,
.order-finance-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-finance-total strong {
  font-size: 22px;
}

.order-finance-row {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.order-finance-row strong {
  font-size: 15px;
}

.order-detail-side-stack .order-finance-card {
  align-self: start;
  background: #ffffff;
  padding: 12px;
}

.order-detail-side-stack .order-finance-total {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
}

.order-detail-side-stack .order-finance-total strong {
  color: #2563eb;
  font-size: 23px;
  line-height: 1.05;
}

.order-finance-metrics {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(86px, 0.72fr) minmax(0, 1.28fr);
  min-width: 0;
}

.order-detail-side-stack .order-finance-row {
  align-items: start;
  background: #f8fafc;
  border: 1px solid #e5ebf3;
  border-radius: 7px;
  display: grid;
  gap: 2px;
  min-height: 38px;
  min-width: 0;
  overflow: hidden;
  padding: 6px 7px;
}

.order-detail-side-stack .order-finance-row span {
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.order-detail-side-stack .order-finance-row strong {
  font-size: 13px;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.order-detail-side-stack .order-finance-row-due strong,
.order-detail-side-stack .order-finance-row-due-date strong {
  overflow-wrap: normal;
  word-break: normal;
}

.order-detail-side-stack .order-finance-row-due-date strong {
  display: block;
  font-size: 12px;
  max-width: 100%;
}

.order-detail-side-stack .order-finance-row-paid strong,
.order-detail-side-stack .order-finance-row-debt strong,
.order-detail-side-stack .order-finance-row-advance strong {
  font-size: 12px;
}

.order-finance-payment-row {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  padding: 9px 10px;
}

.order-finance-payment-row label {
  display: grid;
  font-size: 11px;
  gap: 4px;
  min-width: 0;
}

.order-finance-payment-row input {
  min-width: 0;
  width: 100%;
}

.order-finance-payment-row button {
  width: 100%;
}

.order-detail-side-stack .order-payment-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  justify-content: stretch;
}

.order-detail-side-stack .order-payment-actions > button {
  min-height: 38px;
  white-space: normal;
  width: 100%;
}

.order-operations-card {
  display: grid;
  gap: 8px;
}

.order-detail-side-stack .order-operations-actions {
  display: grid;
  gap: 8px;
  justify-content: stretch;
}

.order-detail-side-stack .order-operations-actions > button {
  min-height: 38px;
  width: 100%;
}

.order-danger-zone {
  border-color: #fecdd3;
  display: grid;
  gap: 10px;
}

.order-danger-zone .order-card-section-head span {
  color: #991b1b;
}

.order-danger-list {
  display: grid;
  gap: 8px;
}

.order-danger-item {
  align-items: center;
  background: #fff7f7;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 10px;
}

.order-danger-item-restore {
  background: #f8fafc;
  border-color: #dce5f2;
}

.order-danger-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-danger-item strong {
  color: var(--ink);
}

.order-danger-item span {
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
}

.order-payment-reminder-details {
  background: #f8fafc;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  padding: 0;
}

.order-payment-reminder-details summary {
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  padding: 9px 10px;
}

.order-payment-reminder-details summary::-webkit-details-marker {
  display: none;
}

.order-payment-reminder-details[open] summary {
  border-bottom: 1px solid #e5ebf3;
}

.order-payment-reminder-details .payment-due-inline-form {
  display: grid;
  gap: 8px;
  padding: 9px 10px;
}

.order-payment-reminder-details .payment-due-inline-form label {
  display: grid;
  gap: 4px;
}

.order-detail-side-stack .order-documents-card {
  padding: 12px;
}

.order-detail-lines-grid .order-documents-card {
  align-self: start;
  padding: 12px;
}

.order-detail-side-stack .order-document-list,
.order-detail-lines-grid .order-document-list {
  gap: 6px;
  margin: 0;
}

.order-detail-side-stack .order-document-row,
.order-detail-lines-grid .order-document-row {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 46px;
  padding: 8px 9px;
}

.order-detail-side-stack .order-documents-card > button,
.order-detail-lines-grid .order-documents-card > button {
  min-height: 38px;
}

.order-detail-core-grid > .order-finance-card {
  align-self: stretch;
  background: #ffffff;
  padding: 12px;
}

.order-detail-core-grid > .order-finance-card .order-finance-total {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px;
  text-align: left;
}

.order-detail-core-grid > .order-finance-card .order-finance-total strong {
  color: #2563eb;
  font-size: 26px;
  line-height: 1.05;
}

.order-detail-core-grid > .order-finance-card .order-finance-row {
  border-bottom: 1px solid #eef2f7;
  padding: 6px 0;
}

.order-detail-core-grid > .order-finance-card .order-finance-row:last-of-type {
  border-bottom: 0;
}

.order-detail-core-grid > .order-finance-card > label {
  display: grid;
  gap: 5px;
}

.order-detail-core-grid > .order-finance-card .order-payment-actions {
  justify-content: stretch;
}

.order-detail-core-grid > .order-finance-card .order-payment-actions > button {
  flex: 1 1 140px;
}

.order-detail-main > .order-finance-card {
  align-items: end;
  display: grid;
  gap: 8px 10px;
  grid-template-columns: minmax(150px, 0.9fr) repeat(5, minmax(104px, 0.55fr)) minmax(220px, 1fr);
  padding: 10px 12px;
}

.order-detail-main > .order-finance-card h3 {
  font-size: 15px;
  grid-column: 1 / -1;
  margin: 0;
}

.order-detail-main > .order-finance-card .order-finance-total {
  gap: 2px;
  padding: 0;
  text-align: left;
}

.order-detail-main > .order-finance-card .order-finance-total strong {
  font-size: 19px;
  line-height: 1.15;
}

.order-detail-main > .order-finance-card .order-finance-row {
  align-items: start;
  background: #f8fafc;
  border: 1px solid #e5ebf3;
  border-radius: 6px;
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 7px 8px;
}

.order-detail-main > .order-finance-card .order-finance-row strong {
  font-size: 13px;
  line-height: 1.2;
}

.order-detail-main > .order-finance-card .order-finance-total span,
.order-detail-main > .order-finance-card .order-finance-row span {
  font-size: 11px;
}

.order-detail-main > .order-finance-card .payment-progress,
.order-detail-main > .order-finance-card .payment-progress-row {
  grid-column: 1 / -1;
}

.order-detail-main > .order-finance-card > label {
  display: grid;
  font-size: 11px;
  gap: 4px;
}

.order-detail-main > .order-finance-card .order-payment-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.order-detail-main > .order-finance-card .payment-due-inline-form {
  display: grid;
  flex: 1 1 240px;
  gap: 6px;
  min-width: 220px;
}

.order-detail-main > .order-finance-card .payment-due-inline-form label {
  gap: 4px;
}

.order-timeline {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-timeline-step {
  display: grid;
  gap: 10px;
  grid-template-columns: 24px minmax(0, 1fr);
  position: relative;
}

.order-timeline-step::after {
  background: #d9dee7;
  content: "";
  height: calc(100% + 8px);
  left: 10px;
  position: absolute;
  top: 22px;
  width: 2px;
}

.order-timeline-step:last-child::after {
  display: none;
}

.order-timeline-step > span {
  background: #e9edf5;
  border: 2px solid #cfd6e2;
  border-radius: 50%;
  height: 22px;
  margin-top: 2px;
  width: 22px;
  z-index: 1;
}

.order-timeline-step.done > span {
  background: var(--accent);
  border-color: var(--accent);
}

.order-timeline-step.active > span {
  background: #635bff;
  border-color: #635bff;
}

.order-timeline-step.payment-unpaid > span,
.order-timeline-step.payment-unpaid.done > span,
.order-timeline-step.payment-unpaid.active > span {
  background: #f59e0b;
  border-color: #f59e0b;
  box-shadow: 0 0 0 5px #fff7ed;
  color: #ffffff;
}

.order-timeline-step.payment-unpaid > span::before {
  content: "!";
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.order-timeline-step.payment-partial > span,
.order-timeline-step.payment-partial.done > span,
.order-timeline-step.payment-partial.active > span {
  background: #f59e0b;
  border-color: #f59e0b;
}

.order-timeline-step.payment-paid > span,
.order-timeline-step.payment-paid.done > span,
.order-timeline-step.payment-paid.active > span {
  background: #16a34a;
  border-color: #16a34a;
}

.order-timeline-step strong,
.order-timeline-step small {
  display: block;
}

.order-timeline-step small {
  color: var(--muted);
  margin-top: 3px;
}

.order-execution-card {
  overflow: hidden;
}

.order-detail-main .order-execution-card .order-timeline {
  align-items: start;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  margin-top: 12px;
  overflow-x: auto;
  padding: 2px 2px 4px;
}

.order-detail-main .order-execution-card .order-timeline-step {
  align-content: start;
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr;
  justify-items: center;
  min-width: 82px;
  padding: 0 5px;
  text-align: center;
}

.order-detail-main .order-execution-card .order-timeline-step::after {
  height: 2px;
  left: calc(50% + 13px);
  right: calc(-50% + 13px);
  top: 13px;
  width: auto;
}

.order-detail-main .order-execution-card .order-timeline-step > span {
  height: 24px;
  margin-top: 0;
  position: relative;
  width: 24px;
}

.order-detail-main .order-execution-card .order-timeline-step strong {
  font-size: 11px;
  line-height: 1.15;
}

.order-detail-main .order-execution-card .order-timeline-step small {
  font-size: 10px;
  line-height: 1.15;
  margin-top: 4px;
}

.order-pick-facts-collapsible {
  padding: 0;
}

.order-pick-facts-collapsible summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 12px 14px;
}

.order-pick-facts-collapsible summary::-webkit-details-marker {
  display: none;
}

.order-pick-facts-collapsible summary h3 {
  margin: 0 0 3px;
}

.order-pick-summary-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.order-pick-open-label::after {
  content: " факт";
}

.order-pick-facts-collapsible[open] .order-pick-open-label {
  background: #eef6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.order-pick-facts-collapsible[open] .order-pick-open-label::before {
  content: "Сховати";
}

.order-pick-facts-collapsible[open] .order-pick-open-label {
  font-size: 0;
}

.order-pick-facts-collapsible[open] .order-pick-open-label::before {
  font-size: 12px;
}

.order-pick-facts-collapsible table {
  border-top: 1px solid var(--line);
  margin: 0;
}

.order-document-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.site-request-document-list {
  margin: 0;
}

.site-request-order-documents .order-document-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.site-request-order-documents .order-document-row {
  min-height: 62px;
}

.site-request-order-documents .order-document-list > .ghost {
  min-height: 54px;
  width: 100%;
}

.site-request-top-documents .site-request-order-documents {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  box-shadow: none;
  padding: 8px 10px;
}

.site-request-top-documents .site-request-section-title {
  margin-bottom: 6px;
}

.site-request-top-documents .site-request-section-title strong {
  font-size: 13px;
}

.site-request-top-documents .site-request-section-title span {
  font-size: 11px;
}

.site-request-top-documents .official-doc-form {
  background: #f8fafc;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
}

.site-request-top-documents .official-doc-section {
  gap: 6px;
}

.site-request-top-documents .official-doc-section input,
.site-request-top-documents .official-doc-section select {
  min-height: 30px;
  padding: 5px 7px;
}

.site-request-top-documents .order-document-list {
  display: none;
}

.order-document-row {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 3px;
  min-height: 54px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.order-document-row.is-static {
  cursor: default;
}

.order-document-row span,
.order-document-row small {
  color: var(--muted);
  font-size: 12px;
}

.order-document-row strong {
  color: #344054;
  font-size: 13px;
}

.official-doc-form {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.official-doc-form-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.official-doc-form-head div {
  display: grid;
  gap: 2px;
}

.official-doc-form-head strong {
  color: var(--ink);
  font-size: 14px;
}

.official-doc-form-head span,
.official-doc-section-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.official-doc-section {
  display: grid;
  gap: 8px;
}

.official-doc-section label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
}

.official-doc-section input,
.official-doc-section select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-width: 0;
  padding: 8px 9px;
  width: 100%;
}

.official-doc-inline-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.official-doc-inline-actions span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.site-request-official-doc-form {
  margin-bottom: 10px;
}

.site-request-official-buyer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-request-official-buyer-grid .official-doc-section-title {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .site-request-official-buyer-grid {
    grid-template-columns: 1fr;
  }
}

.official-doc-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.official-doc-actions button {
  width: 100%;
}

.official-doc-modal-backdrop {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.official-doc-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 48px);
  max-width: 920px;
  overflow: auto;
  padding: 16px;
  width: min(920px, 96vw);
}

.official-doc-dialog-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.official-doc-dialog-head h2 {
  font-size: 22px;
  margin: 2px 0 0;
}

.site-request-documents-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(2px);
  justify-content: center;
  padding: 24px;
}

.site-request-documents-dialog {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 48px);
  max-width: 980px;
  overflow: auto;
  padding: 16px;
  width: min(980px, 96vw);
}

.site-request-documents-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.site-request-documents-title {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.site-request-documents-title .order-action-icon {
  background: #eef4ff;
  border-color: #c7d9ff;
  color: #2563eb;
  flex: 0 0 auto;
  height: 42px;
  width: 42px;
}

.site-request-documents-title span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-request-documents-title h2 {
  font-size: 24px;
  line-height: 1.1;
  margin: 2px 0 0;
}

.site-request-documents-title p {
  color: var(--muted);
  font-size: 13px;
  margin: 3px 0 0;
}

.site-request-documents-dialog .site-request-order-documents {
  box-shadow: none;
  margin: 0;
}

.site-request-documents-dialog .site-request-section-title {
  margin-bottom: 8px;
}

.site-request-documents-dialog .official-doc-form {
  margin-bottom: 10px;
}

.order-lines-workspace {
  padding: 0;
  overflow: hidden;
}

.order-lines-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.order-lines-head h3 {
  font-size: 20px;
  margin-top: 2px;
}

.order-card-table-wrap {
  overflow: auto;
}

.order-card-lines-table {
  border: 0;
  min-width: 1040px;
}

.order-card-lines-table th,
.order-card-lines-table td {
  font-size: 14px;
  padding: 7px 8px;
}

.order-card-lines-table th:nth-child(1),
.order-card-lines-table td:nth-child(1) {
  text-align: center;
  width: 54px;
}

.order-card-lines-table th:nth-child(2),
.order-card-lines-table td:nth-child(2) {
  min-width: 280px;
}

.order-product-cell {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  padding-right: 30px;
  position: relative;
}

.order-product-cell strong {
  display: block;
  font-size: 15px;
  line-height: 1.22;
  min-width: 0;
}

.order-product-cell span {
  display: block;
  min-width: 0;
}

.order-product-cell span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  margin-top: 2px;
}

.order-card-lines-table input,
.order-card-lines-table select,
.order-card-lines-table .link-button {
  font-size: 14px;
}

.order-card-lines-table tfoot td {
  background: #f8faf9;
  font-weight: 800;
}

.order-lines-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px 14px;
}

.order-line-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 8px 10px;
  grid-template-columns: minmax(0, 1fr) minmax(128px, auto) minmax(86px, auto) minmax(92px, auto) auto;
  min-width: 0;
  padding: 9px 10px;
}

.order-line-card.order-line-stock-row-danger,
.order-line-card.order-line-stock-row-negative,
.order-line-card.order-line-stock-row-missing {
  border-color: #fecaca;
  box-shadow: inset 3px 0 0 #ef4444;
}

.order-line-card.order-line-stock-row-warning,
.order-line-card.order-line-stock-row-zero {
  border-color: #fed7aa;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.order-line-product {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: 38px minmax(0, 1fr);
  min-width: 0;
  position: relative;
}

.order-line-product .product-corner-link {
  left: 26px;
  right: auto;
  top: 0;
}

.order-line-product .product-thumb {
  height: 38px;
  width: 38px;
}

.order-line-product-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.order-line-product-text > strong {
  color: #101828;
  font-size: 14px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.order-line-product-text > span,
.order-line-upsell span,
.order-line-money span,
.order-line-quantity-static span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-line-stock-area,
.order-line-price-type,
.order-line-qty-area,
.order-line-money,
.order-line-upsell {
  min-width: 0;
}

.order-line-stock-area {
  grid-column: 1 / 3;
}

.order-line-price-type {
  grid-column: 3 / -1;
}

.order-line-stock-badge {
  border: 1px solid #dbe5ff;
  border-radius: 8px;
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 6px 8px;
}

.order-line-stock-badge strong,
.order-line-stock-badge small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-line-stock-badge strong {
  font-size: 12px;
}

.order-line-stock-badge small {
  color: #667085;
  font-size: 11px;
}

.order-line-stock-badge.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.order-line-stock-badge.warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.order-line-stock-badge.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.order-line-price-type .line-price-type {
  min-width: 0;
}

.order-line-price-type .line-price-type-select {
  min-width: 0;
  width: 100%;
}

.order-line-quantity-control {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  grid-template-columns: 28px minmax(44px, 58px) 28px auto;
  min-width: 0;
  padding: 3px;
}

.order-line-quantity-control button {
  height: 28px;
  min-height: 28px;
  padding: 0;
  width: 28px;
}

.order-line-quantity-control input {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 6px;
  color: #101828;
  font-weight: 800;
  height: 28px;
  min-width: 0;
  padding: 0 5px;
  text-align: center;
}

.order-line-quantity-control input::-webkit-outer-spin-button,
.order-line-quantity-control input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.order-line-quantity-control span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.order-line-quantity-static,
.order-line-money,
.order-line-upsell {
  display: grid;
  gap: 2px;
}

.order-line-quantity-static strong,
.order-line-money strong,
.order-line-upsell strong {
  color: #101828;
  font-size: 13px;
  white-space: nowrap;
}

.order-line-sum strong {
  font-size: 15px;
}

.order-line-menu {
  justify-self: end;
  position: relative;
}

.order-line-menu summary {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  height: 34px;
  justify-content: center;
  list-style: none;
  width: 34px;
}

.order-line-menu summary::-webkit-details-marker {
  display: none;
}

.order-line-menu > div {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 7px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
}

.order-lines-total-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-width: 0;
  padding: 10px;
}

.order-lines-total-card > span,
.order-lines-total-card div span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-lines-total-card > strong {
  font-size: 18px;
  white-space: nowrap;
}

.order-lines-empty {
  background: #f8fafc;
  border: 1px dashed #dce5f2;
  border-radius: 8px;
  color: #667085;
  font-weight: 800;
  padding: 14px;
}

.order-conversation-panel {
  margin: 0 14px 12px;
}

.order-conversation-empty {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.order-conversation-empty strong {
  display: block;
  font-size: 16px;
}

.order-conversation-empty p {
  color: #667085;
  font-size: 13px;
  margin: 3px 0 0;
}

.order-conversation-chip:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.order-lines-total-row td {
  vertical-align: middle;
}

.order-lines-upsell-total {
  display: grid;
  gap: 2px;
}

.order-lines-upsell-total span {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-lines-upsell-total strong {
  font-size: 16px;
  white-space: nowrap;
}

.order-activity-panel {
  display: grid;
  gap: 12px;
}

.order-activity-list {
  border-top: 1px solid var(--line);
  display: grid;
}

.order-activity-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 3px;
  padding: 10px 0;
}

.order-activity-row:last-child {
  border-bottom: 0;
}

.order-activity-row strong {
  font-size: 13px;
}

.order-activity-row span,
.order-activity-row p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.order-detail-page .order-delivery-panel,
.order-detail-page .order-edit-panel,
.order-detail-page .order-return-panel,
.order-detail-page .order-return-history {
  margin: 0;
}

.order-return-workspace {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.order-return-workspace summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  list-style: none;
  padding: 14px 16px;
}

.order-return-workspace summary::-webkit-details-marker {
  display: none;
}

.order-return-workspace summary div {
  display: grid;
  gap: 3px;
}

.order-return-workspace summary strong {
  color: var(--text);
  font-size: 16px;
}

.order-return-workspace summary span,
.order-return-workspace summary small {
  color: var(--muted);
  font-size: 13px;
}

.order-return-workspace summary small {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap;
}

.order-return-workspace-body {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.invoice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 16px;
  padding: 24px;
}

.print-document.invoice,
.print-document.payment-receipt,
.print-document.official-document,
.print-document.purchase-receipt-print,
.print-document.daily-report-print,
.print-document.picking-sheet {
  display: none;
}

.print-document.print-active {
  display: block;
}

.print-root {
  display: none;
}

.document-title-row,
.signatures {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.document-brand {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.document-brand strong {
  font-size: 20px;
}

.document-brand span,
.document-brand p,
.document-parties p {
  color: var(--muted);
  margin: 0;
}

.document-parties {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 12px;
}

.picking-sheet {
  background: white;
  color: #111827;
  font-size: 12px;
  line-height: 1.32;
}

.picking-sheet-head h2 {
  font-size: 24px;
  margin: 0 0 4px;
}

.picking-sheet-parties {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.picking-sheet-note {
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  margin: 0 0 12px;
  padding: 10px 12px;
}

.picking-sheet-table th,
.picking-sheet-table td {
  vertical-align: top;
}

.picking-sheet-table th:nth-child(1),
.picking-sheet-table td:nth-child(1),
.picking-sheet-table th:nth-child(8),
.picking-sheet-table td:nth-child(8) {
  text-align: center;
  width: 44px;
}

.picking-sheet-table th:nth-child(2),
.picking-sheet-table td:nth-child(2) {
  width: 58px;
}

.picking-sheet-table th:nth-child(3),
.picking-sheet-table td:nth-child(3) {
  width: 92px;
}

.picking-stock-zero td,
.picking-stock-negative td,
.picking-stock-missing td {
  background: #fff7ed;
}

.picking-check-cell {
  font-size: 24px;
  line-height: 1;
}

.picking-sheet-footer {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.official-document {
  background: white;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
}

.official-document h2 {
  color: #111827;
  font-size: 22px;
  margin: 0 0 6px;
}

.official-document h4 {
  color: #111827;
  font-size: 13px;
  margin: 0 0 6px;
}

.official-payment-invoice {
  color: #111;
  font-size: 12px;
  line-height: 1.28;
}

.official-payment-warning {
  margin-bottom: 12px;
}

.official-payment-warning p {
  margin: 0 0 3px;
}

.payment-order-sample {
  margin: 10px 0 18px;
}

.payment-order-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.payment-order-sample table,
.official-invoice-table {
  border-collapse: collapse;
  width: 100%;
}

.payment-order-sample th,
.payment-order-sample td {
  border: 1px solid #111;
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
}

.payment-order-sample th {
  background: #f3f4f6;
  font-weight: 700;
  width: 18%;
}

.official-invoice-title {
  border-bottom: 2px solid #111;
  color: #111;
  font-size: 20px;
  margin: 14px 0 12px;
  padding-bottom: 8px;
  text-align: center;
}

.official-invoice-parties {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.official-invoice-parties p {
  margin: 0;
}

.official-invoice-table {
  font-size: 12px;
  margin-top: 10px;
}

.official-invoice-table th,
.official-invoice-table td {
  border-bottom: 1px solid #111;
  padding: 5px 6px;
  text-align: left;
  vertical-align: top;
}

.official-invoice-table thead th {
  border-top: 1px solid #111;
  font-weight: 700;
}

.official-invoice-table th:first-child,
.official-invoice-table td:first-child {
  text-align: center;
  width: 34px;
}

.official-invoice-table .numeric {
  text-align: right;
  white-space: nowrap;
}

.official-invoice-table small {
  color: #444;
  font-size: 11px;
}

.official-invoice-totals {
  display: grid;
  gap: 4px;
  margin: 10px 0 0 auto;
  width: 240px;
}

.official-invoice-totals p {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

.official-invoice-amount {
  margin-top: 10px;
}

.official-invoice-amount p {
  margin: 0 0 5px;
}

.official-invoice-signature {
  align-items: end;
  display: flex;
  gap: 18px;
  margin-top: 44px;
}

.official-invoice-signature strong {
  border-bottom: 1px solid #111;
  display: block;
  flex: 0 0 220px;
  height: 18px;
}

.official-requisites {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.official-requisites p {
  color: #344054;
  overflow-wrap: anywhere;
}

.official-document-meta {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 10px 12px;
}

.official-document-table th,
.official-document-table td {
  vertical-align: top;
}

.official-document-table td small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

.official-document-summary {
  break-inside: avoid;
}

.document-table {
  margin-top: 12px;
}

.invoice-photo-cell {
  text-align: center;
  width: 54px;
}

.invoice-product-photo {
  align-items: center;
  background: #eef1f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  overflow: hidden;
  width: 44px;
}

.invoice-product-photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.receipt-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  margin: 16px 0;
}

.receipt-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.receipt-summary span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.receipt-summary strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.report-summary-grid {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.invoice-total {
  display: grid;
  gap: 4px;
  font-size: 18px;
  font-weight: 700;
  margin-top: 16px;
  text-align: right;
}

.invoice-total span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.document-picking-list {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

.signatures {
  margin-top: 48px;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--warn);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.stats {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.dashboard-command {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dashboard-command h2 {
  font-size: 22px;
  margin-top: 4px;
}

.analytics-command {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.9fr) auto minmax(520px, 1.1fr);
  margin-bottom: 14px;
}

.analytics-command h2 {
  font-size: 22px;
  margin-top: 4px;
}

.analytics-filters {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.analytics-period-buttons {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-config {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  margin-bottom: 14px;
}

.analytics-toggle-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.analytics-toggle-group h3 {
  font-size: 15px;
  margin: 0;
}

.analytics-toggle-list {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.analytics-toggle-chip {
  align-items: flex-start;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 64px;
  min-width: 0;
  padding: 10px 12px;
  width: 100%;
}

.analytics-toggle-chip input {
  flex: 0 0 auto;
  height: 16px;
  margin: 3px 0 0;
  width: 16px;
}

.analytics-toggle-text {
  display: grid;
  gap: 2px;
  line-height: 1.2;
  min-width: 0;
}

.analytics-toggle-text strong {
  color: var(--ink);
  font-size: 14px;
}

.analytics-toggle-text small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.analytics-metric-card {
  display: grid;
  gap: 5px;
  grid-template-rows: auto 1fr auto;
  min-height: 116px;
}

.analytics-metric-card strong {
  align-self: end;
  font-size: 22px;
  line-height: 1.15;
  margin-top: 0;
}

.analytics-stats {
  grid-auto-rows: 1fr;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-bottom: 14px;
}

.analytics-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.analytics-panel {
  align-content: start;
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  width: 100%;
}

.analytics-wide-panel,
.analytics-panel:first-child {
  grid-row: auto;
}

.analytics-mini-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.analytics-table th,
.analytics-table td {
  white-space: nowrap;
}

.analytics-table td:first-child,
.analytics-table th:first-child {
  white-space: normal;
}

.analytics-delta {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-self: start;
  padding: 3px 7px;
}

.analytics-delta.positive {
  background: #eef8f1;
  color: var(--accent-dark);
}

.analytics-delta.negative {
  background: #ffe4e4;
  color: #b42318;
}

.analytics-delta.neutral {
  background: #eef1f5;
  color: var(--muted);
}

.analytics-report-page {
  color: #182033;
  display: grid;
  gap: 14px;
}

.analytics-report-head {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(300px, 1fr) max-content;
}

.analytics-report-head h1 {
  font-size: 28px;
  letter-spacing: 0;
  margin: 4px 0 2px;
}

.analytics-report-head p {
  color: #667085;
  margin: 0;
}

.analytics-global-search {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 8px 12px;
}

.analytics-global-search span,
.analytics-filter-field span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.analytics-global-search input {
  border: 0;
  min-height: 24px;
  padding: 0;
}

.analytics-global-search input:focus {
  outline: none;
}

.analytics-user-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 36px max-content;
  min-width: 170px;
  padding: 8px 12px;
}

.analytics-user-card span {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.analytics-user-card strong {
  font-size: 13px;
}

.analytics-user-card small {
  color: #667085;
}

.analytics-filter-panel {
  align-items: end;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(250px, 1.35fr) repeat(5, minmax(135px, 1fr)) minmax(260px, auto);
  padding: 12px;
}

.analytics-filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.analytics-filter-field select,
.analytics-filter-field input {
  background: #fbfcff;
  border: 1px solid #dfe5ef;
  border-radius: 6px;
  color: #182033;
  min-height: 36px;
}

.analytics-filter-period div {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.analytics-filter-actions {
  align-items: end;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.stock-analytics-page {
  min-width: 0;
  overflow: hidden;
}

.stock-analytics-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.75fr) minmax(220px, 1fr) minmax(260px, auto);
}

.stock-analytics-filter .analytics-filter-actions {
  flex-wrap: wrap;
  min-width: 0;
}

.stock-analytics-filter .analytics-period-buttons {
  min-width: 0;
}

.stock-analytics-filter button {
  white-space: nowrap;
}

.stock-analytics-period-summary {
  background: #fbfcff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
}

.stock-analytics-period-summary span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.stock-analytics-period-summary strong {
  color: #101828;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-analytics-period-summary small {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.analytics-customizer {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  color: #344054;
  overflow: hidden;
}

.analytics-customizer summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
}

.analytics-customizer-grid {
  border-top: 1px solid #eef1f5;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  padding: 12px;
}

.analytics-customizer .analytics-toggle-list {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.analytics-customizer .analytics-toggle-chip {
  min-height: 52px;
  padding: 8px 10px;
}

.analytics-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.analytics-channel-breakdown {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.analytics-channel-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  color: inherit;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  text-align: left;
}

.analytics-channel-card:hover,
.analytics-channel-card.active {
  border-color: rgba(79, 70, 229, 0.35);
  background: #f5f7ff;
}

.analytics-channel-card span {
  color: #475467;
  font-size: 13px;
  font-weight: 900;
}

.analytics-channel-card strong {
  color: #1d4ed8;
  font-size: 24px;
  line-height: 1.1;
}

.analytics-channel-card small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.analytics-kpi-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  display: grid;
  gap: 8px;
  min-height: 112px;
  min-width: 0;
  padding: 13px;
}

.analytics-kpi-head {
  align-items: center;
  color: #475467;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  min-width: 0;
}

.analytics-kpi-mark {
  align-items: center;
  background: #eef2ff;
  border-radius: 7px;
  color: #4f46e5;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.analytics-kpi-card.green .analytics-kpi-mark {
  background: #eaf8f0;
  color: #138050;
}

.analytics-kpi-card.red .analytics-kpi-mark {
  background: #ffe8ea;
  color: #c33131;
}

.analytics-kpi-card.violet .analytics-kpi-mark {
  background: #f0ecff;
  color: #6d4aff;
}

.analytics-kpi-card strong {
  font-size: 22px;
  line-height: 1.1;
}

.analytics-kpi-foot {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: max-content 1fr;
  min-width: 0;
}

.analytics-sparkline {
  height: 34px;
  width: 100%;
}

.analytics-sparkline polyline {
  fill: none;
  stroke: #5b5ff4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.analytics-sparkline.green polyline {
  stroke: #2fad72;
}

.analytics-sparkline.red polyline {
  stroke: #ef6f6c;
}

.analytics-sparkline.violet polyline {
  stroke: #7c65f6;
}

.analytics-dashboard-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 320px);
}

.analytics-main-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-width: 0;
}

.analytics-report-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px;
}

.analytics-report-card.span-4 {
  grid-column: span 4;
}

.analytics-report-card.span-5 {
  grid-column: span 5;
}

.analytics-report-card.span-6 {
  grid-column: span 6;
}

.analytics-report-card.span-7 {
  grid-column: span 7;
}

.analytics-report-card.span-8 {
  grid-column: span 8;
}

.analytics-report-card.span-12 {
  grid-column: 1 / -1;
}

.analytics-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.analytics-card-head h2 {
  font-size: 15px;
  margin: 0;
}

.analytics-card-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.analytics-chart-shell {
  min-height: 220px;
  overflow: hidden;
}

.analytics-line-chart,
.analytics-profit-chart {
  display: block;
  height: 100%;
  min-height: 220px;
  width: 100%;
}

.analytics-chart-gridline {
  stroke: #e7ebf3;
  stroke-width: 1;
}

.analytics-chart-axis,
.analytics-chart-label {
  fill: #667085;
  font-size: 11px;
  font-weight: 700;
}

.analytics-chart-label {
  text-anchor: middle;
}

.analytics-chart-area {
  fill: rgba(91, 95, 244, 0.12);
}

.analytics-chart-line {
  fill: none;
  stroke: #5b5ff4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.analytics-chart-dot {
  fill: #5b5ff4;
  stroke: #ffffff;
  stroke-width: 2;
}

.analytics-profit-bar {
  fill: rgba(91, 95, 244, 0.55);
}

.analytics-margin-line {
  fill: none;
  stroke: #31a66f;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.analytics-bar-list {
  display: grid;
  gap: 11px;
}

.analytics-bar-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(110px, 0.9fr) minmax(90px, 1fr) max-content;
}

.analytics-bar-row span {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-bar-row strong {
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.analytics-bar-track {
  background: #eef1f6;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.analytics-bar-track i {
  background: linear-gradient(90deg, #5b5ff4, #7f8cff);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.analytics-channel-layout {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 140px minmax(0, 1fr);
}

.analytics-donut {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  height: 132px;
  justify-content: center;
  position: relative;
  width: 132px;
}

.analytics-donut::after {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  height: 76px;
  position: absolute;
  width: 76px;
}

.analytics-donut span {
  font-size: 12px;
  font-weight: 900;
  max-width: 70px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.analytics-channel-list {
  display: grid;
  gap: 9px;
}

.analytics-channel-row {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 10px minmax(0, 1fr) max-content;
}

.analytics-channel-row i {
  border-radius: 999px;
  display: block;
  height: 10px;
  width: 10px;
}

.analytics-channel-row span {
  font-size: 12px;
  font-weight: 800;
}

.analytics-channel-row strong {
  font-size: 12px;
}

.analytics-channel-row small {
  color: #667085;
  grid-column: 2 / -1;
}

.analytics-report-table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

.analytics-report-table th,
.analytics-report-table td {
  border-bottom: 1px solid #eef1f5;
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
}

.analytics-report-table th {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.analytics-report-table td {
  color: #344054;
}

.analytics-report-table td strong {
  color: #182033;
}

.analytics-report-table small {
  color: #667085;
  display: block;
  margin-top: 2px;
}

.analytics-rank,
.analytics-avatar {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  margin-right: 8px;
  width: 24px;
}

.analytics-avatar {
  background: #f2f4f7;
  color: #344054;
}

.analytics-share-bar {
  background: #eef1f6;
  border-radius: 999px;
  display: inline-flex;
  height: 7px;
  margin-right: 8px;
  overflow: hidden;
  vertical-align: middle;
  width: 88px;
}

.analytics-share-bar i {
  background: #7c65f6;
  border-radius: inherit;
  display: block;
}

.analytics-ops-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-ops-column {
  border-right: 1px solid #eef1f5;
  display: grid;
  gap: 9px;
  padding-right: 12px;
}

.analytics-ops-column:last-child {
  border-right: 0;
  padding-right: 0;
}

.analytics-ops-column h3 {
  font-size: 13px;
  margin: 0 0 2px;
}

.analytics-ops-row {
  align-items: center;
  display: grid;
  gap: 2px 8px;
  grid-template-columns: minmax(0, 1fr) max-content;
  padding-left: 12px;
  position: relative;
}

.analytics-ops-row::before {
  background: #5b5ff4;
  border-radius: 999px;
  content: "";
  height: 8px;
  left: 0;
  position: absolute;
  top: 9px;
  width: 8px;
}

.analytics-ops-row.green::before {
  background: #31a66f;
}

.analytics-ops-row.amber::before {
  background: #f59e0b;
}

.analytics-ops-row.red::before {
  background: #ef6f6c;
}

.analytics-ops-row span {
  font-size: 12px;
  font-weight: 800;
}

.analytics-ops-row strong {
  font-size: 13px;
}

.analytics-ops-row small {
  color: #667085;
  grid-column: 1 / -1;
}

.analytics-ai-panel {
  align-self: start;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  display: grid;
  gap: 10px;
  padding: 14px;
  position: sticky;
  top: 14px;
}

.analytics-ai-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.analytics-ai-head h2 {
  font-size: 15px;
  margin: 0;
}

.analytics-ai-head span {
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
}

.analytics-ai-card {
  background: #fbfcff;
  border: 1px solid #e6ebf4;
  border-left: 4px solid #5b5ff4;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.analytics-ai-card.green {
  border-left-color: #31a66f;
}

.analytics-ai-card.amber {
  border-left-color: #f59e0b;
}

.analytics-ai-card.red {
  border-left-color: #ef6f6c;
}

.analytics-ai-card strong {
  font-size: 13px;
}

.analytics-ai-card p,
.analytics-ai-footer p {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.analytics-ai-card button {
  justify-self: start;
  min-height: 28px;
}

.analytics-ai-footer {
  background: #eef2ff;
  border: 1px solid #d8d2ff;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.analytics-status-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.analytics-status-chip.reserved {
  background: #fff7d6;
  color: #9a6700;
}

.analytics-status-chip.shipped {
  background: #e8f1ff;
  color: #2457a6;
}

.analytics-status-chip.paid {
  background: #eaf8f0;
  color: #127446;
}

.analytics-empty {
  align-items: center;
  background: #fbfcff;
  border: 1px dashed #dfe5ef;
  border-radius: 8px;
  color: #667085;
  display: flex;
  min-height: 92px;
  padding: 14px;
}

.settlements-dashboard {
  min-width: 0;
}

.settlements-filter-panel {
  grid-template-columns: minmax(180px, 1.1fr) repeat(5, minmax(120px, 1fr)) minmax(300px, auto);
}

.settlements-kpi-grid {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
}

.settlements-kpi small {
  color: #667085;
  font-size: 11px;
}

.settlement-channel-breakdown {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.settlement-channel-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  color: inherit;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px;
  text-align: left;
}

.settlement-channel-card:hover,
.settlement-channel-card.active {
  background: #f5f7ff;
  border-color: rgba(79, 70, 229, 0.35);
}

.settlement-channel-card span {
  color: #475467;
  font-size: 13px;
  font-weight: 900;
}

.settlement-channel-card strong {
  color: #1d4ed8;
  font-size: 24px;
  line-height: 1.08;
}

.settlement-channel-card small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.settlements-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 340px);
}

.settlements-main {
  min-width: 0;
}

.settlements-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.settlements-table-card {
  padding: 0;
}

.settlements-table-card .analytics-card-head {
  padding: 14px 14px 0;
}

.settlements-table {
  min-width: 1120px;
}

.settlements-table th,
.settlements-table td {
  padding: 9px 12px;
}

.settlement-counterparty-icon {
  align-items: center;
  background: #eef2ff;
  border-radius: 7px;
  color: #4f46e5;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  margin-right: 8px;
  width: 24px;
}

.settlement-type-pill,
.settlement-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.settlement-type-pill.customer {
  background: #eaf8f0;
  color: #127446;
}

.settlement-type-pill.supplier {
  background: #f0ecff;
  color: #5b3fc4;
}

.settlement-channel-cell {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.settlement-channel-pill,
.settlement-channel-muted {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
  justify-content: space-between;
  line-height: 1.1;
  padding: 4px 8px;
  white-space: nowrap;
}

.settlement-channel-pill.online {
  background: #e8f1ff;
  color: #175cd3;
}

.settlement-channel-pill.uman {
  background: #eaf8f0;
  color: #127446;
}

.settlement-channel-muted {
  background: #f3f4f6;
  color: #667085;
  justify-content: center;
}

.settlement-status.ok {
  background: #eaf8f0;
  color: #127446;
}

.settlement-status.waiting {
  background: #fff7d6;
  color: #9a6700;
}

.settlement-status.overdue {
  background: #ffe8ea;
  color: #c33131;
}

.settlement-status.advance {
  background: #e8f1ff;
  color: #175cd3;
}

.settlement-side-list {
  display: grid;
  gap: 10px;
}

.settlement-side-row,
.settlement-transaction {
  align-items: center;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) max-content;
  padding: 9px 10px;
}

.settlement-side-row span,
.settlement-transaction span {
  font-size: 12px;
  font-weight: 900;
  min-width: 0;
}

.settlement-side-row small,
.settlement-transaction small {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

.settlement-side-row strong,
.settlement-transaction strong {
  font-size: 12px;
  white-space: nowrap;
}

.settlement-side-row.red,
.settlement-transaction.red {
  background: #fff8f8;
  border-color: #ffd1d1;
}

.settlement-side-row.amber,
.settlement-transaction.amber {
  background: #fffaf0;
  border-color: #ffe1a6;
}

.settlement-side-row.blue {
  background: #f5f8ff;
  border-color: #d9e6ff;
}

.settlement-transaction.green {
  background: #f5fbf8;
  border-color: #caead8;
}

.settlement-rank-list {
  display: grid;
  gap: 9px;
}

.settlement-rank-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
}

.settlement-rank-row strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settlement-rank-row em {
  color: #c33131;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.settlement-ai {
  position: static;
}

.settlement-bars {
  align-items: end;
  border-bottom: 1px solid #eef1f5;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(8, 1fr);
  height: 160px;
}

.settlement-bars i {
  background: linear-gradient(180deg, #56c989, #7c65f6);
  border-radius: 6px 6px 0 0;
  display: block;
  min-height: 8px;
  position: relative;
}

.settlement-bars span {
  bottom: -20px;
  color: #667085;
  font-size: 10px;
  font-style: normal;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.settlement-card-total {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.settlement-card-total span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.settlement-card-total strong {
  font-size: 14px;
}

.settlement-aging {
  display: grid;
  gap: 14px;
}

.settlement-aging-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 70px minmax(0, 1fr) max-content;
}

.settlement-aging-row span,
.settlement-aging-row strong {
  font-size: 12px;
  font-weight: 900;
}

.settlement-aging-track {
  background: #eef1f6;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.settlement-aging-track i {
  background: #31a66f;
  border-radius: inherit;
  display: block;
  height: 100%;
}

.settlement-aging-track i.amber {
  background: #f59e0b;
}

.settlement-aging-track i.red {
  background: #ef6f6c;
}

.settlement-balance-donut {
  align-items: center;
  align-self: center;
  background: conic-gradient(#31a66f 0 var(--receivable), #7c65f6 var(--receivable) 100%);
  border-radius: 50%;
  display: inline-flex;
  height: 150px;
  justify-content: center;
  justify-self: center;
  position: relative;
  width: 150px;
}

.settlement-balance-donut::after {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  height: 88px;
  position: absolute;
  width: 88px;
}

.settlement-balance-donut span {
  font-size: 12px;
  font-weight: 900;
  max-width: 78px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.settlement-donut-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.settlement-donut-legend span {
  align-items: center;
  color: #667085;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.settlement-donut-legend i {
  background: #31a66f;
  border-radius: 999px;
  display: block;
  height: 9px;
  width: 9px;
}

.settlement-donut-legend span:last-child i {
  background: #7c65f6;
}

.settlement-quick-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.settlement-action {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  color: #344054;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 62px;
  padding: 10px;
  text-align: left;
}

.settlement-action span {
  align-items: center;
  background: #eef2ff;
  border-radius: 8px;
  color: #4f46e5;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.settlement-action strong {
  font-size: 12px;
}

.settlement-action small {
  color: #667085;
  font-size: 11px;
}

.cash-dashboard {
  min-width: 0;
}

.cash-filter-panel {
  grid-template-columns: repeat(5, minmax(130px, 1fr)) minmax(120px, auto);
}

.cash-kpi-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.finance-focus-panel,
.analytics-workspace-focus,
.write-off-journal {
  margin-bottom: 14px;
}

.finance-focus-panel {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.finance-focus-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.finance-focus-head h2 {
  margin: 0 0 4px;
}

.finance-focus-head p {
  color: var(--muted);
  margin: 0;
}

.finance-focus-head > span {
  background: #eef2ff;
  border-radius: 999px;
  color: #4338ca;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  white-space: nowrap;
}

.finance-focus-grid,
.analytics-workspace-focus {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.finance-focus-metric {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
}

.finance-focus-metric span,
.finance-focus-metric small {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.finance-focus-metric strong {
  color: #101828;
  font-size: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-focus-metric.green strong {
  color: #067647;
}

.finance-focus-metric.red strong {
  color: #b42318;
}

.finance-focus-metric.warning strong {
  color: #b54708;
}

.finance-focus-metric.blue strong {
  color: #3538cd;
}

.motivation-page {
  display: grid;
  gap: 14px;
}

.motivation-tabs {
  display: inline-flex;
  gap: 6px;
  width: fit-content;
  padding: 4px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
}

.motivation-tabs button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
}

.motivation-tabs button.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.motivation-head {
  grid-template-columns: minmax(300px, 1fr) repeat(auto-fit, minmax(170px, 220px));
}

.motivation-summary-grid,
.motivation-quality-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

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

.motivation-summary-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
}

.motivation-summary-card span,
.motivation-summary-card small {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.motivation-summary-card strong {
  color: #182033;
  font-size: 22px;
  line-height: 1.1;
}

.motivation-summary-card.green strong { color: #067647; }
.motivation-summary-card.blue strong { color: #1d4ed8; }
.motivation-summary-card.violet strong { color: #5b21b6; }
.motivation-summary-card.warning strong { color: #b54708; }
.motivation-summary-card.red strong { color: #b42318; }

.motivation-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.motivation-kpi-card,
.motivation-settings-card {
  overflow-x: auto;
}

.motivation-table th,
.motivation-table td,
.motivation-settings-table th,
.motivation-settings-table td {
  vertical-align: middle;
}

.motivation-table td:first-child,
.motivation-settings-table td:first-child {
  min-width: 220px;
}

.motivation-table small,
.motivation-settings-table small {
  color: #667085;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.motivation-settings-grid .span-2 {
  grid-column: 1 / -1;
}

.kpi-adjustment-form-card .motivation-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-adjustments-table td:last-child {
  min-width: 132px;
}

.kpi-fact-adjustments {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.kpi-fact-adjustment-list {
  display: grid;
  gap: 8px;
}

.kpi-fact-adjustment-row {
  align-items: center;
  background: #fbfcff;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  padding: 9px 10px;
}

.kpi-fact-adjustment-row.penalty {
  background: #fffbf7;
  border-color: #fedfc7;
}

.kpi-fact-adjustment-row strong {
  white-space: nowrap;
}

.kpi-fact-adjustment-row p {
  margin: 0;
  min-width: 0;
}

.kpi-fact-adjustment-row small {
  color: #667085;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.motivation-progress {
  background: #eef1f5;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  width: 120px;
}

.motivation-progress span {
  background: linear-gradient(90deg, #2563eb, #22c55e);
  display: block;
  height: 100%;
}

.motivation-replacement-list {
  display: grid;
  gap: 8px;
}

.motivation-order-row {
  align-items: center;
  background: #fbfcff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 4px 10px;
  grid-template-columns: minmax(0, 1fr) max-content;
  padding: 10px;
  text-align: left;
}

.kpi-plans-page {
  min-width: 0;
}

.kpi-plans-head {
  align-items: end;
}

.kpi-period-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.kpi-period-actions .danger {
  border-color: #fda29b;
  color: #b42318;
}

.status-badge {
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 10px;
  white-space: nowrap;
}

.status-badge.success {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.status-badge.warning {
  background: #fffaeb;
  border-color: #fedf89;
  color: #b54708;
}

.status-badge.muted {
  background: #f2f4f7;
  color: #667085;
}

.kpi-summary-grid {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.kpi-warning-list {
  display: grid;
  gap: 4px;
}

.kpi-warning-list p {
  margin: 0;
}

.kpi-plan-workspace {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
}

.kpi-plan-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 12px;
}

.kpi-plan-period-panel {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.kpi-plan-period-panel label,
.kpi-plan-mobile-picker {
  display: grid;
  gap: 6px;
}

.kpi-plan-period-panel label span,
.kpi-plan-mobile-picker span,
.kpi-plan-nav h3 {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
}

.kpi-plan-period-panel select,
.kpi-plan-mobile-picker select {
  min-width: 0;
  width: 100%;
}

.kpi-unsaved-note {
  background: #fffaeb;
  border: 1px solid #fedf89;
  border-radius: 8px;
  color: #93370d;
  font-size: 12px;
  font-weight: 800;
  margin: 0;
  padding: 8px 10px;
}

.kpi-plan-mobile-picker {
  display: none;
}

.kpi-plan-nav {
  display: grid;
  gap: 12px;
}

.kpi-plan-nav section {
  display: grid;
  gap: 6px;
}

.kpi-plan-nav-item {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #101828;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) max-content;
  min-height: 58px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.kpi-plan-nav-item.active {
  border-color: #84caff;
  box-shadow: 0 0 0 3px rgba(46, 144, 250, 0.14);
}

.kpi-plan-nav-item strong,
.kpi-plan-nav-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-plan-nav-item small {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.kpi-plan-nav-item em {
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 6px 8px;
  white-space: nowrap;
}

.kpi-plan-nav-item em.success {
  background: #ecfdf3;
  color: #067647;
}

.kpi-plan-nav-item em.warning {
  background: #fffaeb;
  color: #b54708;
}

.kpi-plan-detail {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.kpi-plan-detail .kpi-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.kpi-plan-group {
  margin-top: 2px;
}

.kpi-group-head {
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.kpi-plan-card {
  overflow-x: auto;
}

.kpi-plan-card-head {
  align-items: start;
  gap: 12px;
}

.kpi-plan-preview {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.kpi-plan-preview span,
.kpi-plan-total {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.kpi-plan-total {
  margin-top: 10px;
  width: fit-content;
}

.success-text {
  color: #067647;
}

.warning-text {
  color: #b54708;
}

.kpi-plan-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 12px;
}

.kpi-plan-fields label {
  display: grid;
  gap: 5px;
}

.kpi-plan-fields span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.kpi-plan-fields input,
.kpi-plan-items input,
.kpi-plan-items select {
  width: 100%;
}

@media (max-width: 920px) {
  .kpi-plan-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi-plan-sidebar {
    position: static;
  }

  .kpi-plan-nav {
    display: none;
  }

  .kpi-plan-mobile-picker {
    display: grid;
  }
}

.kpi-fact-page,
.kpi-fact-layout {
  display: grid;
  gap: 14px;
}

.kpi-fact-head {
  align-items: end;
}

.kpi-fact-banner {
  align-items: center;
  border-color: #fedf89;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
}

.kpi-fact-banner-copy {
  display: grid;
  gap: 4px;
  max-width: 820px;
}

.kpi-fact-banner-copy strong {
  color: #93370d;
  font-size: 15px;
}

.kpi-fact-banner-copy span {
  color: #7a2e0e;
  font-weight: 700;
}

.kpi-fact-banner small {
  color: #93370d;
  font-weight: 700;
}

.kpi-fact-card {
  overflow-x: auto;
}

.kpi-fact-card-head {
  align-items: center;
}

.kpi-fact-score {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.kpi-fact-score span {
  border-radius: 8px;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  padding: 8px 10px;
}

.kpi-fact-score span.green {
  background: #ecfdf3;
  color: #067647;
}

.kpi-fact-score span.blue {
  background: #eff8ff;
  color: #175cd3;
}

.kpi-fact-score span.warning {
  background: #fffaeb;
  color: #b54708;
}

.kpi-fact-score span.red {
  background: #fef3f2;
  color: #b42318;
}

.kpi-fact-score small {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.kpi-fact-money-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 12px;
}

.kpi-fact-table td:nth-child(2),
.kpi-fact-table td:nth-child(3),
.kpi-fact-table td:nth-child(4),
.kpi-fact-table td:nth-child(6),
.kpi-fact-table td:nth-child(7) {
  white-space: nowrap;
}

.kpi-item-toggle {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 220px;
}

.kpi-item-toggle input {
  width: auto;
}

.kpi-threshold-field {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(86px, 1fr) max-content;
  min-width: 130px;
}

.kpi-threshold-field small {
  color: #667085;
  font-weight: 800;
  white-space: nowrap;
}

.kpi-step-actions {
  white-space: nowrap;
}

.kpi-step-actions .small {
  min-width: 62px;
  padding-left: 8px;
  padding-right: 8px;
}

.muted-row {
  opacity: 0.62;
}

.motivation-order-row strong,
.motivation-order-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.motivation-order-row span {
  color: #667085;
  font-size: 12px;
}

.motivation-order-row b {
  color: #067647;
  grid-row: span 2;
}

.motivation-settings-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

/* KPI + Motivation V2 */
.kpi-v2-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.kpi-v2-topnav {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 5px;
}

.kpi-v2-topnav button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #667085;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
}

.kpi-v2-topnav button svg {
  height: 18px;
  width: 18px;
}

.kpi-v2-topnav button.active {
  background: #eef4ff;
  color: #175cd3;
}

.kpi-v2-page-head {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) max-content;
}

.kpi-v2-page-actions,
.kpi-v2-hero-actions,
.kpi-v2-finalize-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.kpi-v2-period-control {
  display: grid;
  gap: 5px;
}

.kpi-v2-period-nav {
  align-items: stretch;
  display: grid;
  gap: 5px;
  grid-template-columns: 38px minmax(170px, 1fr) 38px;
}

.kpi-v2-period-nav > button {
  min-height: 38px;
}

.kpi-v2-period-open {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  color: #101828;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  padding: 7px 11px;
}

.kpi-v2-period-open:hover {
  background: #f8fafc;
  border-color: #84adff;
}

.kpi-v2-period-open .order-action-icon,
.kpi-v2-period-nav .order-action-icon {
  height: 17px;
  width: 17px;
}

.kpi-v2-period-open .order-action-icon {
  color: #175cd3;
}

.kpi-v2-period-control span,
.kpi-v2-money-grid label > span,
.kpi-v2-plan-item label > span,
.kpi-v2-scale-row label > span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.kpi-v2-loading {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 120px;
  justify-content: center;
}

.kpi-v2-plan-workspace {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  min-width: 0;
}

.kpi-v2-plan-list {
  display: grid;
  gap: 7px;
  position: sticky;
  top: 12px;
}

.kpi-v2-plan-list button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #101828;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) max-content;
  min-height: 60px;
  padding: 10px 11px;
  text-align: left;
  width: 100%;
}

.kpi-v2-plan-list button.active {
  border-color: #84adff;
  box-shadow: 0 0 0 3px rgba(53, 111, 255, 0.12);
}

.kpi-v2-plan-list strong,
.kpi-v2-plan-list small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-v2-plan-list small {
  color: #667085;
  font-size: 12px;
  margin-top: 3px;
}

.kpi-v2-plan-list em {
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 6px 8px;
  white-space: nowrap;
}

.kpi-v2-plan-list em.success {
  background: #ecfdf3;
  color: #067647;
}

.kpi-v2-plan-list em.warning {
  background: #fffaeb;
  color: #b54708;
}

.kpi-v2-plan-list em.muted {
  background: #f2f4f7;
  color: #667085;
}

.kpi-archive-head {
  border-left: 3px solid #98a2b3;
}

.kpi-archive-detail {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.kpi-archive-values {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.kpi-archive-values > div {
  border-left: 1px solid #e4e7ec;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 4px 16px;
}

.kpi-archive-values > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.kpi-archive-values span,
.kpi-archive-values small {
  color: #667085;
  font-size: 12px;
}

.kpi-archive-values strong {
  color: #101828;
  font-size: 18px;
}

.kpi-archive-table-wrap {
  min-width: 0;
}

.kpi-archive-table td:first-child {
  min-width: 180px;
}

.kpi-v2-plan-detail,
.kpi-v2-motivation-detail,
.kpi-v2-facts-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.kpi-v2-plan-hero,
.kpi-v2-motivation-hero {
  display: grid;
  gap: 14px;
}

.kpi-v2-money-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.kpi-v2-money-grid label,
.kpi-v2-derived {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px;
}

.kpi-v2-money-grid input {
  width: 100%;
}

.kpi-v2-money-grid small,
.kpi-v2-derived small {
  color: #667085;
  font-size: 11px;
  line-height: 1.3;
}

.kpi-v2-derived span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.kpi-v2-derived strong {
  color: #175cd3;
  font-size: 21px;
}

.kpi-v2-blockers {
  display: grid;
  gap: 5px;
}

.kpi-v2-blockers p {
  margin: 0;
}

.kpi-v2-next-period-note {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.kpi-v2-next-period-note button.primary {
  margin-left: auto;
}

.kpi-v2-setup-guide {
  display: grid;
  gap: 12px;
}

.kpi-v2-setup-steps {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-v2-setup-steps > button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  display: grid;
  gap: 9px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 66px;
  padding: 9px;
  text-align: left;
}

.kpi-v2-setup-steps > button.active {
  background: #f5f8ff;
  border-color: #84adff;
  box-shadow: 0 0 0 2px rgba(53, 111, 255, 0.1);
}

.kpi-v2-setup-number {
  align-items: center;
  background: #f2f4f7;
  border-radius: 50%;
  color: #475467;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.kpi-v2-setup-steps > button.complete .kpi-v2-setup-number {
  background: #ecfdf3;
  color: #067647;
}

.kpi-v2-setup-number .order-action-icon {
  height: 15px;
  width: 15px;
}

.kpi-v2-setup-steps strong,
.kpi-v2-setup-steps small {
  display: block;
  min-width: 0;
}

.kpi-v2-setup-steps small {
  color: #667085;
  font-size: 11px;
  line-height: 1.25;
  margin-top: 3px;
}

.kpi-v2-setup-section {
  display: grid;
  gap: 14px;
}

.kpi-v2-setup-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.kpi-v2-setup-footer button {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.kpi-v2-setup-footer .order-action-icon {
  height: 17px;
  width: 17px;
}

.kpi-v2-footer-save-group,
.kpi-v2-items-actions {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kpi-v2-period-dialog {
  max-width: min(520px, calc(100vw - 32px));
}

.kpi-v2-period-year-nav {
  align-items: center;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  text-align: center;
}

.kpi-v2-period-year-nav strong {
  font-size: 18px;
}

.kpi-v2-period-list {
  display: grid;
  gap: 5px;
  max-height: min(520px, 58vh);
  overflow-y: auto;
}

.kpi-v2-period-list > button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  color: #101828;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) max-content;
  min-height: 52px;
  padding: 8px 10px;
  text-align: left;
}

.kpi-v2-period-list > button:hover,
.kpi-v2-period-list > button.selected {
  background: #f5f8ff;
  border-color: #84adff;
}

.kpi-v2-period-list strong,
.kpi-v2-period-list small {
  display: block;
}

.kpi-v2-period-list small {
  color: #667085;
  font-size: 11px;
  margin-top: 2px;
}

.kpi-v2-clean-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-v2-clean-summary > div {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.kpi-v2-clean-summary span {
  color: #667085;
  font-size: 11px;
}

.kpi-v2-clean-summary strong {
  font-size: 19px;
}

.kpi-v2-copy-summary,
.kpi-v2-approval-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-v2-copy-summary > div,
.kpi-v2-approval-summary > div {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}

.kpi-v2-copy-summary span,
.kpi-v2-approval-summary span {
  color: #667085;
  font-size: 11px;
}

.kpi-v2-copy-summary strong,
.kpi-v2-approval-summary strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}

.kpi-v2-section-head {
  align-items: center;
}

.kpi-v2-section-head button,
.kpi-v2-page-actions button {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.kpi-v2-section-head button svg,
.kpi-v2-page-actions button svg {
  height: 17px;
  width: 17px;
}

.kpi-v2-item-list,
.kpi-v2-scale-list,
.kpi-v2-catalog-grid {
  display: grid;
  gap: 8px;
}

.kpi-v2-plan-item {
  align-items: end;
  background: #fbfcfe;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(105px, 0.75fr)) max-content;
  min-width: 0;
  padding: 11px;
}

.kpi-v2-plan-item.is-na {
  background: #f8fafc;
  opacity: 0.72;
}

.kpi-v2-item-identity {
  align-self: center;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.kpi-v2-item-identity strong,
.kpi-v2-item-identity small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-v2-item-identity small {
  color: #667085;
  font-size: 12px;
}

.kpi-v2-item-identity .status-badge {
  margin-top: 3px;
  padding: 4px 7px;
  width: fit-content;
}

.kpi-v2-plan-item label,
.kpi-v2-scale-row label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.kpi-v2-plan-item input,
.kpi-v2-scale-row input {
  min-width: 0;
  width: 100%;
}

.kpi-v2-unit {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  padding-bottom: 12px;
}

.kpi-v2-catalog-panel {
  border-color: #b2ccff;
}

.kpi-v2-catalog-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.kpi-v2-catalog-item {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) max-content;
  padding: 11px;
}

.kpi-v2-catalog-item.selected {
  background: #f5f8ff;
  border-color: #b2ccff;
}

.kpi-v2-catalog-item.disabled {
  background: #f8fafc;
}

.kpi-v2-catalog-item > div {
  min-width: 0;
}

.kpi-v2-catalog-item strong,
.kpi-v2-catalog-item small {
  display: block;
}

.kpi-v2-catalog-item small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}

.kpi-v2-catalog-item button {
  grid-column: 1 / -1;
}

.kpi-v2-scale-row {
  align-items: end;
  background: #fbfcfe;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) max-content;
  padding: 10px;
}

.kpi-v2-scale-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.kpi-v2-scale-help {
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 12px;
}

.kpi-v2-scale-preview {
  background: #f8fafc;
  border-bottom: 1px solid #e4e7ec;
  border-top: 1px solid #e4e7ec;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 12px;
  padding: 12px 0;
}

.kpi-v2-scale-preview > div {
  border-right: 1px solid #e4e7ec;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0 14px;
}

.kpi-v2-scale-preview > div:last-of-type {
  border-right: 0;
}

.kpi-v2-scale-preview span,
.kpi-v2-scale-preview p {
  color: #667085;
  font-size: 12px;
}

.kpi-v2-scale-preview strong {
  color: #101828;
  font-size: 18px;
}

.kpi-v2-scale-preview p {
  grid-column: 1 / -1;
  line-height: 1.4;
  margin: 10px 14px 0;
}

.kpi-v2-payroll-hidden {
  background: #f8fafc;
}

.kpi-v2-upgrade-intro,
.kpi-v2-upgrade-finalize {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.kpi-v2-create-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.kpi-v2-subject-dialog {
  max-width: min(620px, calc(100vw - 32px));
}

.kpi-v2-subject-list {
  display: grid;
  gap: 7px;
  max-height: min(440px, 55vh);
  overflow-y: auto;
}

.kpi-v2-subject-list > button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #101828;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) max-content;
  min-height: 58px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.kpi-v2-subject-list > button:hover {
  border-color: #84adff;
  background: #f5f8ff;
}

.kpi-v2-subject-list strong,
.kpi-v2-subject-list small {
  display: block;
}

.kpi-v2-subject-list small {
  color: #667085;
  margin-top: 3px;
}

.kpi-v2-subject-list em {
  color: #175cd3;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.kpi-v2-upgrade-summary,
.kpi-v2-fact-summary,
.kpi-v2-pay-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

.kpi-v2-active-toggle,
.kpi-v2-resolution-row {
  align-items: center;
  display: flex;
  gap: 9px;
}

.kpi-v2-active-toggle input,
.kpi-v2-resolution-row input {
  width: auto;
}

.kpi-v2-resolution-row {
  border-top: 1px solid #eef1f5;
  padding: 10px 0;
}

.kpi-v2-resolution-row strong,
.kpi-v2-resolution-row small {
  display: block;
}

.kpi-v2-resolution-row small {
  color: #667085;
  margin-top: 3px;
}

.kpi-v2-validation-list {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.kpi-v2-validation-list span {
  color: #b42318;
  font-size: 12px;
  font-weight: 750;
}

.kpi-v2-finalize-actions {
  min-width: min(100%, 330px);
}

.kpi-v2-finalize-actions input {
  min-width: 0;
}

.kpi-v2-fact-card {
  display: grid;
  gap: 12px;
}

.kpi-v2-fact-card-head {
  align-items: center;
}

.kpi-v2-score {
  border-radius: 8px;
  display: grid;
  gap: 2px;
  justify-items: end;
  padding: 9px 11px;
}

.kpi-v2-score.final {
  background: #ecfdf3;
  color: #067647;
}

.kpi-v2-score.preliminary {
  background: #fffaeb;
  color: #b54708;
}

.kpi-v2-score span {
  font-size: 22px;
  font-weight: 900;
}

.kpi-v2-score small {
  font-size: 11px;
  font-weight: 800;
}

.kpi-v2-inline-blockers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kpi-v2-inline-blockers span {
  background: #fffaeb;
  border: 1px solid #fedf89;
  border-radius: 6px;
  color: #93370d;
  font-size: 12px;
  font-weight: 750;
  padding: 6px 8px;
}

.kpi-v2-quality-benchmark {
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1fr) max-content minmax(150px, max-content);
  padding: 12px 14px;
}

.kpi-v2-quality-benchmark-copy,
.kpi-v2-quality-benchmark-value,
.kpi-v2-quality-benchmark-status {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.kpi-v2-quality-benchmark-copy strong {
  color: #067647;
  font-size: 15px;
}

.kpi-v2-quality-benchmark-copy small,
.kpi-v2-quality-benchmark-value span,
.kpi-v2-quality-benchmark-status small {
  color: #475467;
  font-size: 11px;
  line-height: 1.35;
}

.kpi-v2-quality-benchmark-value {
  justify-items: end;
}

.kpi-v2-quality-benchmark-value strong {
  color: #067647;
  font-size: 26px;
  line-height: 1;
}

.kpi-v2-quality-benchmark-status {
  justify-items: end;
}

.kpi-v2-fact-list {
  display: grid;
  gap: 7px;
}

.kpi-v2-fact-row {
  align-items: center;
  background: #fbfcfe;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(210px, 2fr) repeat(5, minmax(76px, 0.65fr)) minmax(110px, auto) minmax(120px, auto);
  min-width: 0;
  padding: 10px;
}

.kpi-v2-fact-row.shows-accrual {
  grid-template-columns: minmax(210px, 2fr) repeat(6, minmax(76px, 0.65fr)) minmax(110px, auto) minmax(120px, auto);
}

.kpi-v2-fact-row.has-issue {
  background: #fffcf5;
}

.kpi-v2-fact-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.kpi-v2-fact-identity strong,
.kpi-v2-fact-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-v2-fact-identity small {
  color: #667085;
  font-size: 11px;
}

.kpi-v2-fact-identity .status-badge {
  padding: 3px 6px;
  width: fit-content;
}

.kpi-v2-fact-row > div:not(.kpi-v2-fact-identity):not(.kpi-v2-fact-actions) {
  display: grid;
  gap: 3px;
}

.kpi-v2-fact-row > div > span:not(.status-badge) {
  color: #667085;
  font-size: 11px;
  font-weight: 750;
}

.kpi-v2-fact-row > div > strong {
  font-size: 13px;
}

.kpi-v2-fact-accrued strong,
.kpi-v2-fact-accrual-note strong {
  color: #175cd3;
}

.kpi-v2-fact-accrual-note {
  align-items: baseline;
  border-bottom: 1px solid #e4e7ec;
  border-top: 1px solid #e4e7ec;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: space-between;
  padding: 9px 0;
}

.kpi-v2-fact-accrual-note strong {
  font-size: 14px;
}

.kpi-v2-fact-accrual-note span {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.kpi-v2-fact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.kpi-v2-formula-lines {
  display: grid;
}

.kpi-v2-formula-lines > div {
  align-items: center;
  border-bottom: 1px solid #eef1f5;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
}

.kpi-v2-formula-lines > div:last-child {
  border-bottom: 0;
}

.kpi-v2-formula-lines .negative strong {
  color: #b42318;
}

.kpi-v2-formula-lines .total {
  font-size: 18px;
  font-weight: 900;
}

.kpi-v2-formula-lines .total strong {
  color: #067647;
  font-size: 24px;
}

.kpi-v2-formula-note {
  color: #667085;
  font-size: 12px;
  margin: 12px 0 0;
}

.kpi-v2-scale-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.kpi-v2-scale-chips span {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  color: #475467;
  display: grid;
  font-size: 12px;
  gap: 2px;
  padding: 8px 10px;
}

.kpi-v2-scale-chips span.active {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.kpi-v2-dialog {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.kpi-v2-dialog input,
.kpi-v2-dialog textarea {
  width: 100%;
}

.kpi-v2-redistribution-dialog {
  max-width: 620px;
}

.kpi-v2-redistribution-list {
  display: grid;
  gap: 7px;
}

.kpi-v2-redistribution-list label {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 120px) minmax(48px, max-content);
  padding: 9px;
}

.kpi-v2-redistribution-list strong,
.kpi-v2-redistribution-list small {
  display: block;
}

.kpi-v2-redistribution-list small {
  color: #667085;
  font-size: 11px;
  margin-top: 2px;
}

.kpi-v2-redistribution-list em {
  color: #175cd3;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

@media (max-width: 1280px) {
  .kpi-v2-plan-item {
    grid-template-columns: minmax(210px, 1.6fr) repeat(3, minmax(92px, 0.7fr));
  }

  .kpi-v2-unit {
    display: none;
  }

  .kpi-v2-fact-row,
  .kpi-v2-fact-row.shows-accrual {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .kpi-v2-fact-identity {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .kpi-v2-fact-status {
    grid-column: 1;
  }

  .kpi-v2-fact-actions {
    grid-column: 2 / -1;
  }
}

@media (max-width: 1024px) {
  .kpi-v2-page-head {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi-v2-page-actions {
    justify-content: flex-start;
  }

  .kpi-v2-plan-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi-v2-plan-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }

  .kpi-v2-plan-item {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-v2-item-identity {
    grid-column: 1 / -1;
  }

  .kpi-v2-fact-row,
  .kpi-v2-fact-row.shows-accrual {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-v2-fact-identity {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .kpi-v2-fact-status {
    grid-column: 1;
  }

  .kpi-v2-fact-actions {
    grid-column: 2 / -1;
  }
}

@media (max-width: 768px) {
  .kpi-v2-topnav button {
    min-height: 48px;
    padding: 8px 6px;
  }

  .kpi-v2-topnav button span {
    font-size: 12px;
  }

  .kpi-v2-page-actions,
  .kpi-v2-hero-actions,
  .kpi-v2-upgrade-intro,
  .kpi-v2-upgrade-finalize,
  .kpi-v2-finalize-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
  }

  .kpi-v2-page-actions .kpi-v2-period-control,
  .kpi-v2-upgrade-intro > div,
  .kpi-v2-upgrade-finalize > div:first-child {
    grid-column: 1 / -1;
  }

  .kpi-v2-period-nav {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .kpi-v2-setup-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-v2-setup-footer {
    align-items: stretch;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-v2-setup-footer button {
    justify-content: center;
    width: 100%;
  }

  .kpi-v2-footer-save-group {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .kpi-v2-items-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .kpi-v2-items-actions button {
    justify-content: center;
    width: 100%;
  }

  .kpi-v2-create-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .kpi-v2-create-actions button {
    width: 100%;
  }

  .kpi-v2-page-actions button,
  .kpi-v2-page-actions .status-badge,
  .kpi-v2-finalize-actions button,
  .kpi-v2-finalize-actions input {
    justify-content: center;
    width: 100%;
  }

  .kpi-v2-plan-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi-v2-money-grid,
  .kpi-v2-upgrade-summary,
  .kpi-v2-fact-summary,
  .kpi-v2-pay-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-v2-plan-item,
  .kpi-v2-scale-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-v2-scale-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .kpi-v2-scale-actions button {
    justify-content: center;
    width: 100%;
  }

  .kpi-v2-scale-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-v2-scale-preview > div:nth-child(2) {
    border-right: 0;
  }

  .kpi-v2-scale-preview > div:nth-child(n + 3) {
    border-top: 1px solid #e4e7ec;
    margin-top: 10px;
    padding-top: 10px;
  }

  .kpi-v2-item-identity,
  .kpi-v2-scale-row label:last-of-type {
    grid-column: 1 / -1;
  }

  .kpi-v2-scale-row .icon-button {
    justify-self: end;
  }

  .kpi-v2-fact-row,
  .kpi-v2-fact-row.shows-accrual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-v2-fact-identity,
  .kpi-v2-fact-status,
  .kpi-v2-fact-actions {
    grid-column: 1 / -1;
  }

  .kpi-v2-fact-status {
    align-self: end;
  }
}

@media (max-width: 480px) {
  .kpi-v2-hero-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi-v2-hero-actions > * {
    min-width: 0;
    width: 100%;
  }

  .kpi-v2-hero-actions .status-badge {
    justify-content: center;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
  }
}

.finance-review-list {
  display: grid;
  gap: 8px;
}

.finance-review-row {
  align-items: center;
  background: #fbfcff;
  border: 1px solid #eef0f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 130px minmax(160px, 1fr) minmax(180px, 1.4fr) auto auto;
  padding: 9px 10px;
}

.finance-review-row span,
.finance-review-row small {
  color: #667085;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-review-row em {
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 4px 8px;
  white-space: nowrap;
}

.finance-review-row em.success {
  background: #ecfdf3;
  color: #067647;
}

.finance-review-row em.warning {
  background: #fffaeb;
  color: #b54708;
}

.finance-review-row em.danger {
  background: #fef3f2;
  color: #b42318;
}

.analytics-workspace-focus {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
  padding: 12px;
}

.cash-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

body[data-current-view="incomeExpenses"] .cash-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 340px);
}

body[data-current-view="bankPayments"] .cash-layout {
  grid-template-columns: minmax(0, 1fr);
}

body[data-current-view="incomeExpenses"] .cash-table-card,
body[data-current-view="incomeExpenses"] .cash-entry-card,
body[data-current-view="bankPayments"] .cash-table-card,
body[data-current-view="bankPayments"] .cash-entry-card {
  min-width: 0;
}

body[data-current-view="incomeExpenses"] .cash-entry-card {
  align-self: start;
  position: sticky;
  top: 12px;
  width: 100%;
}

body[data-current-view="incomeExpenses"] .finance-focus-panel,
body[data-current-view="incomeExpenses"] .cash-layout > * {
  min-width: 0;
}

body[data-current-view="bankPayments"] .cash-entry-card {
  align-self: stretch;
  width: 100%;
}

body[data-current-view="bankPayments"] .cash-movement-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

body[data-current-view="bankPayments"] .cash-movement-form label:has(textarea),
body[data-current-view="bankPayments"] .cash-movement-form button {
  grid-column: 1 / -1;
}

.cash-table-card {
  min-width: 0;
  padding: 0;
}

.cash-table-card .analytics-card-head {
  padding: 14px 14px 0;
}

.cash-alert {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.cash-table {
  min-width: 980px;
}

.cash-table th,
.cash-table td {
  padding: 9px 12px;
  vertical-align: top;
}

.cash-table small {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
}

.cash-source-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.cash-source-pill.income {
  background: #ecfdf3;
  color: #067647;
}

.cash-source-pill.expense {
  background: #fef3f2;
  color: #b42318;
}

.cash-amount {
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.cash-amount.income {
  color: #067647;
}

.cash-amount.expense {
  color: #b42318;
}

.employee-card-panel {
  margin-top: 14px;
}

.employee-payment-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
}

.employee-payment-stats div {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 10px 12px;
}

.employee-payment-stats span,
.employee-payment-table small {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.employee-payment-stats strong {
  color: #101828;
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.employee-access-form,
.employee-password-form {
  align-items: end;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) max-content minmax(180px, 0.8fr);
  margin: 0 0 12px;
  padding: 10px 12px;
}

.employee-access-form {
  grid-template-columns: minmax(200px, 0.8fr) minmax(150px, 0.5fr) max-content minmax(180px, 1fr);
}

.employee-access-form label,
.employee-password-form label {
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.employee-access-form select,
.employee-password-form input {
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  font: inherit;
  min-height: 34px;
  padding: 6px 9px;
}

.employee-access-form span,
.employee-password-form span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.employee-card-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.employee-card-actions label {
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.employee-card-actions input {
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  font: inherit;
  min-height: 32px;
  padding: 5px 8px;
}

.employee-payment-actions {
  white-space: nowrap;
}

.employee-payment-edit-row td {
  background: #f8fafc;
  padding: 10px;
}

.employee-payment-edit-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: 170px 130px 130px 110px 150px minmax(180px, 1fr) auto;
}

.employee-payment-edit-form label {
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.employee-payment-edit-form input,
.employee-payment-edit-form select {
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  font: inherit;
  min-height: 34px;
  padding: 6px 8px;
  width: 100%;
}

.employee-payment-edit-actions {
  display: flex;
  gap: 6px;
}

.cash-entry-card {
  display: grid;
  gap: 12px;
}

.cash-movement-form {
  display: grid;
  gap: 10px;
}

.cash-movement-form label {
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.cash-movement-form input,
.cash-movement-form select,
.cash-movement-form textarea {
  background: #fbfcff;
  border: 1px solid #dfe5ef;
  border-radius: 7px;
  color: #182033;
  font: inherit;
  min-height: 36px;
  padding: 7px 9px;
}

.cash-movement-form textarea {
  resize: vertical;
}

.cash-flow-page {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.cash-flow-tabs {
  align-items: stretch;
  border-bottom: 1px solid #d9e4f5;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  min-width: 0;
}

.cash-flow-tabs button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: #182033;
  display: grid;
  gap: 1px 8px;
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 44px;
  min-width: 138px;
  padding: 8px 14px;
  text-align: left;
}

.cash-flow-tabs button.active {
  background: #1d5be3;
  border-color: #1d5be3;
  color: #ffffff;
}

.cash-flow-tabs i {
  color: #0f9f5f;
  font-style: normal;
  font-weight: 900;
  grid-row: span 2;
}

.cash-flow-tabs button.active i {
  color: #ffffff;
}

.cash-flow-tabs span {
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-flow-tabs small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.cash-flow-tabs button.active small {
  color: rgba(255, 255, 255, 0.78);
}

.cash-flow-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(9, minmax(118px, 1fr));
}

.cash-flow-kpi {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 76px;
  padding: 10px 12px;
}

.cash-flow-kpi > span {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 22px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.cash-flow-kpi small,
.cash-flow-kpi em {
  color: #667085;
  display: block;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.cash-flow-kpi strong {
  color: #101828;
  display: block;
  font-size: 19px;
  line-height: 1.1;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-flow-kpi.blue > span { background: #eef4ff; color: #1d4ed8; }
.cash-flow-kpi.green > span { background: #ecfdf3; color: #079455; }
.cash-flow-kpi.red > span { background: #fef3f2; color: #d92d20; }
.cash-flow-kpi.orange > span { background: #fff7ed; color: #f97316; }
.cash-flow-kpi.violet > span { background: #f4f3ff; color: #6941c6; }
.cash-flow-kpi.teal > span { background: #ecfdf3; color: #0e9384; }
.cash-flow-kpi.green strong { color: #079455; }
.cash-flow-kpi.red strong { color: #b42318; }
.cash-flow-kpi.orange strong { color: #c2410c; }
.cash-flow-kpi.violet strong { color: #5925dc; }
.cash-flow-kpi.teal strong { color: #0e9384; }

.cash-flow-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 380px;
  min-width: 0;
}

.cash-flow-main-card,
.cash-flow-side-card {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  min-width: 0;
}

.cash-flow-main-card {
  overflow: hidden;
  padding: 12px;
}

.cash-flow-card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cash-flow-card-head h2,
.cash-flow-side-card h3 {
  color: #101828;
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.cash-flow-filter-pills,
.cash-flow-periods {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.cash-flow-filter-pills button,
.cash-flow-periods button {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: #1f2a44;
  font-weight: 900;
  min-height: 34px;
  padding: 7px 14px;
}

.cash-flow-filter-pills button.active,
.cash-flow-periods button.active {
  background: #1d5be3;
  border-color: #1d5be3;
  color: #ffffff;
}

.cash-flow-filter-pills button.income {
  color: #067647;
}

.cash-flow-filter-pills button.expense {
  color: #b42318;
}

.cash-flow-filter-pills button.transfer {
  color: #1d4ed8;
}

.cash-flow-filter-pills button.unallocated {
  color: #b54708;
}

.cash-flow-filter-pills button.active {
  color: #ffffff;
}

.cash-flow-range {
  align-items: center;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: #344054;
  display: flex;
  gap: 10px;
  min-height: 34px;
  padding: 5px 10px;
}

.cash-flow-range input {
  background: transparent;
  border: 0;
  color: #344054;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 22px;
  padding: 0;
}

.cash-flow-filter-button {
  margin-left: auto;
}

.cash-flow-table-wrap {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  overflow: auto;
}

.cash-flow-table {
  border-collapse: collapse;
  min-width: 1080px;
  table-layout: fixed;
  width: 100%;
}

.cash-flow-table th,
.cash-flow-table td {
  border-bottom: 1px solid #eef0f5;
  font-size: 12px;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.cash-flow-table th {
  background: #f8fbff;
  color: #344054;
  font-size: 11px;
  font-weight: 900;
}

.cash-flow-table tr.is-selected {
  background: #eef6ff;
}

.cash-flow-table th:nth-child(1) { width: 92px; }
.cash-flow-table th:nth-child(2) { width: 118px; }
.cash-flow-table th:nth-child(3) { width: 145px; }
.cash-flow-table th:nth-child(4) { width: 150px; }
.cash-flow-table th:nth-child(5) { width: 150px; }
.cash-flow-table th:nth-child(6) { width: 112px; }
.cash-flow-table th:nth-child(7) { width: 116px; }
.cash-flow-table th:nth-child(8) { width: 112px; }
.cash-flow-table th:nth-child(9) { width: 86px; }

.cash-flow-table strong,
.cash-flow-table small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-flow-table small {
  color: #667085;
  font-size: 11px;
  margin-top: 2px;
}

.cash-flow-kind {
  align-items: center;
  color: #344054;
  display: inline-flex;
  font-weight: 900;
  gap: 7px;
  white-space: nowrap;
}

.cash-flow-kind i {
  font-style: normal;
  font-size: 18px;
}

.cash-flow-kind.income i,
.cash-flow-sum.income {
  color: #079455;
}

.cash-flow-kind.expense i,
.cash-flow-sum.expense {
  color: #d92d20;
}

.cash-flow-kind.transfer i {
  color: #1d4ed8;
}

.cash-flow-sum {
  font-weight: 900;
  white-space: nowrap;
}

.cash-flow-status {
  border-radius: 7px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
  white-space: nowrap;
}

.cash-flow-status.success,
.cash-flow-selected-head em.success {
  background: #ecfdf3;
  color: #067647;
}

.cash-flow-status.warning,
.cash-flow-selected-head em.warning {
  background: #fffaeb;
  color: #b54708;
}

.cash-flow-status.danger,
.cash-flow-selected-head em.danger {
  background: #fef3f2;
  color: #b42318;
}

.cash-flow-status.info,
.cash-flow-selected-head em.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.cash-flow-footer {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto auto;
  padding: 10px 2px 0;
}

.cash-flow-footer span,
.cash-flow-footer label {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.cash-flow-footer div {
  display: flex;
  gap: 6px;
}

.cash-flow-footer label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.cash-flow-side {
  align-content: start;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.cash-flow-side-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.cash-flow-balance-list,
.cash-flow-details {
  display: grid;
  gap: 8px;
}

.cash-flow-balance-list button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #101828;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr) max-content 12px;
  padding: 10px;
  text-align: left;
}

.cash-flow-balance-list i {
  align-items: center;
  background: #eef4ff;
  border-radius: 8px;
  color: #1d4ed8;
  display: inline-flex;
  font-style: normal;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.cash-flow-balance-list span,
.cash-flow-balance-list strong,
.cash-flow-balance-list small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-flow-balance-list small {
  color: #667085;
  font-size: 11px;
  margin-top: 2px;
}

.cash-flow-balance-list b {
  white-space: nowrap;
}

.cash-flow-balance-list em {
  color: #667085;
  font-style: normal;
  font-weight: 900;
}

.cash-flow-selected-head {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 30px minmax(0, 1fr) max-content;
}

.cash-flow-selected-head > span {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 20px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.cash-flow-selected-head > span.income {
  background: #ecfdf3;
  color: #079455;
}

.cash-flow-selected-head > span.expense {
  background: #fef3f2;
  color: #d92d20;
}

.cash-flow-selected-head > span.transfer {
  background: #eff6ff;
  color: #1d4ed8;
}

.cash-flow-selected-head h3,
.cash-flow-selected-head strong {
  display: block;
  margin: 0;
}

.cash-flow-selected-head strong {
  color: #067647;
  font-size: 13px;
}

.cash-flow-selected-head em {
  border-radius: 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 5px 8px;
}

.cash-flow-details {
  margin: 0;
}

.cash-flow-details div {
  display: grid;
  gap: 8px;
  grid-template-columns: 120px minmax(0, 1fr);
}

.cash-flow-details dt {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.cash-flow-details dd {
  font-size: 13px;
  font-weight: 900;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.cash-flow-selected-actions {
  display: grid;
  gap: 8px;
}

.stock-asset-card {
  border-color: #d6bbfb;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
}

.stock-asset-report {
  overflow: hidden;
}

.stock-analytics-page .analytics-report-card {
  overflow-x: hidden;
}

.stock-asset-head {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

.stock-asset-head h3 {
  color: #101828;
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.stock-asset-head p {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.stock-asset-head strong {
  justify-self: start;
  background: #f4f3ff;
  border: 1px solid #d6bbfb;
  border-radius: 8px;
  color: #5925dc;
  font-size: 16px;
  font-weight: 900;
  padding: 9px 10px;
  white-space: nowrap;
}

.stock-asset-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}

.stock-asset-metrics div {
  background: #ffffff;
  border: 1px solid #e9d7fe;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 9px;
}

.stock-asset-metrics span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.stock-asset-metrics b {
  color: #101828;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-asset-list {
  display: grid;
  gap: 8px;
}

.stock-asset-list article {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 2px 8px;
  grid-template-columns: minmax(0, 1fr);
  padding: 9px;
}

.stock-asset-list article span,
.stock-asset-list article small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  min-width: 0;
}

.stock-asset-list article strong {
  color: #101828;
  font-size: 12px;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.stock-asset-list article b {
  color: #5925dc;
  font-size: 12px;
  justify-self: start;
  white-space: nowrap;
}

@media (max-width: 1700px) {
  body:not(.sidebar-collapsed) .cash-flow-layout,
  body:not(.sidebar-collapsed) .site-journal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.sidebar-collapsed) .cash-flow-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.sidebar-collapsed) .stock-asset-card {
    grid-column: 1 / -1;
  }

  body:not(.sidebar-collapsed) .site-journal-side-card {
    position: static;
  }

  body[data-current-view="bankPayments"] .bank-cashier-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="bankPayments"] .bank-allocation-panel {
    position: static;
  }
}

@media (max-width: 1500px) {
  .cash-flow-kpis {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .cash-flow-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

@media (max-width: 1250px) {
  .cash-flow-layout {
    grid-template-columns: 1fr;
  }

  .cash-flow-side,
  body:not(.sidebar-collapsed) .cash-flow-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .cash-flow-kpis {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 600px) {
  .cash-flow-tabs button {
    flex: 1 1 128px;
    min-width: min(100%, 118px);
    padding-left: 10px;
    padding-right: 10px;
  }

  .cash-flow-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .cash-flow-main-card {
    padding: 10px;
  }

  .cash-flow-filter-pills button,
  .cash-flow-periods button {
    flex: 1 1 auto;
    padding-left: 10px;
    padding-right: 10px;
  }

  .cash-flow-range {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }

  .cash-flow-range input {
    flex: 1 1 96px;
    min-width: 0;
  }

  .cash-flow-filter-button {
    margin-left: 0;
    width: 100%;
  }

  .cash-flow-footer {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .cash-flow-footer label {
    flex-wrap: wrap;
  }

  .stock-asset-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1251px) {
  body:not(.sidebar-collapsed) .cash-flow-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.sidebar-collapsed) .cash-flow-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.sidebar-collapsed) .stock-asset-card {
    grid-column: 1 / -1;
  }
}

.site-request-form,
.site-request-workspace {
  align-content: start;
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.site-request-customer {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.site-request-modal-backdrop {
  background: rgba(30, 35, 41, 0.38);
  backdrop-filter: blur(2px);
}

.site-request-dialog {
  box-shadow: 0 26px 80px rgba(30, 35, 41, 0.3);
  margin-bottom: 0;
  max-height: calc(100vh - 48px);
  overflow: auto;
  width: min(1040px, calc(100vw - 32px));
}

.site-request-dialog-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.delivery-badge {
  background: #eef1f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 5px;
  padding: 4px 7px;
  text-align: left;
}

.delivery-badge span {
  font-size: 12px;
  font-weight: 700;
}

.delivery-badge small {
  color: #775200;
  font-size: 11px;
  font-weight: 700;
}

.delivery-badge.attention {
  background: #fff7d6;
  border-color: #e7c665;
}

.delivery-badge-table {
  margin-top: 0;
  min-width: 132px;
  width: 100%;
}

.delivery-status-badge {
  align-self: flex-start;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-top: 3px;
  padding: 4px 7px;
  white-space: nowrap;
}

.delivery-status-mini {
  font-size: 10px;
  padding: 3px 6px;
}

.delivery-badge .delivery-status-badge {
  font-size: 10px;
  font-weight: 800;
}

.delivery-status-muted {
  background: #f1f3f5;
  border-color: #d9dee5;
  color: #667085;
}

.delivery-status-info {
  background: #eef4ff;
  border-color: #b8cdfc;
  color: #3155b7;
}

.delivery-status-accent {
  background: #f2edff;
  border-color: #c7b8ff;
  color: #5b3fd0;
}

.delivery-status-warning {
  background: #fff6db;
  border-color: #e8c766;
  color: #946200;
}

.delivery-status-success {
  background: #eaf8ef;
  border-color: #a7dbb8;
  color: #137333;
}

.delivery-status-danger {
  background: #ffe8e8;
  border-color: #f0a4a4;
  color: #b42318;
}

.delivery-status-cell {
  min-width: 180px;
}

.delivery-status-cell small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 4px;
}

.delivery-status-select {
  font-size: 12px;
  margin-top: 6px;
  min-height: 30px;
  padding: 5px 7px;
}

.delivery-badge-empty {
  background: #f8faf9;
  color: var(--muted);
}

.site-request-product-match {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 128px;
  padding: 5px 8px;
}

.site-request-product-match strong {
  font-size: 12px;
}

.site-request-product-match small {
  color: var(--muted);
  font-size: 11px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-product-match.success {
  background: #eef8f1;
  border-color: #b7dfc3;
  color: var(--accent-dark);
}

.site-request-product-match.danger {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.site-request-product-attention {
  background: #fff4f4;
  box-shadow: inset 3px 0 0 #dc2626;
}

.site-request-delivery-attention {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #d99a00;
}

.delivery-dialog {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(30, 35, 41, 0.3);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 48px);
  max-width: 760px;
  overflow: auto;
  padding: 16px;
  width: min(760px, calc(100vw - 32px));
}

.delivery-warning {
  background: #fff7d6;
  border: 1px solid #e7c665;
  border-radius: 6px;
  color: #775200;
  font-weight: 700;
  padding: 10px 12px;
}

.delivery-lock-note {
  color: #b45309;
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 4px;
}

.delivery-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.delivery-detail-grid > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.delivery-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-detail-grid p {
  margin: 0;
}

.delivery-detail-wide {
  grid-column: 1 / -1;
}

.delivery-note-history {
  background: #f8fafc;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

.delivery-note-history > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.delivery-note-history p {
  margin: 0;
  overflow-wrap: anywhere;
}

.delivery-dialog-actions {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1fr) auto;
}

.delivery-dialog-actions > button,
.delivery-dialog-actions > .order-link {
  min-height: 42px;
}

.delivery-note-details {
  min-width: 0;
}

.delivery-note-details summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  user-select: none;
  width: 100%;
}

.delivery-note-details[open] summary {
  background: #eef4ff;
  border-color: #c7d9ff;
}

.delivery-note-details form {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 10px;
}

.delivery-note-details label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.delivery-note-details textarea {
  min-height: 84px;
  resize: vertical;
}

.delivery-recipient-attention {
  background: #fffaf0;
  border-color: #e7c665 !important;
}

.site-request-command {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.site-request-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.site-request-filters {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(160px, 0.85fr) minmax(160px, 0.9fr) minmax(150px, 0.75fr) minmax(130px, 0.6fr) minmax(130px, 0.6fr) minmax(220px, 1.2fr) auto auto auto;
  padding-top: 12px;
}

.site-request-filters label {
  min-width: 0;
}

.site-request-filters .muted {
  align-self: center;
  white-space: nowrap;
}

.site-request-pager {
  align-items: center;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 10px;
}

.site-request-pager label {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.site-request-pager select {
  min-height: 32px;
  min-width: 82px;
}

.site-request-page-arrows {
  align-items: center;
  display: flex;
  gap: 8px;
}

.site-request-page-arrows span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  min-width: 54px;
  text-align: center;
}

.site-request-board {
  overflow-x: auto;
}

.site-request-table td,
.site-request-table th {
  padding-bottom: 8px;
  padding-top: 8px;
}

.site-request-row-actions {
  white-space: nowrap;
}

.site-requests-smart-page {
  background: #ffffff;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
}

.site-requests-smart-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.site-requests-smart-head h2 {
  color: #111827;
  font-size: 24px;
  margin-top: 3px;
}

.site-requests-smart-head h2 span {
  background: #eef3ff;
  border: 1px solid #cfd8ff;
  border-radius: 999px;
  color: #4f46e5;
  font-size: 12px;
  margin-left: 8px;
  padding: 3px 8px;
  vertical-align: middle;
}

.site-requests-smart-actions,
.site-requests-smart-toolbar {
  align-items: center;
  display: flex;
  gap: 10px;
}

.site-requests-smart-actions button,
.site-requests-smart-toolbar button {
  padding: 0 14px;
}

.site-requests-smart-toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
  padding: 7px;
}

.site-requests-smart-search {
  flex: 1 1 420px;
}

.site-requests-smart-search input {
  background: #f9fafb;
  border-color: #d7deea;
  min-height: 36px;
}

.site-requests-ai {
  background: #f3f0ff;
  border-color: #d8d2ff;
  color: #4f46e5;
  font-weight: 800;
  opacity: 1;
}

.site-requests-smart-count,
.site-request-filter-count {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  white-space: nowrap;
}

.site-requests-smart-count {
  margin-left: auto;
}

.site-request-bulk-toolbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7deea;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.05);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 8px 0;
  padding: 8px;
}

.site-request-bulk-summary {
  display: grid;
  gap: 2px;
  min-width: 130px;
}

.site-request-bulk-summary strong {
  color: var(--text);
  font-size: 13px;
}

.site-request-bulk-summary span {
  color: var(--muted);
  font-size: 12px;
}

.site-request-bulk-actions {
  align-items: center;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.site-request-bulk-actions select {
  min-height: 32px;
  min-width: 180px;
  padding: 4px 8px;
}

.site-request-smart-filters {
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 0.7fr) minmax(140px, 0.75fr) minmax(160px, 0.9fr) minmax(150px, 0.75fr) minmax(130px, 0.6fr) minmax(130px, 0.6fr) auto;
  padding: 8px 10px;
}

.site-request-smart-filters label {
  font-size: 12px;
}

.site-request-smart-filters select,
.site-request-smart-filters input {
  min-height: 30px;
  padding: 4px 7px;
}

.site-request-smart-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.site-request-smart-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 3px 0 0 #98a2b3;
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 11px;
}

.site-request-smart-stat span,
.site-request-smart-stat small {
  color: var(--muted);
  font-size: 12px;
}

.site-request-smart-stat strong {
  font-size: 20px;
}

.site-request-smart-stat.stat-accent {
  box-shadow: inset 3px 0 0 #635bff;
}

.site-request-smart-stat.stat-success {
  box-shadow: inset 3px 0 0 var(--accent);
}

.site-request-smart-stat.stat-danger {
  box-shadow: inset 3px 0 0 #d92d20;
}

.site-request-smart-stat.stat-critical {
  background: #fef2f2;
  border-color: #fecaca;
  box-shadow: inset 4px 0 0 #dc2626, 0 12px 30px rgba(220, 38, 38, 0.12);
}

.site-request-smart-stat.stat-critical span,
.site-request-smart-stat.stat-critical small {
  color: #991b1b;
}

.site-request-smart-stat.stat-critical strong {
  color: #dc2626;
}

.site-request-smart-stat.stat-warning {
  box-shadow: inset 3px 0 0 #d99a00;
}

.site-request-smart-stat.stat-prom {
  box-shadow: inset 3px 0 0 #8b5cf6;
}

.waiting-goods-split-row {
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
}

.waiting-goods-split-row small {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 6px;
  color: #6d28d9;
  font-weight: 800;
  padding: 4px 6px;
  text-align: center;
}

.waiting-goods-split-row small.is-ready {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #15803d;
}

.site-requests-smart-layout {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  min-width: 0;
}

.site-requests-smart-layout.is-preview-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.site-requests-smart-main {
  min-width: 0;
}

.site-requests-section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.site-requests-section-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.site-requests-section-head h3 {
  font-size: 17px;
  margin: 0;
}

.site-requests-section-head p {
  font-size: 12px;
  margin-top: 2px;
}

.site-requests-section-head .site-request-pager {
  min-width: min(100%, 430px);
}

.site-requests-table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.06);
  max-height: calc(100vh - 360px);
  min-height: 392px;
  overflow: auto;
}

.site-requests-history-card .site-requests-table-wrap {
  max-height: 430px;
  min-height: 240px;
}

.site-requests-smart-table {
  border: 0;
  min-width: 1120px;
}

.site-requests-smart-table th,
.site-requests-smart-table td {
  font-size: 12px;
  line-height: 1.18;
  padding: 4px 7px;
  vertical-align: middle;
}

.site-requests-smart-table th {
  background: #f8fafc;
  color: #4b5563;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.site-requests-smart-table th:first-child,
.site-requests-smart-table td:first-child {
  text-align: center;
  width: 34px;
}

.site-requests-smart-table input[type="checkbox"] {
  min-height: 14px;
  padding: 0;
  width: 14px;
}

.site-request-smart-row {
  cursor: pointer;
  height: 40px;
}

.site-request-smart-row.is-selected td {
  background: #eef2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
}

.site-request-smart-row.is-selected:hover td {
  background: #e8edff;
}

.site-request-row-sub {
  color: var(--muted);
  display: block;
  font-size: 11px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-channel,
.site-request-state-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  white-space: nowrap;
}

.site-request-channel {
  background: #f6f8fb;
  color: #344054;
}

.site-status-success,
.document-success,
.document-paid {
  background: #eaf8f0;
  border-color: #b7dfc3;
  color: #127446;
}

.site-status-warning,
.document-warning,
.document-unpaid,
.document-reserved {
  background: #fff7d6;
  border-color: #e7c665;
  color: #775200;
}

.site-status-danger,
.document-cancelled {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.site-status-prom {
  background: #e8f1ff;
  border-color: #b9d4ff;
  color: #175cd3;
}

.site-status-prom-pending {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.site-status-prom-stack {
  align-items: flex-start;
  border-radius: 8px;
  flex-direction: column;
  gap: 1px;
  justify-content: center;
  line-height: 1.08;
  min-width: 86px;
  padding: 3px 7px;
  white-space: normal;
}

.site-status-prom-stack small {
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.site-status-neutral,
.site-status-info,
.document-neutral,
.document-converted,
.document-new,
.document-info,
.document-sold {
  background: #eef3ff;
  border-color: #cfd8ff;
  color: #344054;
}

.site-request-row-actions {
  align-items: center;
  display: flex;
  gap: 5px;
}

.site-request-row-actions.is-compact {
  flex-wrap: nowrap;
}

.site-request-row-actions.is-compact button {
  min-height: 28px;
  padding: 0 8px;
}

.site-request-preview-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 118px);
  overflow: auto;
  padding: 12px;
  position: sticky;
  top: 12px;
}

.site-request-preview-toolbar {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: space-between;
}

.site-request-preview-head {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.site-request-preview-head h3 {
  font-size: 22px;
  margin: 0;
}

.site-request-preview-empty {
  color: var(--muted);
  display: grid;
  gap: 4px;
  min-height: 180px;
  place-content: center;
  text-align: center;
}

.site-request-preview-empty strong {
  color: var(--text);
  font-size: 18px;
}

.site-request-preview-hero {
  align-items: start;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.site-request-preview-hero h3 {
  font-size: 20px;
  line-height: 1.15;
  margin: 3px 0 4px;
}

.site-request-preview-hero p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.site-request-preview-hero > strong {
  color: #175cd3;
  font-size: 18px;
  white-space: nowrap;
}

.site-request-contact-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.button-like {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.button-like.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.site-request-preview-client {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 12px 0;
}

.site-request-preview-client strong {
  font-size: 17px;
}

.site-request-preview-client span {
  color: var(--muted);
  font-size: 13px;
}

.site-request-business-type-control {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border: 1px solid #fdba74;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.08);
  display: grid;
  gap: 6px;
  padding: 10px;
}

.site-request-preview-card > .site-request-business-type-control {
  display: grid;
}

.site-request-business-type-control label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}

.site-request-business-type-control select {
  border-color: #fb923c;
  font-weight: 700;
  min-height: 34px;
}

.site-request-business-type-control small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.site-request-preview-facts {
  display: grid;
  gap: 8px;
}

.site-request-preview-facts div {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.site-request-preview-facts span,
.site-request-preview-delivery span {
  color: var(--muted);
  font-size: 12px;
}

.site-request-preview-facts strong {
  font-size: 13px;
  text-align: right;
}

.site-request-preview-status {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.site-request-preview-status h4 {
  font-size: 15px;
  margin: 0;
}

.site-request-preview-status > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.site-request-status-grid {
  display: grid !important;
  gap: 8px !important;
  grid-template-columns: 1fr 1fr;
}

.site-request-status-grid > div,
.site-request-delivery-grid > div {
  background: #ffffff;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
}

.site-request-status-grid span,
.site-request-delivery-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.site-request-status-grid strong,
.site-request-delivery-grid strong {
  font-size: 12px;
  min-width: 0;
}

.site-request-system-field {
  align-items: start;
  display: grid;
  gap: 4px;
  justify-items: start;
}

.site-request-system-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.site-request-payment-links {
  border-color: #dbe5ff;
}

.site-request-payment-link-list {
  display: grid;
  gap: 8px;
}

.site-request-payment-link-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 10px;
}

.site-request-payment-link-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-request-payment-link-row span,
.site-request-payment-link-row small {
  color: var(--muted);
  font-size: 12px;
}

.site-request-payment-link-row small {
  overflow-wrap: anywhere;
}

.site-request-payment-link-row > strong {
  color: #15803d;
  white-space: nowrap;
}

.site-request-payment-link-row.payment-stage {
  background: #f8fafc;
  border-color: #d7dee8;
}

.site-request-payment-link-row.payment-stage > strong {
  color: #475569;
}

.site-request-payment-empty {
  background: #f8fafc;
  border: 1px dashed #d8e0ec;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.site-request-payment-empty span {
  color: var(--muted);
  font-size: 12px;
}

.warning-text {
  color: #b7791f;
  font-weight: 800;
}

.site-request-preview-alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.site-request-preview-alert span {
  font-size: 13px;
}

.site-request-preview-alert.has-action {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.site-request-preview-alert.has-action strong,
.site-request-preview-alert.has-action span {
  min-width: 0;
}

.site-request-preview-alert-action {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
}

.site-request-preview-alert.alert-danger {
  background: #fff4f4;
  border-color: #f0a8a8;
  color: #b42318;
}

.site-request-preview-alert.alert-warning {
  background: #fffaf0;
  border-color: #e7c665;
  color: #775200;
}

@media (max-width: 560px) {
  .site-request-preview-alert.has-action {
    grid-template-columns: 1fr;
  }

  .site-request-preview-alert-action {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

body.sidebar-collapsed {
  grid-template-columns: 56px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
  overflow: visible;
  padding: 12px 8px;
}

body.sidebar-collapsed .sidebar-head {
  align-items: center;
  flex-direction: column;
  margin-bottom: 12px;
}

body.sidebar-collapsed .brand span,
body.sidebar-collapsed .main-nav,
body.sidebar-collapsed .sidebar-user-dock {
  display: none;
}

/* Orders journal row rhythm v4 final: keep order rows aligned with site request rows. */
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table th,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table td,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table th,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table td {
  font-size: 13px;
  padding: 12px 10px;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table th,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  height: 44px;
  white-space: nowrap;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table td,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table td {
  border-top: 1px solid #e2e8f0;
  line-height: 1.34;
  min-height: 88px;
  vertical-align: middle;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row {
  height: 88px;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-number-link,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-number-link,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-client-name,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-client-name {
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.22;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-source-main,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-person,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-source-main,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-person {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.24;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-sub,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-sub {
  color: #64748b;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 4px;
  max-width: 100%;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-client-phone,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-client-phone {
  color: #94a3b8;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-payment-marker,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .payment-due-badge,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-workflow-badge,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .status,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .channel-pill,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-payment-marker,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .payment-due-badge,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-workflow-badge,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .status,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .channel-pill {
  font-size: 11px;
  line-height: 1.18;
  padding: 4px 7px;
}

/* Uman workspace: final responsive layer. */
@media (max-width: 1320px) and (min-width: 1025px) {
  body[data-current-view="offlineOrders"] .offline-modern-workspace {
    grid-template-columns: minmax(168px, 196px) minmax(0, 1fr) minmax(272px, 300px) !important;
    gap: 12px;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace > .offline-cart-card {
    position: sticky !important;
    top: 12px !important;
    grid-column: auto !important;
    width: auto !important;
    max-height: calc(100vh - 24px) !important;
    overflow: auto !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 2 !important;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail,
  body[data-current-view="offlineOrders"] .offline-cart-panel-close,
  body[data-current-view="offlineOrders"] .offline-modern-page::after {
    display: none !important;
  }

  body[data-current-view="offlineOrders"] .offline-category-card {
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  body[data-current-view="offlineOrders"] .offline-payment-methods > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.sidebar-collapsed[data-current-view="offlineOrders"] .offline-modern-workspace {
    grid-template-columns: minmax(190px, 218px) minmax(0, 1fr) minmax(300px, 340px) !important;
  }
}

@media (max-width: 1024px) {
  body[data-current-view="offlineOrders"] .offline-modern-page {
    padding-bottom: 84px !important;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace {
    grid-template-columns: minmax(160px, 190px) minmax(0, 1fr) !important;
    gap: 12px;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace > .offline-cart-card {
    position: fixed !important;
    inset: 0 0 0 auto !important;
    width: min(420px, 94vw) !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    grid-column: auto !important;
    transform: translateX(104%) !important;
    transition: transform 0.22s ease, opacity 0.22s ease !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 60 !important;
    border-radius: 8px 0 0 8px !important;
    box-shadow: -18px 0 48px rgba(15, 23, 42, 0.22) !important;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)) !important;
  }

  body[data-current-view="offlineOrders"] .offline-modern-page.is-cart-panel-open .offline-cart-card {
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body[data-current-view="offlineOrders"] .offline-modern-page::after {
    content: "";
    position: fixed;
    inset: 0;
    display: block !important;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 55;
  }

  body[data-current-view="offlineOrders"] .offline-modern-page.is-cart-panel-open::after {
    opacity: 1;
    pointer-events: auto;
  }

  body[data-current-view="offlineOrders"] .offline-cart-panel-close {
    display: inline-flex !important;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail {
    position: fixed;
    left: 240px;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08);
  }

  body.sidebar-collapsed[data-current-view="offlineOrders"] .offline-cart-compact-rail {
    left: 56px;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail strong {
    color: #0f172a;
    font-size: 14px;
    white-space: nowrap;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail b {
    color: #15803d;
    font-size: 18px;
    white-space: nowrap;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail button {
    flex: 0 0 auto;
  }

  body[data-current-view="offlineOrders"] .offline-category-card {
    max-height: calc(100vh - 110px);
    overflow: auto;
  }
}

@media (max-width: 900px) {
  body[data-current-view="offlineOrders"] .offline-cart-compact-rail,
  body.sidebar-collapsed[data-current-view="offlineOrders"] .offline-cart-compact-rail {
    left: 0;
  }
}

@media (max-width: 760px) {
  body[data-current-view="offlineOrders"] .offline-modern-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-current-view="offlineOrders"] .offline-category-card {
    max-height: 180px;
  }
}

@media (max-width: 1180px) {
  body[data-current-view="offlineOrders"] .offline-modern-head {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  body[data-current-view="offlineOrders"] .offline-modern-head .offline-context-card,
  body[data-current-view="offlineOrders"] .offline-modern-head .offline-delivery-context-wrap {
    flex: 1 1 220px;
    min-width: 0;
  }

  body[data-current-view="offlineOrders"] .offline-history-action {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    padding: 10px 12px !important;
    align-items: center;
    justify-content: center;
  }

  body[data-current-view="offlineOrders"] .offline-history-action > span:not(.order-action-icon) {
    display: none;
  }
}

body[data-current-view="offlineOrders"] .uman-hotkeys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
}

body[data-current-view="offlineOrders"] .uman-hotkeys kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #f8fafc;
  color: #0f172a;
  font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
}

@media (min-width: 1025px) {
  body[data-current-view="offlineOrders"] .uman-hotkeys-narrow {
    display: none;
  }
}

@media (max-width: 1024px) and (pointer: coarse) {
  body[data-current-view="offlineOrders"] .uman-hotkeys {
    display: none;
  }
}

body[data-current-view="offlineOrders"] .offline-product-results {
  max-height: none !important;
}

body[data-current-view="offlineOrders"] .offline-catalog-card,
body[data-current-view="offlineOrders"] .offline-product-results.is-compact {
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-catalog-card {
  overflow: hidden;
}

body[data-current-view="offlineOrders"] .offline-product-results.is-compact {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 4px !important;
  max-height: calc(100vh - 232px) !important;
  overflow-y: auto !important;
  padding-right: 2px;
}

body[data-current-view="offlineOrders"] .offline-product-compact {
  display: grid !important;
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  grid-template-columns: 34px minmax(120px, 1fr) max-content minmax(96px, max-content) max-content max-content !important;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 5px 10px;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  background: #ffffff;
}

body[data-current-view="offlineOrders"] .offline-product-compact:hover {
  border-color: #c7d2fe;
  background: #fafbff;
}

body[data-current-view="offlineOrders"] .offline-product-compact.is-added {
  border-color: #bbf7d0;
  background: #f3fdf6;
}

body[data-current-view="offlineOrders"] .offline-product-compact.is-unavailable {
  background: #fffaf5;
}

body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-media,
body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-thumb {
  width: 34px;
  height: 34px;
}

body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-media {
  overflow: hidden;
  border-radius: 7px;
  background: #f1f5f9;
}

body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-thumb {
  object-fit: cover;
  font-size: 11px;
}

body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-main {
  min-width: 0;
  display: grid;
  gap: 1px;
}

body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-main strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-main small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body[data-current-view="offlineOrders"] .offline-product-compact .offline-stock {
  padding: 2px 8px;
  font-size: 11px;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-product-compact > b {
  min-width: 0;
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-product-compact > b span {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
}

body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-qty {
  display: inline-grid;
  grid-template-columns: 26px 44px 26px;
  height: 30px;
}

body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-qty button {
  padding: 0;
  font-size: 14px;
}

body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-qty input {
  padding: 0 2px;
  font-size: 13px;
  text-align: center;
}

body[data-current-view="offlineOrders"] .offline-product-compact > button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 82px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

body[data-current-view="offlineOrders"] .offline-product-compact > button.primary.is-added {
  background: #16a34a;
  border-color: #16a34a;
}

body[data-current-view="offlineOrders"] .offline-view-indicator button[data-uman-catalog-view="compact"] {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-modern-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0 0 4px;
}

body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-modern-title h2 {
  font-size: 20px;
}

body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-modern-title p,
body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-card-head p {
  display: none;
}

body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-context-card {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 360px;
  min-height: 44px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-context-card > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-context-card strong {
  overflow: hidden;
  max-width: 200px;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-context-card span {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-context-card small {
  display: none;
}

body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-delivery-context-wrap {
  flex: 0 1 auto;
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-modern-page.has-customer .offline-history-action {
  margin-left: auto;
}

body[data-current-view="offlineOrders"] .uman-repeat-card {
  margin: 4px 0 10px;
  padding: 12px;
  border: 1px dashed #c7d2fe;
  border-radius: 8px;
  background: #f8faff;
}

body[data-current-view="offlineOrders"] .uman-repeat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

body[data-current-view="offlineOrders"] .uman-repeat-head strong {
  display: block;
  color: #1e293b;
  font-size: 13px;
}

body[data-current-view="offlineOrders"] .uman-repeat-head span {
  color: #64748b;
  font-size: 12px;
}

body[data-current-view="offlineOrders"] .uman-repeat-head button {
  width: 100%;
  margin-top: 4px;
  flex: 0 0 auto;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .uman-repeat-lines {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-current-view="offlineOrders"] .uman-repeat-lines li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #334155;
  font-size: 12px;
}

body[data-current-view="offlineOrders"] .uman-repeat-lines li span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body[data-current-view="offlineOrders"] .uman-repeat-lines li b {
  color: #0f172a;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .uman-repeat-lines li small {
  color: #b45309;
  font-size: 11px;
}

body[data-current-view="offlineOrders"] .uman-repeat-lines li.muted {
  color: #94a3b8;
}

body[data-current-view="offlineOrders"] .uman-repeat-lines li.is-negative span {
  color: #92400e;
}

body[data-current-view="offlineOrders"] .uman-repeat-lines li.is-missing span {
  color: #94a3b8;
  text-decoration: line-through;
}

body[data-current-view="offlineOrders"] .uman-repeat-lines li.is-missing small {
  color: #94a3b8;
  text-decoration: none;
}

@media (min-width: 1400px) {
  body[data-current-view="offlineOrders"] .uman-repeat-head button {
    width: auto;
    margin-top: 0;
  }
}

@media (max-width: 1320px) {
  body[data-current-view="offlineOrders"] .offline-product-compact {
    grid-template-columns: 30px minmax(110px, 1fr) minmax(84px, max-content) max-content max-content !important;
    gap: 8px;
  }

  body[data-current-view="offlineOrders"] .offline-product-compact .offline-stock,
  body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-main small {
    display: none;
  }

  body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-qty {
    grid-template-columns: 24px 40px 24px;
  }

  body[data-current-view="offlineOrders"] .offline-product-compact > button.primary {
    min-width: 72px;
    padding: 0 8px;
  }
}

@media (max-width: 760px) {
  body[data-current-view="offlineOrders"] .offline-product-results.is-compact {
    max-height: min(58vh, 620px) !important;
  }

  body[data-current-view="offlineOrders"] .offline-product-compact {
    grid-template-columns: 30px minmax(0, 1fr) max-content !important;
    grid-template-rows: auto auto;
    gap: 5px 8px;
    min-height: 74px;
  }

  body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-media {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
  }

  body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-main {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-current-view="offlineOrders"] .offline-product-compact > b {
    grid-column: 3;
    grid-row: 1;
  }

  body[data-current-view="offlineOrders"] .offline-product-compact .offline-product-qty {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }

  body[data-current-view="offlineOrders"] .offline-product-compact > button.primary {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 480px) {
  body[data-current-view="offlineOrders"] .offline-cart-compact-rail {
    gap: 8px;
    padding-inline: 10px;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail > div {
    gap: 6px;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail span {
    display: none;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail strong {
    font-size: 12px;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail b {
    font-size: 16px;
  }
}

/* Warehouse workspace v4: four task-focused screens with responsive journals. */
.warehouse-suite-page {
  overflow-x: clip;
}

.warehouse-suite-nav {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.warehouse-suite-nav .warehouse-suite-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: visible;
  padding: 0;
}

.warehouse-suite-tabs button {
  max-width: none;
  min-width: 0;
}

.warehouse-suite-tabs button.is-danger:not(.active) {
  background: #fff8f8;
  border-color: #fecaca;
}

.warehouse-suite-tabs button.is-danger span {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #dc2626;
}

.warehouse-suite-tabs button.is-danger small {
  color: #b42318;
}

.warehouse-suite-utility-menu {
  position: relative;
}

.warehouse-suite-utility-menu > summary {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  color: #475569;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  min-height: 58px;
  padding: 0 14px;
}

.warehouse-suite-utility-menu > summary::-webkit-details-marker {
  display: none;
}

.warehouse-suite-utility-menu[open] > div {
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .16);
  display: grid;
  gap: 5px;
  min-width: 280px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
}

.warehouse-suite-utility-menu[open] button {
  background: #fff;
  border: 0;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  font: inherit;
  padding: 9px 10px;
  text-align: left;
}

.warehouse-suite-utility-menu[open] button:hover {
  background: #f1f5f9;
}

.warehouse-filter-band {
  align-items: end;
  background: #fff;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(150px, 1fr)) auto auto;
  min-width: 0;
  padding: 12px;
}

.warehouse-filter-band label,
.warehouse-filter-more {
  min-width: 0;
}

.warehouse-filter-band label > span {
  display: block;
}

.warehouse-filter-band input,
.warehouse-filter-band select {
  max-width: 100%;
  width: 100%;
}

.warehouse-filter-check {
  align-items: center;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  white-space: nowrap;
}

.warehouse-filter-check input {
  width: auto;
}

.warehouse-filter-check span {
  display: inline !important;
}

.warehouse-filter-more {
  position: relative;
}

.warehouse-filter-more > summary {
  align-items: center;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  min-height: 40px;
  padding: 8px 10px;
  white-space: nowrap;
}

.warehouse-filter-more[open] > div {
  background: #fff;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
  display: grid;
  gap: 10px;
  min-width: 300px;
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 35;
}

.warehouse-filter-inline-summary {
  align-items: center;
  border-top: 1px solid #e6edf5;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px 16px;
  grid-column: 1 / -1;
  padding-top: 9px;
}

.warehouse-filter-inline-summary strong {
  color: #172033;
}

body[data-current-view="stockBalances"] .warehouse-filter-band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-current-view="stockBalances"] .warehouse-filter-search {
  grid-column: span 2;
}

.warehouse-balance-product {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-width: 0;
}

.warehouse-balance-product strong,
.warehouse-balance-product span {
  display: block;
}

.warehouse-balance-product strong {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  line-height: 1.25;
  overflow: hidden;
}

.warehouse-balance-product span {
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
}

.warehouse-suite-page .warehouse-balance-table,
.warehouse-suite-page .warehouse-control-table,
.warehouse-suite-page .warehouse-document-journal-table,
.warehouse-suite-page .inventory-journal-table,
.warehouse-suite-page .inventory-workspace-table {
  table-layout: fixed;
  width: 100%;
}

.warehouse-suite-page .warehouse-balance-table th,
.warehouse-suite-page .warehouse-balance-table td,
.warehouse-suite-page .warehouse-control-table th,
.warehouse-suite-page .warehouse-control-table td,
.warehouse-suite-page .warehouse-document-journal-table th,
.warehouse-suite-page .warehouse-document-journal-table td {
  display: table-cell;
  overflow: visible;
  text-overflow: clip;
  width: auto;
}

.warehouse-balance-table th:first-child,
.warehouse-balance-table td:first-child {
  width: 40%;
}

.warehouse-balance-table .warehouse-balance-number,
.warehouse-balance-table .warehouse-balance-cost {
  white-space: nowrap;
}

.warehouse-control-modes {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.warehouse-control-modes button {
  background: #fff;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  color: #172033;
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-height: 84px;
  padding: 12px;
  text-align: left;
}

.warehouse-control-modes button strong {
  font-size: 22px;
}

.warehouse-control-modes button small {
  color: #64748b;
}

.warehouse-control-modes button.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .1);
}

.warehouse-control-modes button.is-danger.active {
  background: #fff7f7;
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .1);
}

.warehouse-control-modes button.is-warning.active {
  background: #fffaf0;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .1);
}

.stock-control-row.stock-danger {
  background: #fffafa;
}

.stock-control-row-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.stock-control-settings-backdrop {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 20px;
  position: fixed;
}

.stock-control-settings-dialog {
  max-height: calc(100vh - 40px);
  max-width: 620px;
  overflow: auto;
  position: relative;
  width: 100%;
}

.stock-control-settings-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

.warehouse-document-filter-band,
.inventory-filter-band {
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(150px, 1fr));
}

.warehouse-workspace-toolbar {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 12px;
}

.warehouse-document-work-card.is-workspace {
  max-width: 100%;
}

.warehouse-danger-zone {
  align-items: center;
  border-top: 1px solid #fecaca;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
}

.warehouse-danger-zone p {
  color: #64748b;
  margin: 4px 0 0;
}

.inventory-journal-workspace,
.inventory-document-workspace {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.inventory-journal-table th:first-child,
.inventory-journal-table td:first-child {
  width: 20%;
}

.inventory-journal-table .product-row {
  cursor: pointer;
}

.inventory-position-toolbar {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.inventory-position-toolbar > div,
.inventory-position-toolbar > div:last-child {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.inventory-position-toolbar span {
  color: #64748b;
  font-size: 12px;
}

.inventory-catalog-drawer {
  border-color: #bfdbfe;
}

.inventory-document-bar {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.inventory-document-bar .inventory-note-field {
  grid-column: span 2;
}

.inventory-document-workspace .inventory-lines {
  padding: 0;
}

.inventory-document-workspace .inventory-table-shell {
  border: 0;
  border-radius: 0;
  max-height: none;
  overflow: visible;
}

.inventory-workspace-table th:first-child,
.inventory-workspace-table td:first-child {
  width: 36%;
}

.inventory-actions {
  align-items: center;
  border-top: 1px solid #e6edf5;
  justify-content: space-between;
  padding: 12px;
}

.inventory-v2-summary-cards {
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  min-width: min(560px, 100%);
}

.inventory-v2-table th:first-child,
.inventory-v2-table td:first-child {
  width: 30%;
}

.inventory-v2-table th:nth-child(2),
.inventory-v2-table td:nth-child(2) {
  width: 19%;
}

.inventory-v2-table th:nth-child(3),
.inventory-v2-table td:nth-child(3),
.inventory-v2-table th:nth-child(5),
.inventory-v2-table td:nth-child(5) {
  width: 11%;
}

.inventory-v2-table th:nth-child(4),
.inventory-v2-table td:nth-child(4) {
  width: 22%;
}

.inventory-v2-table th:last-child,
.inventory-v2-table td:last-child {
  width: 7%;
}

.inventory-v2-row.state-needs_recount td {
  background: #fff8ed;
}

.inventory-v2-row.state-excluded td {
  background: #f8fafc;
}

.inventory-state-cell small {
  color: #64748b;
  display: block;
  line-height: 1.35;
  margin-top: 5px;
}

.inventory-system-cell small {
  color: #64748b;
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
}

.inventory-state-cell .status-muted {
  background: #eef2f6;
  color: #475569;
}

.inventory-count-control {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(74px, 1fr) auto;
  min-width: 0;
}

.inventory-count-control input {
  min-width: 0;
  width: 100%;
}

.inventory-count-control button {
  white-space: nowrap;
}

.inventory-line-actions .overflow-menu {
  display: inline-block;
}

.inventory-line-actions .overflow-menu > div {
  min-width: min(250px, calc(100vw - 48px));
}

.inventory-attempt-history {
  margin-top: 6px;
}

.inventory-attempt-history summary {
  color: #2563eb;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.inventory-attempt-history > div {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.inventory-attempt-history > div > span {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: block;
  font-size: 11px;
  padding: 6px;
}

.inventory-attempt-history small {
  margin-top: 2px;
}

.danger-text {
  color: #b42318;
}

@media (max-width: 1280px) {
  .warehouse-suite-grid,
  .warehouse-suite-grid.no-left,
  .warehouse-suite-grid.no-right {
    grid-template-columns: minmax(0, 1fr);
  }

  .warehouse-filter-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .warehouse-filter-search {
    grid-column: span 2;
  }

  .warehouse-document-filter-band,
  .inventory-filter-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-document-filter-band .warehouse-filter-search,
  .inventory-filter-band .warehouse-filter-search {
    grid-column: span 1;
  }

  .warehouse-suite-page .warehouse-control-table th:nth-child(2),
  .warehouse-suite-page .warehouse-control-table td:nth-child(2),
  .warehouse-suite-page .warehouse-control-table th:nth-child(6),
  .warehouse-suite-page .warehouse-control-table td:nth-child(6),
  .warehouse-suite-page .warehouse-document-journal-table th:nth-child(6),
  .warehouse-suite-page .warehouse-document-journal-table td:nth-child(6) {
    display: none;
  }

  .warehouse-suite-page .warehouse-balance-table th:first-child,
  .warehouse-suite-page .warehouse-balance-table td:first-child,
  .warehouse-suite-page .warehouse-control-table th:first-child,
  .warehouse-suite-page .warehouse-control-table td:first-child {
    width: 42%;
  }
}

@media (max-width: 1024px) {
  .warehouse-suite-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .warehouse-suite-nav .warehouse-suite-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-suite-utility-menu {
    justify-self: start;
  }

  .warehouse-suite-utility-menu > summary {
    min-height: 38px;
  }

  .warehouse-suite-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-control-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-suite-page .warehouse-balance-table th:nth-child(5),
  .warehouse-suite-page .warehouse-balance-table td:nth-child(5),
  .warehouse-suite-page .warehouse-balance-table th:nth-child(6),
  .warehouse-suite-page .warehouse-balance-table td:nth-child(6),
  .warehouse-suite-page .warehouse-document-journal-table th:nth-child(5),
  .warehouse-suite-page .warehouse-document-journal-table td:nth-child(5),
  .warehouse-suite-page .warehouse-document-journal-table th:nth-child(7),
  .warehouse-suite-page .warehouse-document-journal-table td:nth-child(7),
  .inventory-journal-table th:nth-child(4),
  .inventory-journal-table td:nth-child(4) {
    display: none;
  }

  .inventory-document-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-v2-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .inventory-v2-table th:first-child,
  .inventory-v2-table td:first-child {
    width: 32%;
  }

  .inventory-count-control {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .warehouse-filter-band,
  body[data-current-view="stockBalances"] .warehouse-filter-band,
  .warehouse-document-filter-band,
  .inventory-filter-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .warehouse-filter-search,
  body[data-current-view="stockBalances"] .warehouse-filter-search,
  .warehouse-document-filter-band .warehouse-filter-search,
  .inventory-filter-band .warehouse-filter-search,
  .inventory-document-bar .inventory-note-field {
    grid-column: auto;
  }

  .warehouse-suite-head-actions,
  .warehouse-suite-head-actions .warehouse-action-button {
    width: 100%;
  }

  .warehouse-suite-page .warehouse-balance-table thead,
  .warehouse-suite-page .warehouse-control-table thead,
  .warehouse-suite-page .warehouse-document-journal-table thead,
  .warehouse-suite-page .inventory-journal-table thead,
  .warehouse-suite-page .inventory-workspace-table thead {
    display: none;
  }

  .warehouse-suite-page .warehouse-balance-table,
  .warehouse-suite-page .warehouse-balance-table tbody,
  .warehouse-suite-page .warehouse-balance-table tr,
  .warehouse-suite-page .warehouse-control-table,
  .warehouse-suite-page .warehouse-control-table tbody,
  .warehouse-suite-page .warehouse-control-table tr,
  .warehouse-suite-page .warehouse-document-journal-table,
  .warehouse-suite-page .warehouse-document-journal-table tbody,
  .warehouse-suite-page .warehouse-document-journal-table tr,
  .warehouse-suite-page .inventory-journal-table,
  .warehouse-suite-page .inventory-journal-table tbody,
  .warehouse-suite-page .inventory-journal-table tr,
  .warehouse-suite-page .inventory-workspace-table,
  .warehouse-suite-page .inventory-workspace-table tbody,
  .warehouse-suite-page .inventory-workspace-table tr {
    display: grid;
    width: 100%;
  }

  .warehouse-suite-page .warehouse-balance-table tr,
  .warehouse-suite-page .warehouse-control-table tr,
  .warehouse-suite-page .warehouse-document-journal-table tr,
  .warehouse-suite-page .inventory-journal-table tr,
  .warehouse-suite-page .inventory-workspace-table tr {
    border-bottom: 1px solid #e6edf5;
    gap: 6px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .warehouse-suite-page .warehouse-balance-table td,
  .warehouse-suite-page .warehouse-control-table td,
  .warehouse-suite-page .warehouse-document-journal-table td,
  .warehouse-suite-page .inventory-journal-table td,
  .warehouse-suite-page .inventory-workspace-table td {
    border: 0;
    display: block;
    padding: 0;
    width: auto !important;
  }

  .warehouse-suite-page .warehouse-balance-table td[data-label]::before,
  .warehouse-suite-page .warehouse-control-table td[data-label]::before,
  .warehouse-suite-page .warehouse-document-journal-table td[data-label]::before,
  .warehouse-suite-page .inventory-journal-table td[data-label]::before,
  .warehouse-suite-page .inventory-workspace-table td[data-label]::before {
    color: #64748b;
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 2px;
  }

  .warehouse-suite-page .warehouse-balance-table td:first-child,
  .warehouse-suite-page .warehouse-control-table td:first-child,
  .warehouse-suite-page .warehouse-document-journal-table td:first-child,
  .warehouse-suite-page .inventory-journal-table td:first-child,
  .warehouse-suite-page .inventory-workspace-table td:first-child {
    grid-column: 1 / -1;
  }

  .warehouse-suite-page .warehouse-balance-table td:last-child,
  .warehouse-suite-page .warehouse-control-table td:last-child,
  .warehouse-suite-page .warehouse-document-journal-table td:last-child,
  .warehouse-suite-page .inventory-journal-table td:last-child,
  .warehouse-suite-page .inventory-workspace-table td:last-child {
    grid-column: 1 / -1;
  }

  .warehouse-balance-product strong {
    -webkit-line-clamp: 3;
  }

  .inventory-document-bar,
  .warehouse-control-modes {
    grid-template-columns: minmax(0, 1fr);
  }

  .inventory-position-toolbar,
  .warehouse-danger-zone,
  .warehouse-workspace-toolbar {
    align-items: stretch;
    display: grid;
  }

  .inventory-v2-workspace .detail-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .inventory-v2-workspace .inventory-v2-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .warehouse-suite-page .inventory-v2-table td:nth-child(2) {
    grid-column: 1 / -1;
  }

  .warehouse-suite-page .inventory-v2-table tr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .warehouse-suite-page .inventory-v2-table td:nth-child(3),
  .warehouse-suite-page .inventory-v2-table td:nth-child(4),
  .warehouse-suite-page .inventory-v2-table td:nth-child(5) {
    grid-column: auto;
  }

  .inventory-count-control {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .inventory-line-actions .overflow-menu,
  .inventory-line-actions .overflow-menu > summary {
    width: 100%;
  }

  .warehouse-filter-more[open] > div,
  .warehouse-suite-utility-menu[open] > div {
    left: 0;
    min-width: min(300px, calc(100vw - 40px));
    right: auto;
  }
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row td,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row td {
  background: #ffffff !important;
  box-shadow: none !important;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row:hover td,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row:hover td {
  background: #f8fafc !important;
  box-shadow: none !important;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row-reserved td:first-child,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row-completed td:first-child,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row.has-debt td:first-child,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row.is-overdue td:first-child,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row.payment-due-attention td:first-child,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row.needs-action td:first-child,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row-reserved td:first-child,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row-completed td:first-child,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row.has-debt td:first-child,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row.is-overdue td:first-child,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row.payment-due-attention td:first-child,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row.needs-action td:first-child {
  background: #ffffff !important;
  box-shadow: none !important;
}

/* Orders journal row rhythm v4: match the breathable site request journal rows. */
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table th,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table td,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table th,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table td {
  font-size: 13px;
  padding: 12px 10px;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table th,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  height: 44px;
  white-space: nowrap;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table td,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table td {
  border-top: 1px solid #e2e8f0;
  line-height: 1.34;
  min-height: 88px;
  vertical-align: middle;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row {
  height: 88px;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-number-link,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-number-link,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-client-name,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-client-name {
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.22;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-source-main,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-person,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-source-main,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-person {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.24;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-sub,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-sub {
  color: #64748b;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 4px;
  max-width: 100%;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-client-phone,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-client-phone {
  color: #94a3b8;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-payment-marker,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .payment-due-badge,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-workflow-badge,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .status,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .channel-pill,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-payment-marker,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .payment-due-badge,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-workflow-badge,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .status,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .channel-pill {
  font-size: 11px;
  line-height: 1.18;
  padding: 4px 7px;
}

/* Orders journal v4: balanced route cards and unclipped table after old responsive layers. */
body[data-current-view="orders"] .order-journal-kpi-grid,
body[data-current-view="onlineOrders"] .order-journal-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-current-view="orders"] .order-journal-kpi-card,
body[data-current-view="onlineOrders"] .order-journal-kpi-card {
  min-height: 86px;
  padding: 14px;
}

body[data-current-view="orders"] .order-journal-kpi-card .order-action-icon,
body[data-current-view="onlineOrders"] .order-journal-kpi-card .order-action-icon {
  height: 30px;
  width: 30px;
}

body[data-current-view="orders"] .order-journal-filterbar,
body[data-current-view="onlineOrders"] .order-journal-filterbar {
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1fr) auto auto max-content;
}

body[data-current-view="orders"] .orders-table-wrap,
body[data-current-view="onlineOrders"] .orders-table-wrap {
  overflow-x: hidden !important;
}

body[data-current-view="orders"] .orders-smart-table.order-work-table,
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table {
  min-width: 0 !important;
  table-layout: fixed;
  width: 100%;
}

body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(7),
body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(7),
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(8),
body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(8),
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(9),
body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(9),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(7),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(7),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(8),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(8),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(9),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(9) {
  box-shadow: none !important;
  min-width: 0 !important;
  position: static !important;
  right: auto !important;
  z-index: auto !important;
}

body[data-current-view="orders"] .orders-smart-table.order-work-table th,
body[data-current-view="orders"] .orders-smart-table.order-work-table td,
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th,
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(1),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(1) { width: 11%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(2),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(2) { width: 20%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(3),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(3) { width: 9%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(4),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(4) { width: 14%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(5),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(5) { width: 15%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(6),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(6) { width: 16%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(7),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(7) { width: 7%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(8),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(8) { width: 5%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(9),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(9) { width: 3%; }

body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(6),
body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(6),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(6),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(6) {
  display: table-cell !important;
}

body[data-current-view="orders"] .orders-smart-table.order-work-table .order-payment-cell,
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table .order-payment-cell {
  display: table-cell !important;
  min-width: 0;
}

body[data-current-view="orders"] .orders-smart-table.order-work-table .order-payment-marker,
body[data-current-view="orders"] .orders-smart-table.order-work-table .payment-due-badge,
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table .order-payment-marker,
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table .payment-due-badge {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="orders"] .orders-smart-table.order-work-table .payment-due-badge,
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table .payment-due-badge {
  margin-top: 4px;
}

body[data-current-view="orders"] .orders-smart-table.order-work-table .order-row-open-cell button,
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table .order-row-open-cell button {
  min-width: 70px;
  white-space: nowrap;
}

@media (max-width: 1360px) {
  body[data-current-view="orders"] .order-journal-filterbar,
  body[data-current-view="onlineOrders"] .order-journal-filterbar {
    grid-template-columns: minmax(260px, 1fr) auto auto max-content;
  }

  body[data-current-view="orders"] .order-journal-source-segment,
  body[data-current-view="onlineOrders"] .order-journal-source-segment {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body[data-current-view="orders"] .order-journal-kpi-grid,
  body[data-current-view="onlineOrders"] .order-journal-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(3),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(3),
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(7),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(7),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(3),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(3),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(7),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(7) {
    display: none;
  }

  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(1),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(1) { width: 12%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(2),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(2) { width: 23%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(4),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(4) { width: 17%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(5),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(5) { width: 17%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(6),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(6) { width: 19%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(8),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(8) { width: 6%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(9),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(9) { width: 6%; }
}

@media (max-width: 1020px) {
  body[data-current-view="orders"] .order-journal-kpi-grid,
  body[data-current-view="onlineOrders"] .order-journal-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(1),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(1) { width: 12%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(2),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(2) { width: 23%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(4),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(4) { width: 15%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(5),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(5) { width: 16%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(6),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(6) { width: 17%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(8),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(8) { width: 8%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(9),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(9) { width: 9%; }
}

@media (max-width: 820px) {
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(8),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(8),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(8),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(8) {
    display: none;
  }

  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(1),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(1),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(1),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(1) { width: 13% !important; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(2),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(2),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(2),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(2) { width: 24% !important; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(4),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(4),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(4),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(4) { width: 15% !important; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(5),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(5),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(5),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(5) { width: 16% !important; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(6),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(6),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(6),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(6) { width: 20% !important; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(9),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(9),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(9),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(9) { width: 12% !important; }
}

/* Orders journal v3: same block rhythm as the site requests journal, without a side preview. */
body[data-current-view="orders"] .orders-smart-page,
body[data-current-view="onlineOrders"] .orders-smart-page {
  gap: 14px;
}

body[data-current-view="orders"] .orders-smart-head,
body[data-current-view="onlineOrders"] .orders-smart-head {
  align-items: center;
}

body[data-current-view="orders"] .orders-smart-head > div,
body[data-current-view="onlineOrders"] .orders-smart-head > div {
  min-width: 0;
}

body[data-current-view="orders"] .orders-smart-head h2,
body[data-current-view="onlineOrders"] .orders-smart-head h2 {
  font-size: clamp(22px, 3.6vw, 32px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

body[data-current-view="orders"] .orders-smart-actions,
body[data-current-view="onlineOrders"] .orders-smart-actions {
  gap: 8px;
}

body[data-current-view="orders"] .orders-smart-actions .ghost:disabled,
body[data-current-view="onlineOrders"] .orders-smart-actions .ghost:disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  opacity: 1;
}

body[data-current-view="orders"] .orders-more-actions,
body[data-current-view="onlineOrders"] .orders-more-actions {
  position: relative;
}

body[data-current-view="orders"] .orders-more-actions summary,
body[data-current-view="onlineOrders"] .orders-more-actions summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  list-style: none;
  padding: 0 14px;
  user-select: none;
  white-space: nowrap;
}

body[data-current-view="orders"] .orders-more-actions summary::-webkit-details-marker,
body[data-current-view="onlineOrders"] .orders-more-actions summary::-webkit-details-marker {
  display: none;
}

body[data-current-view="orders"] .orders-more-actions[open] summary,
body[data-current-view="onlineOrders"] .orders-more-actions[open] summary {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body[data-current-view="orders"] .orders-more-actions-panel,
body[data-current-view="onlineOrders"] .orders-more-actions-panel {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 6px;
  min-width: 230px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

body[data-current-view="orders"] .orders-more-actions-panel button,
body[data-current-view="onlineOrders"] .orders-more-actions-panel button {
  justify-content: flex-start;
  min-height: 36px;
  width: 100%;
}

body[data-current-view="orders"] .order-journal-kpi-grid,
body[data-current-view="onlineOrders"] .order-journal-kpi-grid {
  margin-top: 0;
}

body[data-current-view="orders"] .order-journal-kpi-card,
body[data-current-view="onlineOrders"] .order-journal-kpi-card {
  cursor: pointer;
  font: inherit;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

body[data-current-view="orders"] .order-journal-kpi-card:hover,
body[data-current-view="onlineOrders"] .order-journal-kpi-card:hover {
  border-color: #c7d2fe;
  transform: translateY(-1px);
}

body[data-current-view="orders"] .order-journal-filterbar,
body[data-current-view="onlineOrders"] .order-journal-filterbar {
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1fr) auto auto max-content;
  min-width: 0;
}

body[data-current-view="orders"] .order-journal-search,
body[data-current-view="onlineOrders"] .order-journal-search,
body[data-current-view="orders"] .order-journal-source-segment,
body[data-current-view="onlineOrders"] .order-journal-source-segment {
  min-width: 0;
}

body[data-current-view="orders"] .order-journal-source-segment > div,
body[data-current-view="onlineOrders"] .order-journal-source-segment > div {
  flex-wrap: wrap;
  overflow: visible;
}

body[data-current-view="orders"] .order-journal-source-segment button,
body[data-current-view="onlineOrders"] .order-journal-source-segment button {
  flex: 1 1 auto;
  min-width: 68px;
  padding: 0 12px;
}

body[data-current-view="orders"] .order-journal-mine,
body[data-current-view="onlineOrders"] .order-journal-mine {
  height: 40px;
  white-space: nowrap;
}

body[data-current-view="orders"] .order-journal-footer,
body[data-current-view="onlineOrders"] .order-journal-footer {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

body[data-current-view="orders"] .order-journal-footer .order-pager,
body[data-current-view="onlineOrders"] .order-journal-footer .order-pager {
  margin-left: auto;
  max-width: 100%;
}

body[data-current-view="orders"] #customer-payment-form,
body[data-current-view="onlineOrders"] #customer-payment-form {
  margin-top: 0;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table {
  min-width: 0 !important;
  table-layout: fixed;
  width: 100%;
}

body[data-current-view="orders"] .orders-smart-page .orders-table-wrap,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-table-wrap {
  max-height: none;
  overflow-x: hidden !important;
}

body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(1),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(1) { width: 11%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(2),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(2) { width: 17%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(3),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(3) { width: 9%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(4),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(4) { width: 13%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(5),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(5) { width: 13%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(6),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(6) { width: 15%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(7),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(7) { width: 7%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(8),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(8) { width: 7%; }
body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(9),
body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(9) { width: 8%; }

body[data-current-view="orders"] .order-payment-cell,
body[data-current-view="onlineOrders"] .order-payment-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

body[data-current-view="orders"] .order-payment-cell .order-payment-marker,
body[data-current-view="orders"] .order-payment-cell .payment-due-badge,
body[data-current-view="onlineOrders"] .order-payment-cell .order-payment-marker,
body[data-current-view="onlineOrders"] .order-payment-cell .payment-due-badge {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1400px) {
  body[data-current-view="orders"] .order-journal-filterbar,
  body[data-current-view="onlineOrders"] .order-journal-filterbar {
    grid-template-columns: minmax(260px, 1fr) auto auto max-content;
  }

  body[data-current-view="orders"] .order-journal-source-segment,
  body[data-current-view="onlineOrders"] .order-journal-source-segment {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 1360px) {
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(3),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(3),
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(7),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(7),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(3),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(3),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(7),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(7) {
    display: none;
  }

  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(1),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(1) { width: 12%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(2),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(2) { width: 24%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(4),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(4) { width: 17%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(5),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(5) { width: 15%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(6),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(6) { width: 16%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(8),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(8) { width: 8%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(9),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(9) { width: 8%; }
}

@media (max-width: 900px) {
  body[data-current-view="orders"] .order-journal-filterbar,
  body[data-current-view="onlineOrders"] .order-journal-filterbar {
    grid-template-columns: 1fr;
  }

  body[data-current-view="orders"] .order-journal-source-segment,
  body[data-current-view="onlineOrders"] .order-journal-source-segment {
    grid-column: auto;
    grid-row: auto;
  }

  body[data-current-view="orders"] .order-journal-source-segment > div,
  body[data-current-view="onlineOrders"] .order-journal-source-segment > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(6),
  body[data-current-view="orders"] .orders-smart-table.order-work-table td:nth-child(6),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(6),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table td:nth-child(6) {
    display: none;
  }

  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(1),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(1) { width: 18%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(2),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(2) { width: 29%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(4),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(4) { width: 22%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(5),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(5) { width: 17%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(8),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(8) { width: 8%; }
  body[data-current-view="orders"] .orders-smart-table.order-work-table th:nth-child(9),
  body[data-current-view="onlineOrders"] .orders-smart-table.order-work-table th:nth-child(9) { width: 6%; }
}

/* Orders journal v2 final overrides: the old sticky action columns belonged to the previous table. */
.orders-smart-page .orders-table-wrap {
  overflow-x: hidden !important;
}

.orders-smart-page .orders-smart-table.order-work-table th:nth-child(7),
.orders-smart-page .orders-smart-table.order-work-table td:nth-child(7),
.orders-smart-page .orders-smart-table.order-work-table th:nth-child(8),
.orders-smart-page .orders-smart-table.order-work-table td:nth-child(8),
.orders-smart-page .orders-smart-table.order-work-table th:nth-child(9),
.orders-smart-page .orders-smart-table.order-work-table td:nth-child(9) {
  box-shadow: none !important;
  min-width: 0 !important;
  position: static !important;
  right: auto !important;
  z-index: auto !important;
}

.orders-smart-page .orders-smart-table.order-work-table .order-work-row td {
  box-shadow: none !important;
}

.orders-smart-page .orders-smart-table.order-work-table .order-work-row-reserved td:first-child,
.orders-smart-page .orders-smart-table.order-work-table .order-work-row-completed td:first-child {
  box-shadow: inset 3px 0 0 #198754 !important;
}

.orders-smart-page .orders-smart-table.order-work-table .order-work-row.has-debt td:first-child {
  box-shadow: inset 3px 0 0 #b54708 !important;
}

.orders-smart-page .orders-smart-table.order-work-table .order-work-row.is-overdue td:first-child {
  box-shadow: inset 3px 0 0 #d92d20 !important;
}

.orders-smart-page .orders-smart-table.order-work-table .order-work-row.payment-due-attention td:first-child {
  box-shadow: inset 3px 0 0 #e0a000 !important;
}

.orders-smart-page .orders-smart-table.order-work-table .order-work-row.needs-action td:first-child {
  box-shadow: inset 3px 0 0 #f97316 !important;
}

/* Orders journal v2: compact list aligned with the site requests journal. */
.orders-smart-page .orders-smart-head {
  align-items: center;
}

.orders-smart-page .orders-smart-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.orders-smart-page .orders-smart-toolbar {
  align-items: center;
  flex-wrap: wrap;
}

.orders-smart-page .orders-smart-search {
  flex: 1 1 360px;
  min-width: min(100%, 280px);
}

.orders-quick-filters {
  display: flex;
  flex: 1 1 360px;
  flex-wrap: wrap;
  gap: 6px;
}

.orders-quick-filters button {
  min-height: 34px;
  padding: 0 12px;
}

.orders-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.orders-active-filters span {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #536079;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}

.orders-smart-page .orders-smart-filters {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.orders-smart-page .orders-smart-filters.is-collapsed {
  display: none;
}

.orders-smart-filters-head {
  align-items: center;
  display: flex;
  gap: 12px;
  grid-column: 1 / -1;
  justify-content: space-between;
}

.orders-smart-filters-head strong {
  display: block;
  font-size: 14px;
}

.orders-smart-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.orders-smart-page .orders-smart-insights {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.orders-smart-page .orders-smart-insight {
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.orders-smart-page .orders-smart-insight:hover {
  border-color: #c7d2fe;
  transform: translateY(-1px);
}

.orders-smart-page .orders-smart-insight.active {
  background: #f8faff;
  border-color: #8da2fb;
  box-shadow: inset 3px 0 0 #2563eb, 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.orders-smart-page .orders-table-wrap {
  max-height: none;
  min-height: 360px;
  overflow-x: hidden;
  overflow-y: auto;
}

.orders-smart-page .orders-smart-table.order-work-table {
  min-width: 0;
  table-layout: fixed;
}

.orders-smart-page .orders-smart-table th,
.orders-smart-page .orders-smart-table td {
  font-size: 13px;
  padding: 12px 10px;
}

.orders-smart-page .orders-smart-table.order-work-table th:first-child,
.orders-smart-page .orders-smart-table.order-work-table td:first-child {
  text-align: left;
  width: 10%;
}

.orders-smart-page .orders-smart-table.order-work-table th:nth-child(2) { width: 17%; }
.orders-smart-page .orders-smart-table.order-work-table th:nth-child(3) { width: 10%; }
.orders-smart-page .orders-smart-table.order-work-table th:nth-child(4) { width: 13%; }
.orders-smart-page .orders-smart-table.order-work-table th:nth-child(5) { width: 12%; }
.orders-smart-page .orders-smart-table.order-work-table th:nth-child(6) { width: 16%; }
.orders-smart-page .orders-smart-table.order-work-table th:nth-child(7) { width: 7%; }
.orders-smart-page .orders-smart-table.order-work-table th:nth-child(8) { width: 7%; }
.orders-smart-page .orders-smart-table.order-work-table th:nth-child(9) { width: 8%; }

.orders-smart-page .orders-smart-table td > strong,
.orders-smart-page .orders-smart-table td > span:not(.status):not(.channel-pill):not(.priority-pill):not(.customer-business-type-badge):not(.payment-due-badge):not(.order-payment-marker) {
  max-width: 100%;
}

.orders-smart-page .order-payment-cell {
  display: grid;
  gap: 4px;
}

.orders-smart-page .order-amount-cell {
  text-align: right;
}

.orders-smart-page .order-amount-cell strong {
  max-width: none;
}

.orders-smart-page .order-row-open-cell {
  text-align: right;
}

.orders-smart-page .order-row-open-cell button {
  max-width: 100%;
  overflow: hidden;
  min-height: 30px;
  padding: 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-smart-page .orders-smart-table.order-work-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  height: 44px;
  white-space: nowrap;
}

.orders-smart-page .orders-smart-table.order-work-table td {
  border-top: 1px solid #e2e8f0;
  line-height: 1.34;
  min-height: 88px;
  vertical-align: middle;
}

.orders-smart-page .orders-smart-table.order-work-table .order-work-row {
  cursor: pointer;
  height: 88px;
}

.orders-smart-page .orders-smart-table.order-work-table .order-number-link {
  font-size: 14px;
  font-weight: 850;
  padding: 0;
}

.orders-smart-page .orders-smart-table.order-work-table .order-row-client-name {
  color: #111827;
  display: block;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.22;
}

.orders-smart-page .orders-smart-table.order-work-table .order-source-main,
.orders-smart-page .orders-smart-table.order-work-table .order-row-person {
  color: #111827;
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.24;
}

.orders-smart-page .orders-smart-table.order-work-table .order-row-sub {
  color: #64748b;
  display: block;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 4px;
  max-width: 100%;
}

.orders-smart-page .orders-smart-table.order-work-table .order-client-phone {
  color: #94a3b8;
}

.orders-smart-page .orders-smart-table.order-work-table .order-row-date {
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
}

.orders-smart-page .orders-smart-table.order-work-table .order-payment-marker,
.orders-smart-page .orders-smart-table.order-work-table .payment-due-badge,
.orders-smart-page .orders-smart-table.order-work-table .order-workflow-badge,
.orders-smart-page .orders-smart-table.order-work-table .status,
.orders-smart-page .orders-smart-table.order-work-table .channel-pill {
  font-size: 11px;
  line-height: 1.18;
  padding: 4px 7px;
}

.orders-smart-page .order-work-row td {
  box-shadow: none;
}

.orders-smart-page .order-work-row-reserved td:first-child,
.orders-smart-page .order-work-row-completed td:first-child {
  box-shadow: inset 3px 0 0 #198754;
}

.orders-smart-page .order-work-row.has-debt td:first-child {
  box-shadow: inset 3px 0 0 #b54708;
}

.orders-smart-page .order-work-row.is-overdue td:first-child {
  box-shadow: inset 3px 0 0 #d92d20;
}

.orders-smart-page .order-work-row.payment-due-attention td:first-child {
  box-shadow: inset 3px 0 0 #e0a000;
}

.orders-smart-page .order-work-row.needs-action td:first-child {
  box-shadow: inset 3px 0 0 #f97316;
}

@media (max-width: 1180px) {
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(3),
  .orders-smart-page .orders-smart-table.order-work-table td:nth-child(3),
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(7),
  .orders-smart-page .orders-smart-table.order-work-table td:nth-child(7) {
    display: none;
  }

  .orders-smart-page .orders-smart-table.order-work-table th:first-child,
  .orders-smart-page .orders-smart-table.order-work-table td:first-child { width: 12%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(2) { width: 24%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(4) { width: 18%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(5) { width: 15%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(6) { width: 17%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(8) { width: 7%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(9) { width: 7%; }

  .orders-smart-page .order-row-open-cell button {
    padding-left: 6px;
    padding-right: 6px;
  }
}

@media (max-width: 860px) {
  .orders-smart-page .orders-smart-head,
  .orders-smart-page .orders-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .orders-smart-page .orders-smart-actions,
  .orders-smart-page .orders-smart-toolbar {
    justify-content: flex-start;
  }

  .orders-smart-page .orders-smart-count {
    margin-left: 0;
  }

  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(6),
  .orders-smart-page .orders-smart-table.order-work-table td:nth-child(6) {
    display: none;
  }

  .orders-smart-page .orders-smart-table.order-work-table th:first-child,
  .orders-smart-page .orders-smart-table.order-work-table td:first-child { width: 17%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(2) { width: 28%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(4) { width: 21%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(5) { width: 16%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(8) { width: 10%; }
  .orders-smart-page .orders-smart-table.order-work-table th:nth-child(9) { width: 8%; }

  .orders-smart-page .order-row-open-cell button {
    white-space: normal;
  }
}

body.sidebar-collapsed .brand-logo {
  height: 34px;
  width: 34px;
}

body.sidebar-collapsed .sidebar-toggle {
  height: 32px;
  width: 32px;
}

@media (max-width: 900px) {
  body.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  body.sidebar-collapsed .sidebar {
    overflow-y: auto;
    padding: 18px 14px;
  }

  body.sidebar-collapsed .brand {
    justify-content: flex-start;
    margin-bottom: 22px;
  }

  body.sidebar-collapsed .brand span {
    display: inline;
  }

  body.sidebar-collapsed .main-nav {
    display: grid;
  }

  body.sidebar-collapsed .sidebar-toggle {
    display: none;
  }
}

.site-request-preview-delivery {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.site-request-preview-delivery p {
  font-size: 12px;
  margin: 0;
}

.site-request-delivery-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.site-request-preview-section {
  display: grid;
  gap: 8px;
}

.site-request-section-title {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.site-request-section-title strong {
  font-size: 15px;
}

.site-request-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-request-preview-lines {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.site-request-preview-line {
  align-items: center;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 7px;
  padding-right: 34px;
  position: relative;
}

.site-request-preview-line.line-problem {
  background: #fff4f4;
  border-color: #f0a8a8;
}

.site-request-preview-line img,
.site-request-line-photo {
  background: #f3f5f8;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
  height: 42px;
  object-fit: cover;
  width: 42px;
}

.site-request-preview-line strong,
.site-request-preview-line small {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-preview-line small {
  color: var(--muted);
  font-size: 12px;
}

.site-request-external-note {
  color: #b45309;
  display: block;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 3px;
  white-space: normal;
}

.site-request-sku-fix-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  padding: 10px 12px;
}

.site-request-sku-fix-error.soft {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.site-request-preview-actions {
  display: grid;
  gap: 8px;
}

.site-request-preview-actions .site-request-row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.site-request-preview-actions .site-request-row-actions button:first-child,
.site-request-preview-actions .site-request-row-actions button:last-child {
  grid-column: 1 / -1;
}

.site-request-primary-action {
  display: grid;
  gap: 8px;
}

.site-request-primary-action > .primary {
  min-height: 40px;
  width: 100%;
}

.site-request-secondary-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.site-request-process-card {
  background: #fbfcff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.site-request-process-steps {
  display: grid;
  gap: 6px;
}

.site-request-process-step {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5ebf4;
  border-left: 4px solid #cbd5e1;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 48px;
  padding: 8px;
}

.site-request-process-step strong,
.site-request-process-step span {
  display: block;
  min-width: 0;
}

.site-request-process-step strong {
  font-size: 13px;
}

.site-request-process-step span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.site-request-process-step.step-done {
  border-left-color: #16a34a;
}

.site-request-process-step.step-current {
  background: #eff6ff;
  border-color: #bfdbfe;
  border-left-color: #2563eb;
}

.site-request-process-step.step-warning {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #d97706;
}

.site-request-process-step.step-blocked {
  background: #f8fafc;
  color: #64748b;
}

.site-request-preview-details {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.site-request-preview-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.site-request-preview-details[open] summary {
  margin-bottom: 8px;
}

.site-request-work-zone {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.site-request-scheme-work-zone {
  background: #ffffff;
  padding: 0 0 6px;
}

.site-request-work-lock-notice {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.site-request-work-lock-notice strong {
  color: #9a3412;
  font-size: 13px;
  white-space: nowrap;
}

.site-request-work-lock-notice span {
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.site-request-work-locked button:disabled,
.site-request-work-locked input:disabled,
.site-request-work-locked select:disabled,
.site-request-work-locked textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.site-request-work-locked [data-site-request-lock-allowed] {
  opacity: 1;
}

.site-request-lock-disabled-link {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.site-request-detail-hero {
  margin-bottom: 0;
}

.site-request-detail-hero-top {
  grid-template-columns: 170px minmax(150px, 0.75fr) minmax(170px, 1fr) minmax(180px, 0.85fr);
}

.site-request-detail-hero-actions > button,
.site-request-detail-hero-actions .order-print-menu-wrap > button {
  min-height: 38px;
  min-width: 120px;
}

.site-request-work-header {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  box-shadow: none;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 14px 16px;
}

.site-request-work-header h2 {
  font-size: 28px;
  line-height: 1.1;
  margin: 3px 0;
}

.site-request-work-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  overflow-wrap: anywhere;
}

.site-request-work-header > strong {
  color: #175cd3;
  font-size: var(--work-amount-font-size);
  line-height: 1.1;
  white-space: nowrap;
}

.site-request-scheme-header {
  grid-template-columns: auto minmax(160px, 240px) minmax(120px, 180px) auto;
}

.site-request-top-actions {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  box-shadow: none;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1fr) minmax(260px, 1.1fr) minmax(220px, 1fr);
  padding: 10px;
}

.site-request-top-actions > button,
.site-request-top-actions .order-print-menu-wrap > button {
  min-height: 44px;
  width: 100%;
}

.site-request-top-actions .order-print-menu-wrap {
  min-width: 0;
  width: 100%;
}

.site-request-order-number,
.site-request-scheme-header-client {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.site-request-order-number span,
.site-request-scheme-header-client span {
  color: var(--muted);
  font-size: var(--work-label-font-size);
  font-weight: 900;
  text-transform: uppercase;
}

.site-request-order-number strong {
  font-size: var(--work-hero-value-font-size);
  line-height: 1.1;
}

.site-request-order-number small {
  color: var(--muted);
  font-size: var(--work-meta-font-size);
  font-weight: 700;
}

.site-request-scheme-header-client strong {
  font-size: var(--work-hero-value-font-size);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.site-request-work-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  min-width: 0;
}

.site-request-work-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.site-request-work-main,
.site-request-work-guide {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.site-request-work-guide {
  position: sticky;
  top: 12px;
}

.site-request-work-card,
.site-request-work-guide {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  padding: 10px;
}

.site-request-scheme-main {
  gap: 10px;
}

.site-request-status-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.site-request-status-card {
  background: #ffffff !important;
  align-content: center;
  border: 1px solid #dce5f2;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  box-shadow: none;
  display: grid;
  gap: 4px;
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 54px;
  min-width: 0;
  padding: 7px 9px;
}

.site-request-status-card::before {
  align-items: center;
  background-color: #eff6ff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 22px 22px;
  border-radius: 50%;
  content: "";
  display: inline-flex;
  grid-column: 1;
  grid-row: 1 / span 2;
  height: 24px;
  justify-content: center;
  opacity: 0.9;
  width: 24px;
}

.site-request-status-card-main {
  border-left-color: #16a34a;
}

.site-request-status-card-main::before {
  background-color: #dcfce7;
}

.site-request-status-card-method {
  border-left-color: #2563eb;
}

.site-request-status-card-method::before {
  background-color: #dbeafe;
}

.site-request-status-card-finance,
.site-request-status-card-due {
  border-left-color: #f59e0b;
}

.site-request-status-card-finance::before,
.site-request-status-card-due::before {
  background-color: #fef3c7;
}

.site-request-status-card-main::before {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8.5' stroke='%2316A34A' stroke-width='2'/%3E%3Cpath d='M8 12.3l2.5 2.5L16.5 9' stroke='%2316A34A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.site-request-status-card-method::before {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='6.5' width='16' height='11' rx='2' stroke='%232563EB' stroke-width='1.8'/%3E%3Cpath d='M4.5 10h15' stroke='%232563EB' stroke-width='1.8'/%3E%3Cpath d='M8 14h4' stroke='%232563EB' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.site-request-status-card-finance::before {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8.5' stroke='%23F97316' stroke-width='2'/%3E%3Cpath d='M12 7.5V12l3 2' stroke='%23F97316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.site-request-status-card > span {
  color: #667085;
  font-size: var(--work-label-font-size);
  font-weight: 900;
  grid-column: 2;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-request-status-card > div,
.site-request-status-card .site-status-inline-editor,
.site-request-status-card .site-request-system-field {
  grid-column: 2;
  min-width: 0;
  width: 100%;
}

.site-request-status-card .site-request-state-badge,
.site-request-status-card .erp-status-badge,
.site-request-status-card .erp-finance-badge {
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  width: auto;
}

.site-request-finance-status-stack {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.site-request-payment-link-trigger {
  border-color: #d7dee8;
  color: #475569;
  min-height: 26px;
  padding: 4px 8px;
}

.site-request-status-card-due {
  background: #ffffff;
  box-shadow: none;
  color: #334155;
  grid-template-columns: 26px minmax(0, 1fr);
}

.site-request-status-card-due::before {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='5' y='5.5' width='14' height='14' rx='2.5' stroke='%23F97316' stroke-width='1.8'/%3E%3Cpath d='M8 4v3M16 4v3M5.5 9h13' stroke='%23F97316' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='14' r='2.2' stroke='%23F97316' stroke-width='1.5'/%3E%3Cpath d='M12 12.7V14l.9.7' stroke='%23F97316' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
}

.site-request-status-card-due .site-request-payment-due-form {
  background: transparent;
  border: 0;
  grid-column: 2;
  margin: 0;
  padding: 0;
}

.site-request-status-card-due .site-request-payment-due-head {
  align-items: center;
}

.site-request-status-card-due .payment-due-inline-row {
  grid-template-columns: minmax(120px, 1fr) auto auto;
}

.site-request-scheme-grid {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
}

.site-request-scheme-card {
  align-content: start;
  display: grid;
  gap: 8px;
}

.site-request-scheme-card-head {
  align-items: center;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  min-height: 54px;
  padding: 10px;
}

.site-request-scheme-card-head > span,
.site-request-scheme-band > strong {
  font-size: 14px;
  font-weight: 900;
}

.site-request-scheme-card-head-yellow {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #111827;
}

.site-request-scheme-card-head-status {
  border: 1px solid #e2e8f0;
  box-shadow: inset 4px 0 0 currentColor;
}

.site-request-scheme-card-head-status > div {
  min-width: 0;
}

.site-request-scheme-card-head-status .site-status-inline-editor,
.site-request-scheme-card-head-status .site-request-system-field {
  width: 100%;
}

.site-request-scheme-card-head-status .site-status-inline-editor .site-request-state-badge,
.site-request-scheme-card-head-status .site-status-inline-editor .erp-status-badge,
.site-request-scheme-card-head-status .site-status-inline-editor .erp-finance-badge,
.site-request-scheme-card-head-status .site-request-system-field .erp-finance-badge {
  justify-content: center;
  min-height: 34px;
  width: 100%;
}

.status-tone-success,
.status-tone-green,
.status-tone-paid,
.status-tone-paid_out {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #15803d;
}

.status-tone-warning,
.status-tone-orange,
.status-tone-awaiting,
.status-tone-partial {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.status-tone-danger,
.status-tone-red,
.status-tone-unpaid,
.status-tone-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.status-tone-info,
.status-tone-blue,
.status-tone-prom {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.status-tone-violet {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #7c3aed;
}

.status-tone-neutral {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.site-request-scheme-band-yellow {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.site-request-scheme-band {
  align-items: center;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 34px;
  padding: 7px 10px;
}

.site-request-scheme-band-blue {
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #e5eaf2;
  border-radius: 0;
  color: #0f172a;
}

.site-request-scheme-band-action {
  flex-wrap: wrap;
}

.site-request-scheme-band-action span {
  color: rgba(17, 24, 39, 0.7);
  font-size: 12px;
  font-weight: 800;
  margin-left: auto;
}

.site-request-scheme-fields {
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.site-request-scheme-fields > div,
.site-request-scheme-fields > label,
.site-request-scheme-stage-facts > div {
  background: #ffffff;
  border-bottom: 1px solid #e5eaf2;
  display: grid;
  gap: 3px;
  grid-template-columns: 150px minmax(0, 1fr) 28px;
  min-width: 0;
  min-height: 34px;
  padding: 5px 4px;
}

.site-request-scheme-fields > div:last-child,
.site-request-scheme-fields > label:last-child,
.site-request-scheme-stage-facts > div:last-child {
  border-bottom: 0;
}

.site-request-scheme-fields span,
.site-request-scheme-stage-facts span {
  color: var(--muted);
  font-size: var(--work-row-label-font-size);
  font-weight: 800;
}

.site-request-scheme-fields strong,
.site-request-scheme-stage-facts strong {
  font-size: var(--work-row-value-font-size);
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-request-customer-inline-form label,
.site-request-delivery-inline-form label {
  display: contents;
  gap: 5px;
}

.site-request-customer-inline-form {
  overflow: visible;
  position: relative;
  z-index: 3;
}

.site-request-customer-inline-form input,
.site-request-customer-inline-form select,
.site-request-delivery-inline-form input {
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: var(--work-row-value-font-size);
  font-weight: 800;
  min-height: 26px;
  min-width: 0;
  padding: 2px 0;
}

.site-request-customer-inline-form select[data-site-request-customer-business-type] {
  appearance: none;
  background: #ffffff;
  background-image: linear-gradient(45deg, transparent 50%, #2563eb 50%), linear-gradient(135deg, #2563eb 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  min-height: 30px;
  padding: 4px 28px 4px 8px;
  width: 100%;
}

.site-request-customer-inline-form .site-request-customer-results {
  left: 150px;
  margin-top: 0;
  max-height: 236px;
  min-width: 280px;
  position: absolute;
  right: 28px;
  top: calc(100% - 1px);
  z-index: 40;
}

.site-request-customer-inline-actions {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

.site-request-scheme-fields > .site-request-client-comment {
  background: #f8fafc;
}

.site-request-client-comment strong {
  color: #0f172a;
  font-size: var(--work-line-title-font-size);
  line-height: 1.35;
  white-space: pre-wrap;
}

.site-request-scheme-fields > .business-type-missing {
  background: #fff7ed;
  box-shadow: inset 3px 0 0 #f97316;
}

.site-request-scheme-fields > .business-type-missing small,
.delivery-lock-note {
  grid-column: 2 / -1;
}

.site-request-row-icon {
  align-items: center;
  align-self: center;
  background: transparent;
  border: 0;
  color: #64748b;
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  grid-column: 3;
  height: 28px;
  justify-content: center;
  justify-self: end;
  line-height: 1;
  text-decoration: none;
  width: 28px;
}

.site-request-row-icon:hover {
  color: #2563eb;
}

.site-request-row-icon.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.site-request-delivery-ttn-row strong {
  color: #0f172a;
}

.site-request-scheme-fields > .business-type-missing span,
.site-request-scheme-fields > .business-type-missing strong,
.site-request-scheme-fields > .business-type-missing small {
  color: #c2410c;
}

.site-request-inline-warning {
  font-size: 12px;
  line-height: 1.35;
}

.site-request-option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.site-request-option-list-vertical {
  display: grid;
}

.site-request-option-pill {
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
  padding: 6px 9px;
  text-align: left;
}

button.site-request-option-pill {
  cursor: pointer;
}

button.site-request-option-pill:disabled {
  cursor: default;
  opacity: 0.7;
}

.site-request-option-pill.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #175cd3;
}

.site-request-working-lines {
  align-content: start;
  display: grid;
  gap: 0;
}

.site-request-working-summary {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5eaf2;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: flex-start;
  margin-top: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 7px;
}

.site-request-working-summary > div {
  align-items: baseline;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  gap: 4px;
  min-width: auto;
  padding: 0;
}

.site-request-working-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.site-request-working-summary strong {
  font-size: var(--work-row-label-font-size);
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.site-request-working-lines-head {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5eaf2;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 4px;
  grid-template-columns: minmax(170px, 1fr) 48px 56px 66px 92px;
  min-height: 20px;
  padding: 2px 5px;
}

.site-request-working-line {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5eaf2;
  border-radius: 0;
  border-top: 0;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(170px, 1fr) 48px 56px 66px 92px;
  min-width: 0;
  padding: 5px 6px;
}

.site-request-working-line:last-child {
  border-radius: 0;
}

.site-request-working-line.line-problem {
  background: #fff7ed;
  border-color: #fed7aa;
}

.site-request-working-line-product {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: 24px minmax(0, 1fr);
  min-width: 0;
  position: relative;
}

.site-request-working-line-product img,
.site-request-working-line-product .site-request-line-photo {
  border-radius: 5px;
  height: 24px;
  object-fit: cover;
  width: 24px;
}

.site-request-working-line-product strong {
  display: block;
  font-size: 15px;
  line-height: 1.16;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
}

.site-request-working-line-product small {
  color: var(--muted);
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.18;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-request-working-line label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 2px;
}

.site-request-working-line input {
  font-size: 14px;
  min-height: 24px;
  min-width: 0;
  padding: 2px 4px;
}

.site-request-working-line-sum {
  display: grid;
  gap: 2px;
}

.site-request-working-line-sum span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-request-working-line-sum strong {
  font-size: 14px;
}

.site-request-working-line-actions .small {
  font-size: 12px;
  min-height: 25px;
  padding: 3px 7px;
}

.site-request-working-line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: flex-end;
}

.site-request-nomenclature-panel .site-request-scheme-band {
  align-items: center;
  align-self: start;
  background: #fffaf0;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  grid-template-columns: auto auto minmax(120px, 1fr) auto;
  justify-content: flex-start;
  min-height: 28px;
  padding: 3px 6px;
}

.site-request-nomenclature-panel .site-request-scheme-band strong {
  font-size: var(--work-row-value-font-size);
  line-height: 1.1;
}

.site-request-nomenclature-panel .site-request-scheme-band span {
  font-size: 10px;
  line-height: 1.1;
  margin-left: 0;
  white-space: nowrap;
}

.site-request-nomenclature-panel .site-request-scheme-band .primary.small {
  justify-self: end;
  margin-left: 0;
  min-height: 24px;
  padding: 3px 8px;
}

.site-request-nomenclature-panel .site-request-working-lines,
.site-request-nomenclature-panel .site-request-working-summary {
  align-self: start;
}

.site-request-scheme-stage-facts {
  display: grid;
  gap: 0;
}

.site-request-scheme-section {
  align-content: start;
  display: grid;
  gap: 10px;
}

.site-request-commerce-grid {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  min-width: 0;
}

.site-request-recommendation-section {
  align-self: stretch;
}

.site-request-nomenclature-panel {
  align-content: start;
  align-self: start;
}

.site-request-recommendation-section {
  background: #ffffff;
  gap: 4px;
  padding: 5px;
}

.site-request-recommendation-section .site-request-scheme-band {
  align-items: center;
  align-self: start;
  border-radius: 5px;
  display: inline-flex;
  gap: 4px;
  min-height: 22px;
  padding: 2px 5px;
  width: fit-content;
}

.site-request-recommendation-section .site-request-scheme-band strong {
  font-size: 10px;
  line-height: 1.1;
}

.site-request-recommendation-section .site-request-scheme-band span {
  font-size: 10px;
  line-height: 1.1;
  margin-left: auto;
  max-width: 98px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-scheme-actions {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 0;
  padding: 10px;
}

.site-request-customer-history-card {
  display: grid;
  gap: 10px;
}

.site-request-history-active-panel {
  background: #eff6ff;
  border-color: #bfdbfe;
  padding: 0;
}

.site-request-history-active-panel .site-request-history-active-alert {
  border: 0;
  box-shadow: none;
}

.site-request-previous-orders-panel {
  display: grid;
  gap: 10px;
}

.site-request-previous-orders-panel .site-request-section-title > div {
  display: grid;
  gap: 2px;
}

.site-request-previous-orders-table {
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  overflow: hidden;
}

.site-request-previous-orders-head,
.site-request-previous-order-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 0.8fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr) minmax(180px, 1fr) minmax(150px, 0.9fr) minmax(140px, 0.8fr);
  min-width: 0;
}

.site-request-previous-orders-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 8px 10px;
}

.site-request-previous-order-row {
  background: #ffffff;
  border-top: 1px solid #e5eaf2;
  cursor: pointer;
  font-size: 13px;
  padding: 8px 10px;
}

.site-request-previous-order-row:hover {
  background: #f8fbff;
}

.site-request-previous-order-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-bottom-actions {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1fr) minmax(260px, 1.1fr) minmax(220px, 1fr);
  padding: 10px;
}

.site-request-bottom-actions > button,
.site-request-bottom-actions .order-print-menu-wrap > button {
  min-height: 44px;
  width: 100%;
}

.site-request-bottom-actions .order-print-menu-wrap {
  min-width: 0;
  width: 100%;
}

.site-request-customer-history-card .site-request-section-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.site-request-customer-history-card .site-request-section-title > div {
  display: grid;
  gap: 2px;
}

.site-request-customer-history-card .site-request-section-title span:not(.site-request-customer-rating) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-request-customer-rating {
  border: 1px solid #cfd8ff;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 10px;
  white-space: nowrap;
}

.site-request-customer-rating.rating-success {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #15803d;
}

.site-request-customer-rating.rating-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.site-request-customer-rating.rating-warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.site-request-customer-rating.rating-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.site-request-customer-rating.rating-neutral {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.site-request-history-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.site-request-history-summary > div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
}

.site-request-history-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.site-request-history-summary strong {
  font-size: 15px;
}

.site-request-history-active-alert {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08);
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 12px;
}

.site-request-history-active-alert::before {
  align-items: center;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #2563eb;
  content: "i";
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.site-request-history-active-alert > div:first-child {
  display: grid;
  gap: 3px;
  grid-column: 2;
}

.site-request-history-active-alert strong {
  color: #1d4ed8;
  font-size: 15px;
}

.site-request-history-active-alert span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.site-request-history-active-list {
  display: grid;
  gap: 8px;
  grid-column: 2;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.site-request-history-active-list button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 9px 10px;
  text-align: left;
}

.site-request-history-active-list button:hover {
  border-color: #2563eb;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
}

.site-request-history-active-list button span {
  color: #1e293b;
  font-size: 13px;
  font-weight: 900;
}

.site-request-history-active-list button strong {
  color: #0f172a;
  font-size: 15px;
}

.site-request-history-active-list button small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.site-request-active-products {
  border-top: 1px solid #dbeafe;
  display: grid;
  gap: 3px;
  margin-top: 5px;
  padding-top: 6px;
  width: 100%;
}

.site-request-history-active-list button .site-request-active-products span {
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.site-request-history-active-list button .site-request-active-products small {
  color: #2563eb;
}

.site-request-history-active-list button .site-request-active-products.is-pending,
.site-request-history-active-list button .site-request-active-products.is-empty {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.site-request-source-note-card {
  align-items: center;
  background: #fffbeb;
  border-color: #fde68a;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  padding: 12px 14px;
}

.site-request-source-note-card::before {
  align-items: center;
  background-color: #fef3c7;
  background-image: url("data:image/svg+xml,%3Csvg width='26' height='26' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 6.5C5 5.12 6.12 4 7.5 4h9C17.88 4 19 5.12 19 6.5v6.2c0 1.38-1.12 2.5-2.5 2.5h-5.6L7 19v-3.8h.5C6.12 15.2 5 14.08 5 12.7V6.5Z' stroke='%23D97706' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M8.5 8.5h7M8.5 11.2h5' stroke='%23D97706' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 26px 26px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #d97706;
  content: "";
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.site-request-source-note-card > div {
  align-items: center;
  display: flex;
  gap: 10px;
  grid-column: 2;
  justify-content: flex-start;
}

.site-request-source-note-card span {
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.site-request-source-note-card strong {
  color: #78350f;
  font-size: 13px;
}

.site-request-source-note-card p {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  grid-column: 2;
  line-height: 1.35;
  margin: 0;
  white-space: pre-wrap;
}

.site-request-source-note-card small {
  color: #92400e;
  font-weight: 800;
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  white-space: nowrap;
}

.site-request-checkout-comment-card {
  border-left: 4px solid #f59e0b;
}

.site-request-checkout-comment-card p {
  font-size: 14px;
}

.site-request-operational-note-card {
  background: #f0f9ff;
  border-color: #bae6fd;
  border-left: 4px solid #0284c7;
}

.site-request-operational-note-card::before {
  background-color: #e0f2fe;
  background-image: url("data:image/svg+xml,%3Csvg width='26' height='26' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 8h16M7 8V6.5A2.5 2.5 0 0 1 9.5 4h5A2.5 2.5 0 0 1 17 6.5V8M6 8l1.2 10.2A2 2 0 0 0 9.18 20h5.64a2 2 0 0 0 1.98-1.8L18 8' stroke='%230284C7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.5 12h5M10.5 15h3' stroke='%230284C7' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  border-color: #bae6fd;
}

.site-request-operational-note-card span,
.site-request-operational-note-card small {
  color: #0369a1;
}

.site-request-operational-note-card strong {
  color: #075985;
}

.site-request-manager-reason-card {
  align-items: flex-start;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 13px 14px;
}

.site-request-manager-reason-card.reason-danger {
  background: #fff1f2;
  border-color: #fecaca;
  border-left: 4px solid #dc2626;
}

.site-request-manager-reason-card.reason-warning {
  background: #fffbeb;
  border-color: #fde68a;
  border-left: 4px solid #f59e0b;
}

.site-request-manager-reason-icon {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-size: 22px;
  font-weight: 1000;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.site-request-manager-reason-card.reason-danger .site-request-manager-reason-icon {
  background: #fee2e2;
  color: #dc2626;
}

.site-request-manager-reason-card.reason-warning .site-request-manager-reason-icon {
  background: #fef3c7;
  color: #d97706;
}

.site-request-manager-reason-card span {
  display: block;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.site-request-manager-reason-card.reason-danger span,
.site-request-manager-reason-card.reason-danger small {
  color: #991b1b;
}

.site-request-manager-reason-card.reason-warning span,
.site-request-manager-reason-card.reason-warning small {
  color: #92400e;
}

.site-request-manager-reason-card strong {
  color: #0f172a;
  display: block;
  font-size: 16px;
  font-weight: 1000;
  margin-bottom: 4px;
}

.site-request-manager-reason-card p {
  color: #1e293b;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 6px;
  white-space: pre-wrap;
}

.site-request-manager-reason-card small {
  display: block;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.site-request-manager-reason-details {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.site-request-manager-reason-details .warehouse-change-group {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(220, 38, 38, 0.22);
  border-radius: 9px;
  padding: 8px 10px;
}

.site-request-manager-reason-details .warehouse-change-group h4 {
  color: #7f1d1d;
  font-size: 12px;
  margin: 0;
}

.site-request-manager-reason-details .warehouse-change-line {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.site-request-warehouse-return-card {
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.site-request-warehouse-return-card .primary.small {
  min-height: 38px;
  white-space: nowrap;
}

.site-request-return-warehouse-action {
  border-color: #f59e0b;
  color: #92400e;
}

@media (max-width: 900px) {
  .site-request-warehouse-return-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .site-request-warehouse-return-card .primary.small {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.site-request-row-reason {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
  margin-top: 6px;
  padding: 5px 7px;
  white-space: nowrap;
}

.site-request-row-reason.reason-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.site-request-row-reason.reason-warning {
  background: #fef3c7;
  color: #92400e;
}

.site-request-preview-operational-comment {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.site-request-preview-operational-comment span {
  color: #0369a1;
}

.order-work-source-note {
  background: #fffbeb;
  border-color: #fde68a;
}

.order-work-source-note span {
  color: #92400e;
}

.site-request-history-details {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.site-request-history-details summary {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  font-weight: 900;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.site-request-history-details summary span {
  display: grid;
  gap: 2px;
}

.site-request-history-details summary strong {
  color: #0f172a;
  font-size: 15px;
}

.site-request-history-details summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-request-history-details summary b {
  align-items: center;
  background: #2563eb;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 13px;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0 10px;
}

.site-request-history-list {
  background: #f8fafc;
  display: grid;
  gap: 7px;
  padding: 9px;
}

.site-request-history-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto) auto;
  padding: 9px;
}

.site-request-history-row.is-clickable {
  cursor: pointer;
}

.site-request-history-row.is-clickable:hover,
.site-request-history-row.is-clickable:focus {
  border-color: #bfdbfe;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.1);
  outline: none;
}

.site-request-history-chips {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px !important;
  margin-top: 5px;
}

.site-request-history-row .history-chip {
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  max-width: 100%;
  padding: 4px 8px;
  white-space: normal;
}

.history-chip-success {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #15803d;
}

.history-chip-info,
.history-chip-prom {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.history-chip-warning,
.history-chip-prom-pending {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.history-chip-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.history-chip-accent {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
}

.history-chip-muted,
.history-chip-neutral {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.site-request-history-row.history-success {
  border-left-color: #16a34a;
}

.site-request-history-row.history-warning {
  border-left-color: #d99a00;
}

.site-request-history-row.history-danger {
  border-left-color: #dc2626;
}

.site-request-history-row.history-info {
  border-left-color: #2563eb;
}

.site-request-history-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-request-history-row strong,
.site-request-history-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-request-history-row span {
  color: var(--muted);
  font-size: 12px;
}

.site-request-history-empty {
  background: #f8fafc;
  color: var(--muted);
  display: grid;
  gap: 4px;
  padding: 16px;
  text-align: center;
}

.site-request-history-empty strong {
  color: var(--text);
}

.site-request-work-contact-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-request-work-contact-grid > div {
  background: #f8fafc;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}

.site-request-work-contact-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-request-work-contact-grid strong {
  font-size: 15px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-request-work-contact-grid small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.site-request-work-contact-grid > .business-type-missing {
  background: #fef2f2;
  border-color: #fecaca;
}

.site-request-work-contact-grid > .business-type-missing span,
.site-request-work-contact-grid > .business-type-missing strong,
.site-request-work-contact-grid > .business-type-missing small {
  color: #dc2626;
}

.site-request-main-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
}

.site-request-main-actions .primary {
  min-height: 40px;
}

.site-request-work-note p {
  color: #1f2937;
  line-height: 1.45;
  margin: 0;
  white-space: pre-wrap;
}

.customer-business-type-badge.is-missing {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.site-request-customer-edit {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.8fr) minmax(160px, 0.9fr) auto;
  margin-top: 10px;
  padding-top: 10px;
}

.site-request-customer-edit label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
}

.site-request-customer-edit input,
.site-request-customer-edit select {
  min-height: 34px;
  min-width: 0;
}

.site-request-customer-search {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow: visible;
  position: relative;
}

.site-request-customer-results {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  max-height: 220px;
  width: auto;
}

.site-request-customer-results .customer-result {
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px;
}

.site-request-customer-results .customer-result strong {
  font-size: 12px;
}

.site-request-customer-results .customer-result small,
.site-request-customer-results .customer-result-money {
  font-size: 11px;
}

.site-request-status-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-request-catalog-card {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-color: #c7d7fe;
}

.site-request-catalog-hero {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe5ff;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.site-request-catalog-hero h3 {
  font-size: 17px;
  margin: 2px 0 4px;
}

.site-request-catalog-hero p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.site-request-catalog-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #c2410c;
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 10px;
}

.site-request-catalog-warning span {
  color: #9a3412;
  font-size: 12px;
}

.site-request-upsell-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 10px;
  min-width: 0;
}

.site-request-upsell-card {
  align-items: start;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 108px;
  min-width: 0;
  padding: 9px;
  position: relative;
}

.site-request-upsell-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.site-request-upsell-card .product-corner-link {
  left: 34px;
  right: auto;
  top: 6px;
}

.site-request-upsell-body {
  align-self: stretch;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.site-request-upsell-body strong {
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.22;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.site-request-upsell-body small {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-request-upsell-body small {
  color: var(--muted);
  font-size: 11px;
}

.site-request-upsell-card .primary.small {
  grid-column: 2;
  justify-self: start;
}

.site-request-commerce-grid .site-request-upsell-grid {
  gap: 5px;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  margin-top: 3px;
}

.site-request-commerce-grid .site-request-upsell-card {
  align-items: stretch;
  grid-template-columns: 1fr;
  min-height: 124px;
  padding: 5px;
}

.site-request-commerce-grid .site-request-upsell-card .order-recommendation-thumb {
  justify-self: center;
  height: 40px;
  width: 40px;
}

.site-request-commerce-grid .site-request-upsell-card .product-corner-link {
  left: auto;
  right: 6px;
}

.site-request-commerce-grid .site-request-upsell-body {
  gap: 2px;
  justify-items: center;
  text-align: center;
}

.site-request-commerce-grid .site-request-upsell-body strong {
  font-size: 12.5px;
  line-height: 1.14;
  -webkit-line-clamp: 3;
}

.site-request-commerce-grid .site-request-upsell-body small {
  font-size: 10px;
  -webkit-line-clamp: 1;
}

.site-request-commerce-grid .order-recommendation-meta,
.site-request-commerce-grid .order-recommendation-reasons {
  font-size: 10px;
  justify-content: center;
}

.site-request-commerce-grid .site-request-upsell-card .primary.small {
  grid-column: auto;
  justify-self: stretch;
  font-size: 12px;
  min-height: 28px;
  padding: 3px 6px;
  width: 100%;
}

.site-request-work-empty {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-height: 320px;
  place-content: center;
  text-align: center;
}

@media (max-width: 980px) {
  .site-request-work-layout,
  .site-request-work-header,
  .site-request-scheme-header,
  .site-request-scheme-grid,
  .site-request-status-strip {
    grid-template-columns: 1fr;
  }

  .site-request-top-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .site-request-top-action-buttons {
    justify-content: flex-start;
  }

  .site-request-commerce-grid {
    grid-template-columns: 1fr;
  }

  .site-request-commerce-grid .site-request-upsell-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .site-request-work-guide {
    position: static;
  }

  .site-request-status-grid-wide {
    grid-template-columns: 1fr 1fr;
  }

  .site-request-customer-edit {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-request-work-contact-grid,
  .site-request-status-grid-wide,
  .site-request-customer-edit,
  .site-request-catalog-hero,
  .site-request-upsell-card,
  .site-request-history-summary,
  .site-request-history-row,
  .site-request-scheme-card-head,
  .site-request-working-line {
    grid-template-columns: 1fr;
  }

  .site-request-scheme-band-action span {
    margin-left: 0;
  }

  .site-request-working-summary {
    grid-template-columns: 1fr 1fr;
  }

  .site-request-working-lines-head {
    display: none;
  }

  .site-request-work-header h2 {
    font-size: 22px;
  }

  .site-request-work-header > strong {
    font-size: var(--work-amount-font-size);
  }
}

.site-request-manager-work-zone {
  background: #f3f6fb;
  border-radius: 0;
  gap: 14px;
  padding: 0;
}

.site-request-manager-header {
  align-items: center;
  background: transparent;
  border-bottom: 1px solid #dbe4ef;
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 14px 0 18px;
}

.site-request-manager-header .order-back-button {
  background: #ffffff;
  border-color: #d7e0ec;
  min-height: 38px;
  white-space: nowrap;
}

.site-request-manager-header-main {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-width: 0;
}

.site-request-manager-header-main > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-request-manager-header-main strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1.1;
}

.site-request-manager-header-main span,
.site-request-manager-header-main small,
.site-request-manager-header-total small {
  color: #71819a;
  font-size: 12px;
  font-weight: 800;
}

.site-request-manager-header-main b {
  color: #0f172a;
  font-size: 14px;
}

.site-request-manager-header-total {
  display: grid;
  gap: 2px;
  justify-items: end;
  white-space: nowrap;
}

.site-request-manager-header-total strong {
  color: #0f172a;
  font-size: 24px;
}

.site-request-manager-take-card,
.site-request-manager-business-prompt,
.site-request-manager-card,
.site-request-manager-payment-card,
.site-request-manager-actions-card,
.site-request-manager-nomenclature-panel,
.site-request-manager-conversation-card,
.site-request-manager-accordion-card {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  box-shadow: none;
}

.site-request-manager-take-card {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px 22px;
}

.site-request-manager-take-card strong,
.site-request-manager-business-prompt strong {
  color: #111827;
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
}

.site-request-manager-take-card span,
.site-request-manager-business-prompt span {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.site-request-manager-take-card .primary {
  background: #169a53;
  border-color: #169a53;
  font-size: 15px;
  min-height: 46px;
  min-width: 190px;
}

.site-request-manager-business-prompt {
  background: #ffffff;
  border-color: #dbe4ef;
  display: grid;
  gap: 14px;
  padding: 18px 22px;
}

.site-request-manager-business-prompt strong {
  color: #111827;
}

.site-request-manager-business-prompt span {
  color: #667085;
}

.site-request-manager-business-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-request-business-option {
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  color: #344054;
  font-weight: 900;
  min-height: 42px;
  padding: 8px 16px;
}

.site-request-business-option:hover:not(:disabled) {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.site-request-manager-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  min-width: 0;
}

.site-request-manager-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.site-request-manager-sidebar {
  display: grid;
  gap: 12px;
  min-width: 0;
  position: sticky;
  top: 14px;
}

.site-request-manager-info-grid {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.site-request-manager-card,
.site-request-manager-payment-card,
.site-request-manager-actions-card,
.site-request-manager-nomenclature-panel,
.site-request-manager-conversation-card,
.site-request-manager-accordion-card {
  padding: 16px;
}

.site-request-manager-card-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.site-request-manager-card-head.is-compact h3,
.site-request-manager-section-head h3 {
  color: #111827;
  font-size: 18px;
  line-height: 1.2;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.site-request-manager-card-head p {
  color: #7b8aa2;
  font-size: 13px;
  line-height: 1.4;
  margin: 5px 0 0;
}

.site-request-manager-facts,
.site-request-manager-payment-facts {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.site-request-manager-facts > div,
.site-request-manager-payment-facts > div {
  align-items: center;
  border-top: 1px solid #e7edf5;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(86px, 0.36fr) minmax(0, 1fr);
  min-height: 34px;
  min-width: 0;
  padding: 7px 0;
}

.site-request-manager-facts span,
.site-request-manager-payment-facts span {
  color: #8a99ad;
  font-size: 12px;
  font-weight: 900;
}

.site-request-manager-facts strong,
.site-request-manager-payment-facts strong {
  color: #111827;
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-request-manager-business-type {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  box-shadow: inset 3px 0 0 #93c5fd;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(110px, 0.36fr) minmax(0, 1fr);
  margin-top: 10px;
  min-height: 48px;
  padding: 8px 10px;
}

.site-request-manager-business-type-label {
  align-items: start;
  display: grid;
  gap: 3px;
}

.site-request-manager-business-type-label > strong {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.site-request-manager-business-type-label > small {
  background: #ffedd5;
  border-radius: 999px;
  color: #9a3412;
  font-size: 10px;
  font-weight: 900;
  justify-self: start;
  padding: 3px 6px;
}

.site-request-manager-business-type > select {
  appearance: none;
  background-color: #ffffff;
  background-image: linear-gradient(45deg, transparent 50%, #2563eb 50%), linear-gradient(135deg, #2563eb 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #1e293b;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  min-height: 36px;
  min-width: 0;
  padding: 5px 30px 5px 10px;
  width: 100%;
}

.site-request-manager-business-type > select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.site-request-manager-business-type.is-missing {
  background: #fff7ed;
  border-color: #fdba74;
  box-shadow: inset 4px 0 0 #f97316;
}

.site-request-manager-business-type.is-missing .site-request-manager-business-type-label > strong {
  color: #9a3412;
}

.site-request-manager-business-type > select:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.site-request-manager-inline-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.site-request-manager-inline-actions > a,
.site-request-manager-inline-actions > button {
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.site-request-manager-edit-details {
  border-top: 1px solid #e7edf5;
  margin-top: 12px;
  padding-top: 10px;
}

.site-request-manager-edit-details summary {
  color: #375bd2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.site-request-manager-edit-details[open] summary {
  margin-bottom: 10px;
}

.site-request-manager-edit-details .site-request-scheme-fields > div,
.site-request-manager-edit-details .site-request-scheme-fields > label {
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 6px 0;
}

.site-request-manager-edit-details .site-request-customer-inline-form .site-request-customer-results {
  grid-column: 1 / -1;
  left: auto;
  margin: 4px 0 2px;
  max-width: 100%;
  min-width: 0;
  position: static;
  right: auto;
  top: auto;
  width: 100%;
}

.site-request-manager-section-head {
  align-items: center;
  border-bottom: 1px solid #e7edf5;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: -2px -2px 12px;
  min-width: 0;
  padding: 0 0 12px;
}

.site-request-manager-section-head span {
  color: #8a99ad;
  font-size: 13px;
  font-weight: 800;
}

.site-request-manager-section-head .primary {
  min-height: 40px;
  white-space: nowrap;
}

.site-request-manager-work-zone .site-request-working-lines {
  border: 0;
  display: grid;
  gap: 0;
}

.site-request-manager-work-zone .site-request-working-lines-head {
  background: transparent;
  border-bottom: 1px solid #e7edf5;
  color: #8a99ad;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(92px, 0.22fr) minmax(92px, 0.22fr) minmax(92px, 0.22fr) minmax(80px, 0.18fr);
  padding: 0 0 7px;
  text-transform: uppercase;
}

.site-request-manager-work-zone .site-request-working-line {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(92px, 0.22fr) minmax(92px, 0.22fr) minmax(92px, 0.22fr) minmax(80px, 0.18fr);
  min-width: 0;
  padding: 10px 0;
}

.site-request-manager-work-zone .site-request-working-line-product {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-width: 0;
}

.site-request-manager-work-zone .site-request-working-line-product img,
.site-request-manager-work-zone .site-request-line-photo {
  border-radius: 8px;
  height: 34px;
  width: 34px;
}

.site-request-manager-work-zone .site-request-working-line-product strong {
  display: block;
  line-height: 1.25;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.site-request-manager-work-zone .site-request-working-line-product small {
  color: #91a0b6;
  display: -webkit-box;
  font-size: 12px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-request-manager-work-zone .site-request-working-line label {
  color: #8a99ad;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 3px;
  min-width: 0;
}

.site-request-manager-work-zone .site-request-working-line input {
  min-height: 34px;
  min-width: 0;
  text-align: center;
}

.site-request-manager-work-zone .site-request-working-line-sum {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 0;
}

.site-request-manager-work-zone .site-request-working-line-sum span {
  color: #8a99ad;
  font-size: 11px;
  font-weight: 900;
}

.site-request-manager-work-zone .site-request-working-line-actions {
  display: flex;
  gap: 5px;
  justify-content: end;
  min-width: 0;
}

.site-request-manager-work-zone .site-request-working-line-actions .ghost.small {
  min-height: 30px;
  padding: 4px 7px;
}

.site-request-manager-work-zone .site-request-working-summary-bottom {
  background: #f8fafc;
  border: 0;
  border-radius: 0 0 12px 12px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 0 -16px -16px;
  padding: 12px 16px;
}

.site-request-manager-conversation-card {
  display: grid;
  gap: 16px;
}

.site-request-conversation-profile {
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  color: #375bd2;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  white-space: nowrap;
}

.site-request-conversation-group {
  display: grid;
  gap: 8px;
}

.site-request-conversation-group > span {
  color: #8a99ad;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-request-conversation-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-request-conversation-chip,
.site-request-conversation-history-item {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  color: #475569;
  display: inline-flex;
  font-weight: 900;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
}

.site-request-conversation-chip.is-known,
.site-request-conversation-history-item.is-known {
  background: #f8fafc;
  color: #94a3b8;
}

.site-request-conversation-chip.is-gap,
.site-request-conversation-history-item.is-gap {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.site-request-conversation-chip:hover,
.site-request-conversation-history-item:hover {
  border-color: #375bd2;
}

.site-request-conversation-legend {
  color: #91a0b6;
  font-size: 12px;
  font-weight: 800;
}

.site-request-conversation-history-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.site-request-conversation-history-item {
  align-items: start;
  display: grid;
  justify-items: start;
  text-align: left;
}

.site-request-conversation-history-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.site-request-conversation-history-item span {
  font-size: 12px;
}

.site-request-manager-accordion-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.site-request-manager-details {
  border-bottom: 1px solid #edf1f6;
}

.site-request-manager-details:last-child {
  border-bottom: 0;
}

.site-request-manager-details summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
}

.site-request-manager-details summary span {
  color: #111827;
  font-weight: 900;
}

.site-request-manager-details summary small {
  color: #9aa8bb;
  font-weight: 800;
  text-align: right;
}

.site-request-manager-details-body {
  background: #fbfdff;
  border-top: 1px solid #edf1f6;
  padding: 14px;
}

.site-request-manager-details-body > .site-request-work-card {
  border: 0;
  box-shadow: none;
  padding: 0;
}

.site-request-manager-work-zone .site-request-previous-orders-head,
.site-request-manager-work-zone .site-request-previous-order-row {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}

.site-request-manager-work-zone .site-request-previous-order-row .history-chip {
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.site-request-manager-danger-zone {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: 14px 0 4px;
}

.site-request-manager-danger-action {
  align-content: start;
  background: #ffffff;
  border: 1px solid #e5eaf2;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  justify-items: start;
  min-width: 0;
  padding: 10px 12px;
}

.site-request-manager-danger-action span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.site-request-manager-danger-action .link-button,
.site-request-manager-danger-action .ghost {
  min-height: 30px;
  padding-left: 0;
}

.site-request-manager-danger-action.is-delete {
  border-color: #fecaca;
}

.site-request-manager-danger-action.is-delete span {
  color: #991b1b;
}

.site-request-manager-payment-facts .site-request-system-field,
.site-request-manager-payment-facts .site-status-inline-editor,
.site-request-manager-payment-facts .manager-status-inline-editor {
  justify-self: stretch;
  min-width: 0;
  width: 100%;
}

.site-request-manager-payment-card .site-request-payment-link-trigger {
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}

.site-request-manager-actions-card {
  display: grid;
  gap: 10px;
}

.site-request-manager-primary-action {
  background: #16a34a;
  border-color: #16a34a;
  font-size: 15px;
  min-height: 48px;
  width: 100%;
}

.site-request-manager-actions-card .order-action-button,
.site-request-manager-actions-card .order-print-menu-wrap > button,
.site-request-manager-actions-card .site-request-manager-reminder-action button {
  justify-content: center;
  min-height: 42px;
  width: 100%;
}

.site-request-manager-actions-card .order-print-menu-wrap,
.site-request-manager-actions-card .site-request-manager-reminder-action,
.site-request-manager-actions-card .site-request-payment-due-form {
  min-width: 0;
  width: 100%;
}

.site-request-manager-actions-card .site-request-payment-due-form {
  border: 0;
  margin: 0;
  padding: 0;
}

@media (max-width: 1180px) {
  .site-request-manager-layout {
    grid-template-columns: 1fr;
  }

  .site-request-manager-sidebar {
    position: static;
  }
}

@media (max-width: 980px) {
  .site-request-manager-header,
  .site-request-manager-take-card {
    grid-template-columns: 1fr;
  }

  .site-request-manager-header-total {
    justify-items: start;
  }

  .site-request-manager-info-grid {
    grid-template-columns: 1fr;
  }

  .site-request-manager-work-zone .site-request-working-lines-head {
    display: none;
  }

  .site-request-manager-work-zone .site-request-working-line {
    grid-template-columns: minmax(0, 1fr) minmax(96px, auto) minmax(96px, auto);
  }

  .site-request-manager-work-zone .site-request-working-line-product,
  .site-request-manager-work-zone .site-request-working-line-sum {
    grid-column: 1 / -1;
  }

  .site-request-manager-work-zone .site-request-working-line-sum {
    justify-items: start;
  }

  .site-request-manager-work-zone .site-request-working-line-actions {
    grid-column: 1 / -1;
    justify-content: start;
  }
}

@media (max-width: 768px) {
  .site-request-manager-header-main,
  .site-request-manager-business-options,
  .site-request-conversation-group > div {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-request-manager-section-head {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-request-manager-section-head .primary,
  .site-request-business-option {
    width: 100%;
  }

  .site-request-manager-work-zone .site-request-working-line {
    grid-template-columns: 1fr;
  }

  .site-request-manager-inline-actions {
    grid-template-columns: 1fr;
  }
}

/* Mockup alignment for the manager work screen: lighter, denser, quicker to scan. */
.site-request-manager-work-zone {
  background: #f1f5f9;
  gap: 14px;
}

.site-request-manager-header {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 20px;
}

.site-request-manager-header .order-back-button {
  border-color: #e2e8f0;
  border-radius: 9px;
  min-height: 36px;
  padding: 7px 12px;
}

.site-request-manager-header-main {
  gap: 16px;
}

.site-request-manager-header-main strong {
  font-size: 19px;
}

.site-request-manager-header-main span,
.site-request-manager-header-main small,
.site-request-manager-header-total small {
  color: #94a3b8;
  font-weight: 700;
}

.site-request-manager-header-main b {
  font-size: 13px;
}

.site-request-manager-header-total strong {
  font-size: 22px;
}

.site-request-manager-take-card,
.site-request-manager-business-prompt,
.site-request-manager-card,
.site-request-manager-payment-card,
.site-request-manager-actions-card,
.site-request-manager-nomenclature-panel,
.site-request-manager-conversation-card,
.site-request-manager-accordion-card {
  border-color: #e2e8f0;
}

.site-request-manager-card,
.site-request-manager-payment-card,
.site-request-manager-actions-card,
.site-request-manager-conversation-card {
  padding: 14px 16px;
}

.site-request-manager-take-card {
  padding: 18px 20px;
}

.site-request-manager-business-prompt {
  padding: 16px 20px;
}

.site-request-business-option {
  border-color: #fdba74;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 15px;
}

.site-request-manager-layout {
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 340px);
}

.site-request-manager-main,
.site-request-manager-sidebar {
  gap: 14px;
}

.site-request-manager-info-grid {
  gap: 14px;
}

.site-request-manager-card-head {
  align-items: center;
}

.site-request-manager-card-head .eyebrow,
.site-request-manager-actions-card > .eyebrow {
  color: #94a3b8;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-request-manager-card-head.is-compact h3,
.site-request-manager-section-head h3 {
  font-size: 16px;
}

.site-request-manager-facts,
.site-request-manager-payment-facts {
  margin-top: 10px;
}

.site-request-manager-facts > div,
.site-request-manager-payment-facts > div {
  border-top: 0;
  display: flex;
  gap: 10px;
  min-height: 30px;
  padding: 5px 0;
}

.site-request-manager-facts span,
.site-request-manager-payment-facts span {
  color: #94a3b8;
  flex: 0 0 92px;
  font-size: 13px;
  font-weight: 600;
}

.site-request-manager-payment-facts span {
  flex-basis: 122px;
}

.site-request-manager-facts strong,
.site-request-manager-payment-facts strong {
  font-size: 14px;
  font-weight: 600;
}

.site-request-manager-inline-actions {
  display: flex;
  gap: 7px;
}

.site-request-manager-inline-actions > a,
.site-request-manager-inline-actions > button {
  border-radius: 9px;
  flex: 1 1 0;
  font-size: 13px;
  min-height: 36px;
  padding: 7px 10px;
}

.site-request-manager-edit-details {
  border-top-color: #f1f5f9;
  padding-top: 9px;
}

.site-request-manager-edit-details summary {
  color: #4f46e5;
  font-weight: 600;
}

.site-request-manager-section-head {
  border-bottom-color: #f1f5f9;
  margin: -14px -16px 0;
  padding: 13px 16px;
}

.site-request-manager-section-head span {
  color: #94a3b8;
  font-weight: 600;
}

.site-request-manager-section-head .primary {
  background: #eef2ff;
  border-color: #4f46e5;
  border-radius: 9px;
  color: #4338ca;
  font-size: 13px;
  font-weight: 600;
  min-height: 34px;
  padding: 7px 14px;
}

.site-request-manager-work-zone .site-request-working-lines-head {
  display: grid;
}

.site-request-manager-work-zone .site-request-working-line {
  gap: 10px;
  grid-template-columns: minmax(240px, 1fr) minmax(78px, auto) minmax(78px, auto) minmax(88px, auto) auto;
  padding: 10px 16px;
}

.site-request-manager-work-zone .site-request-working-line-product {
  gap: 10px;
}

.site-request-manager-work-zone .site-request-working-line-product strong {
  font-size: 14px;
  font-weight: 600;
}

.site-request-manager-work-zone .site-request-working-line label {
  font-size: 11px;
  font-weight: 600;
}

.site-request-manager-work-zone .site-request-working-line input {
  border-radius: 8px;
  min-height: 30px;
}

.site-request-manager-work-zone .site-request-line-price-area {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.site-request-manager-work-zone .site-request-line-discount-field {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(62px, 1fr);
}

.site-request-manager-work-zone .site-request-line-discount-field span {
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
}

.site-request-manager-work-zone .site-request-line-discount-field input {
  min-height: 28px;
}

.site-request-manager-work-zone .site-request-working-line-sum strong {
  font-size: 14px;
}

.site-request-manager-work-zone .site-request-working-line-actions .ghost.small {
  min-height: 30px;
}

.site-request-manager-work-zone .site-request-working-summary-bottom {
  border-top: 1px solid #f1f5f9;
  margin: 0;
  padding: 11px 16px;
}

.site-request-manager-conversation-card {
  gap: 14px;
}

.site-request-conversation-profile {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.site-request-conversation-chip,
.site-request-conversation-history-item {
  border-color: #e2e8f0;
  border-radius: 9px;
  font-weight: 600;
  min-height: 34px;
  padding: 7px 13px;
}

.site-request-conversation-chip.is-known,
.site-request-conversation-history-item.is-known {
  background: #ffffff;
  color: #94a3b8;
}

.site-request-conversation-chip.is-gap,
.site-request-conversation-history-item.is-gap {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.site-request-manager-details summary {
  min-height: 46px;
}

.site-request-manager-details summary span {
  font-weight: 600;
}

.site-request-manager-details summary small {
  color: #94a3b8;
  font-weight: 500;
}

.site-request-manager-payment-card .site-request-payment-link-trigger,
.site-request-manager-primary-action,
.site-request-manager-actions-card .order-action-button,
.site-request-manager-actions-card .order-print-menu-wrap > button,
.site-request-manager-actions-card .site-request-manager-reminder-action button {
  border-radius: 10px;
}

.site-request-manager-primary-action {
  min-height: 46px;
}

.site-request-manager-actions-card {
  gap: 8px;
}

.site-request-manager-actions-card .order-action-button,
.site-request-manager-actions-card .order-print-menu-wrap > button,
.site-request-manager-actions-card .site-request-manager-reminder-action button {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: none;
  color: #475569;
  font-weight: 600;
  min-height: 40px;
}

.site-request-manager-actions-card .order-action-button:hover,
.site-request-manager-actions-card .order-print-menu-wrap > button:hover,
.site-request-manager-actions-card .site-request-manager-reminder-action button:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.site-request-manager-actions-card .order-action-icon {
  color: #64748b;
  opacity: 0.72;
}

.site-request-manager-actions-card .site-request-manager-reminder-action {
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
}

.site-request-manager-payment-card {
  align-content: start;
}

.site-request-manager-payment-facts > div {
  border-top: 1px solid #f1f5f9;
}

.site-request-manager-payment-facts > div:first-child {
  border-top: 0;
}

.site-request-manager-payment-facts > div:has(.site-request-system-field),
.site-request-manager-payment-facts > div:has(.site-status-inline-select),
.site-request-manager-payment-facts > div:has(.site-status-inline-editor),
.site-request-manager-payment-facts > div:has(.manager-status-inline-editor) {
  align-items: stretch;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
  padding: 8px 0;
}

.site-request-manager-payment-facts > div:has(.site-request-system-field) > span,
.site-request-manager-payment-facts > div:has(.site-status-inline-select) > span,
.site-request-manager-payment-facts > div:has(.site-status-inline-editor) > span,
.site-request-manager-payment-facts > div:has(.manager-status-inline-editor) > span {
  flex-basis: auto;
}

.site-request-manager-payment-facts .site-status-inline-select {
  border-radius: 9px;
  font-size: 13px;
  min-height: 34px;
}

.site-request-manager-plain-select {
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: 9px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
  min-height: 34px;
  min-width: 0;
  padding: 6px 30px 6px 10px;
  width: 100%;
}

.site-request-manager-plain-select:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.site-request-manager-payment-facts .site-request-system-field,
.site-request-manager-payment-facts .site-status-inline-editor,
.site-request-manager-payment-facts .manager-status-inline-editor {
  justify-self: stretch;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.site-request-manager-payment-facts .site-request-system-field .erp-finance-badge,
.site-request-manager-payment-facts .site-status-inline-editor .site-request-state-badge,
.site-request-manager-payment-facts .site-status-inline-editor .erp-status-badge,
.site-request-manager-payment-facts .site-status-inline-editor .erp-finance-badge,
.site-request-manager-payment-facts .manager-status-inline-editor .site-request-state-badge,
.site-request-manager-payment-facts .manager-status-inline-editor .erp-status-badge {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-request-manager-payment-facts .manager-status-inline-editor .erp-status-badge {
  background: #ffffff;
  border-color: #d7dee8;
  border-radius: 9px;
  color: #344054;
}

.site-request-manager-payment-card .site-request-payment-link-trigger {
  background: #f8fafc;
  border-color: #d7dee8;
  color: #475569;
  font-weight: 600;
}

.site-request-amount-comparison {
  color: #64748b;
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 3px;
  white-space: normal;
}

.site-request-amount-comparison.is-warning {
  color: #b45309;
}

.site-request-manager-header-total .site-request-amount-comparison,
.order-preview-total .site-request-amount-comparison {
  max-width: 280px;
  text-align: right;
}

.site-request-channel-payment-status,
.site-request-erp-payment-status {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.site-request-channel-payment-status small,
.site-request-erp-payment-status small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.site-request-erp-payment-status > strong {
  font-size: 13px;
}

.site-request-erp-payment-status.finance-paid > strong {
  color: #15803d;
}

.site-request-erp-payment-status.finance-partial > strong {
  color: #b45309;
}

.site-request-erp-payment-status.finance-unpaid > strong {
  color: #475569;
}

.site-request-amount-warning {
  align-items: start !important;
}

.site-request-payment-truth-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  padding: 12px;
}

.site-request-payment-truth-summary > div,
.site-request-payment-supporting {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.site-request-payment-truth-summary > div > span,
.site-request-payment-supporting > strong {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.site-request-payment-supporting {
  border-top: 1px solid #e2e8f0;
  margin-top: 14px;
  padding-top: 12px;
}

@media (max-width: 1180px) {
  .site-request-manager-layout {
    grid-template-columns: 1fr;
  }

  .site-request-manager-sidebar {
    position: static;
  }

  .site-request-manager-payment-card,
  .site-request-manager-actions-card {
    max-width: none;
  }

  .site-request-payment-truth-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .site-request-manager-header,
  .site-request-manager-take-card {
    grid-template-columns: 1fr;
  }

  .site-request-manager-info-grid {
    grid-template-columns: 1fr;
  }

  .site-request-manager-work-zone .site-request-working-line {
    grid-template-columns: minmax(0, 1fr) minmax(96px, auto) minmax(96px, auto);
  }

  .site-request-manager-work-zone .site-request-working-line-product,
  .site-request-manager-work-zone .site-request-working-line-sum,
  .site-request-manager-work-zone .site-request-working-line-actions {
    grid-column: 1 / -1;
  }

  .site-request-manager-work-zone .site-request-working-line-sum {
    justify-items: start;
  }

  .site-request-manager-work-zone .site-request-working-line-actions {
    justify-content: start;
  }
}

@media (max-width: 768px) {
  .site-request-manager-header-main,
  .site-request-manager-business-options,
  .site-request-conversation-group > div,
  .site-request-manager-section-head {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-request-manager-section-head .primary,
  .site-request-business-option {
    width: 100%;
  }

  .site-request-manager-work-zone .site-request-working-line,
  .site-request-manager-inline-actions {
    grid-template-columns: 1fr;
  }

  .site-request-manager-work-zone .site-request-working-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-request-manager-work-zone .site-request-working-line-product {
    grid-column: 1 / -1;
  }

  .site-request-manager-work-zone .site-request-working-line-sum {
    grid-column: auto;
    justify-items: start;
  }

  .site-request-manager-work-zone .site-request-working-line-actions {
    align-self: end;
    grid-column: auto;
    justify-content: end;
  }

  .site-request-manager-inline-actions {
    display: grid;
  }

  .site-request-manager-facts > div,
  .site-request-manager-payment-facts > div {
    align-items: flex-start;
    display: grid;
    grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
  }

  .site-request-manager-facts span,
  .site-request-manager-payment-facts span {
    flex-basis: auto;
  }

  .site-request-manager-work-zone .site-request-working-line {
    gap: 8px;
    grid-template-columns: minmax(180px, 1fr) minmax(76px, 86px) minmax(76px, 86px) minmax(82px, auto) auto;
    padding: 8px 14px;
  }

  .site-request-manager-work-zone .site-request-working-line-product,
  .site-request-manager-work-zone .site-request-working-line-sum,
  .site-request-manager-work-zone .site-request-working-line-actions {
    grid-column: auto;
  }

  .site-request-manager-work-zone .site-request-working-line label {
    gap: 2px;
  }

  .site-request-manager-work-zone .site-request-working-line input {
    min-height: 28px;
  }

  .site-request-manager-work-zone .site-request-working-line-actions {
    align-self: center;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
  }

  .site-request-manager-work-zone .site-request-working-line-actions .ghost.small {
    min-height: 28px;
    padding: 3px 7px;
  }
}

@media (max-width: 640px) {
  .site-request-manager-work-zone .site-request-working-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-request-manager-work-zone .site-request-working-line-product {
    grid-column: 1 / -1;
  }

  .site-request-manager-work-zone .site-request-working-line-sum {
    grid-column: auto;
    justify-items: start;
  }

  .site-request-manager-work-zone .site-request-working-line-actions {
    align-self: end;
    grid-column: auto;
    justify-content: end;
  }
}

@media (max-width: 1120px) {
  .site-request-manager-work-zone .site-request-working-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-request-manager-work-zone .site-request-working-line-product,
  .site-request-manager-work-zone .site-request-working-line-sum,
  .site-request-manager-work-zone .site-request-working-line-actions {
    grid-column: 1 / -1;
  }

  .site-request-manager-work-zone .site-request-working-line-sum {
    justify-items: start;
  }

  .site-request-manager-work-zone .site-request-working-line-actions {
    align-self: start;
    flex-direction: row;
    justify-content: start;
  }
}

@media (max-width: 768px) {
  .site-request-manager-business-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-request-manager-nomenclature-panel .site-request-manager-section-head .primary {
    justify-self: start;
    width: auto;
  }
}

/* Site request work screen v3: compact context, honest money and one primary action. */
.site-request-workbar {
  grid-template-columns: auto minmax(260px, 1fr) auto auto;
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-request-workbar-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.site-request-workbar-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.site-request-workbar-title > strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1.15;
}

.site-request-workbar-identity > small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.site-request-age-badge {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 7px;
}

.site-request-workbar-tools {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}

.site-request-workbar-tools .order-action-button,
.site-request-workbar-tools .order-print-menu-wrap > button {
  background: #ffffff;
  border-color: #dbe4ef;
  border-radius: 8px;
  min-height: 36px;
  padding: 6px 9px;
}

.site-request-workbar-tools .order-action-button:hover,
.site-request-workbar-tools .order-print-menu-wrap > button:hover {
  background: #f8fafc;
  border-color: #bac7d8;
}

.site-request-work-menu {
  position: relative;
}

.site-request-work-menu > summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
  display: flex;
  font-size: 20px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  list-style: none;
  width: 38px;
}

.site-request-work-menu > summary::-webkit-details-marker {
  display: none;
}

.site-request-work-menu-popover {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 3px;
  min-width: 250px;
  padding: 7px;
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 45;
}

.site-request-work-menu-popover > button,
.site-request-work-menu-popover > a {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: flex-start;
  min-height: 36px;
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.site-request-work-menu-popover > button:hover,
.site-request-work-menu-popover > a:hover {
  background: #f1f5f9;
}

.site-request-work-menu-popover > .danger-link {
  color: #b91c1c;
}

.site-request-work-menu-separator {
  border-top: 1px solid #e2e8f0;
  margin: 4px 2px;
}

.site-request-work-progress {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
}

.site-request-work-progress-step {
  align-items: center;
  border-right: 1px solid #e5ebf3;
  display: grid;
  gap: 8px;
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 58px;
  min-width: 0;
  padding: 8px 10px;
}

.site-request-work-progress-step:last-child {
  border-right: 0;
}

.site-request-work-progress-step > span {
  align-items: center;
  background: #eef2f7;
  border-radius: 50%;
  color: #64748b;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.site-request-work-progress-step > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-request-work-progress-step strong,
.site-request-work-progress-step small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-work-progress-step strong {
  color: #334155;
  font-size: 12px;
}

.site-request-work-progress-step small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
}

.site-request-work-progress-step.is-done > span {
  background: #dcfce7;
  color: #15803d;
}

.site-request-work-progress-step.is-current {
  background: #eef4ff;
}

.site-request-work-progress-step.is-current > span {
  background: #2563eb;
  color: #ffffff;
}

.site-request-work-progress-step.is-warning {
  background: #fff7ed;
}

.site-request-work-progress-step.is-warning > span {
  background: #ffedd5;
  color: #c2410c;
}

.site-request-manager-sidebar {
  top: 92px;
}

.site-request-manager-card-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.site-request-customer-lifetime {
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 700;
  gap: 5px 12px;
  margin-top: 8px;
}

.site-request-manager-edit-details summary {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  list-style: none;
}

.site-request-manager-edit-details summary::-webkit-details-marker {
  display: none;
}

.site-request-manager-edit-details summary .order-action-icon {
  height: 18px;
  width: 18px;
}

.site-request-manager-edit-details summary .order-action-icon svg {
  height: 15px;
  width: 15px;
}

.site-request-address-fact {
  flex-wrap: wrap;
}

.site-request-address-fact .link-button {
  color: #2563eb;
  flex: 0 0 auto;
  font-size: 11px;
  min-height: 26px;
  padding: 3px 5px;
}

.site-request-manager-work-zone .site-request-working-lines-head {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 1fr) minmax(116px, auto) minmax(82px, auto) minmax(112px, auto) auto;
  padding: 8px 14px;
}

.site-request-manager-work-zone .site-request-working-lines-head span:not(:first-child) {
  text-align: right;
}

.site-request-reference-strip {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.site-request-reference-actions {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  min-width: 0;
  overflow: hidden;
}

.site-request-reference-button {
  align-content: center;
  background: #ffffff;
  border: 0;
  border-right: 1px solid #e5ebf3;
  border-radius: 0;
  cursor: pointer;
  display: grid;
  gap: 3px;
  justify-items: start;
  min-height: 54px;
  min-width: 0;
  padding: 9px 12px;
  text-align: left;
}

.site-request-reference-button:last-child {
  border-right: 0;
}

.site-request-reference-button:hover,
.site-request-reference-button.is-active {
  background: #f1f5f9;
}

.site-request-reference-button.is-active {
  box-shadow: inset 0 -3px #2563eb;
}

.site-request-reference-button.has-attention {
  background: #fff8e8;
  box-shadow: inset 4px 0 #f59e0b;
}

.site-request-reference-button.has-attention:hover,
.site-request-reference-button.has-attention.is-active {
  background: #fff3d6;
}

.site-request-reference-button.has-attention.is-active {
  box-shadow: inset 4px 0 #f59e0b, inset 0 -3px #f59e0b;
}

.site-request-reference-title {
  align-items: center;
  display: flex;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.site-request-reference-badge {
  background: #f59e0b;
  border-radius: 999px;
  color: #ffffff;
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 6px;
}

.site-request-reference-button.has-attention > small {
  color: #a15c05;
}

.site-request-reference-button strong,
.site-request-reference-button small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-reference-button strong {
  color: #1e293b;
  font-size: 12px;
}

.site-request-reference-button small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
}

.site-request-reference-panel {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  min-width: 0;
  padding: 14px;
}

.site-request-reference-panel > .site-request-work-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.site-request-manager-action-heading {
  display: grid;
  gap: 3px;
}

.site-request-manager-action-heading > strong {
  color: #334155;
  font-size: 13px;
}

.site-request-work-locked [data-site-request-locked-control="true"] {
  cursor: not-allowed;
}

@media (max-width: 1180px) {
  .site-request-workbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .site-request-workbar-tools {
    grid-column: 2 / -1;
  }

  .site-request-work-progress {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-request-work-progress-step:nth-child(3) {
    border-right: 0;
  }

  .site-request-work-progress-step:nth-child(-n + 3) {
    border-bottom: 1px solid #e5ebf3;
  }

  .site-request-manager-sidebar {
    position: static;
  }

  .site-request-manager-work-zone .site-request-working-lines-head {
    display: none;
  }
}

@media (max-width: 768px) {
  .site-request-workbar {
    align-items: start;
    grid-template-columns: 1fr;
    position: relative;
  }

  .site-request-workbar .order-back-button {
    justify-self: start;
  }

  .site-request-workbar-total {
    justify-items: start;
  }

  .site-request-workbar-total .site-request-amount-comparison {
    text-align: left;
  }

  .site-request-workbar-tools {
    flex-wrap: wrap;
    grid-column: auto;
    justify-content: flex-start;
  }

  .site-request-work-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-request-work-progress-step,
  .site-request-work-progress-step:nth-child(3) {
    border-bottom: 1px solid #e5ebf3;
    border-right: 1px solid #e5ebf3;
  }

  .site-request-work-progress-step:nth-child(2n) {
    border-right: 0;
  }

  .site-request-work-progress-step:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .site-request-reference-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-request-reference-button {
    border-bottom: 1px solid #e5ebf3;
  }

  .site-request-work-menu-popover {
    left: auto;
    max-width: calc(100vw - 42px);
    right: 0;
    width: 250px;
  }
}

@media (max-width: 480px) {
  .site-request-manager-business-type {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .site-request-work-progress {
    grid-template-columns: 1fr;
  }

  .site-request-work-progress-step,
  .site-request-work-progress-step:nth-child(2n),
  .site-request-work-progress-step:nth-last-child(-n + 2) {
    border-bottom: 1px solid #e5ebf3;
    border-right: 0;
  }

  .site-request-work-progress-step:last-child {
    border-bottom: 0;
  }

  .site-request-reference-actions {
    grid-template-columns: 1fr;
  }

  .site-request-reference-button {
    border-right: 0;
  }

  .site-request-source-note-card {
    align-items: start;
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .site-request-source-note-card > div {
    flex-wrap: wrap;
  }

  .site-request-source-note-card small {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

.site-requests-history-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.05);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.site-requests-history-card .site-request-filters {
  border-top: 0;
  grid-template-columns: minmax(150px, 0.8fr) minmax(170px, 0.9fr) auto auto;
  padding-top: 0;
}

.store-integration-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.store-integration-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
}

.integration-overview,
.integration-log-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.integration-overview-main {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.integration-overview-main h2 {
  margin: 0 0 4px;
}

.integration-overview-main p {
  color: var(--muted);
  margin: 0;
}

.integration-technical-panel {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.integration-technical-panel textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  min-height: 180px;
  resize: vertical;
}

.integration-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 14px;
}

.integration-grid-wide {
  grid-template-columns: minmax(0, 1fr);
}

.integration-section-title {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin: 4px 0 10px;
}

.integration-section-title h2 {
  margin: 0 0 3px;
}

.integration-section-title p {
  color: var(--muted);
  margin: 0;
}

.integration-workspace-page {
  display: grid;
  gap: 12px;
}

.integration-overview {
  border-color: #d9e4f5;
  padding: 14px 16px;
}

.integration-overview-main {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.integration-overview-main h2 {
  font-size: 24px;
  margin: 0 0 3px;
}

.integration-overview-main p {
  color: var(--muted);
  margin: 0;
}

.integration-command-center {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.34fr);
  padding: 12px;
}

.integration-workspace-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration-workspace-filters button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
}

.integration-workspace-filters button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.integration-workspace-filters button.attention:not(.active) {
  border-color: #fecaca;
  color: #b42318;
}

.integration-workspace-filters strong {
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  font-size: 12px;
  min-width: 24px;
  padding: 3px 7px;
  text-align: center;
}

.integration-workspace-filters button.active strong {
  background: rgba(255, 255, 255, 0.22);
}

.integration-workspace-search {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 42px;
  padding: 6px 10px;
}

.integration-workspace-search span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.integration-workspace-search input {
  border: 0;
  box-shadow: none;
  min-height: 28px;
  padding: 0;
}

.integration-workspace-search button {
  white-space: nowrap;
}

.integration-workspace-search-actions {
  align-items: center;
  display: flex !important;
  gap: 8px;
  justify-content: flex-end;
  min-width: max-content;
  text-transform: none !important;
}

.integration-workspace-search-actions button {
  min-height: 30px;
  padding: 6px 10px;
}

.integration-workspace-search-actions .link-button {
  color: var(--warn);
  min-height: auto;
  padding: 0;
}

.integration-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
}

.integration-kpi-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 13px 14px;
}

.integration-kpi-card .integration-kpi-icon {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.integration-kpi-card.blue .integration-kpi-icon {
  background: #eff6ff;
  color: var(--primary);
}

.integration-kpi-card.orange .integration-kpi-icon {
  background: #fff7ed;
  color: #ea580c;
}

.integration-kpi-card.red .integration-kpi-icon {
  background: #fff1f2;
  color: #dc2626;
}

.integration-kpi-card.green .integration-kpi-icon {
  background: #ecfdf5;
  color: #059669;
}

.integration-kpi-card span:not(.integration-kpi-icon) {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.integration-kpi-card strong {
  color: var(--text);
  display: block;
  font-size: 22px;
  line-height: 1.1;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-kpi-card.wide strong {
  font-size: 17px;
}

.integration-workspace-shell {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr) minmax(260px, 310px);
}

.integration-channel-list {
  background: var(--panel);
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 96px);
  overflow: auto;
}

.integration-channel-list-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0 2px 4px;
}

.integration-channel-list-head strong {
  background: #eef6ff;
  border-radius: 999px;
  color: var(--primary);
  padding: 4px 9px;
}

.integration-channel-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 10px;
  text-align: left;
}

.integration-channel-button.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
  transform: translateX(2px);
}

.integration-channel-icon {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.integration-channel-icon.success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.integration-channel-icon.warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #b45309;
}

.integration-channel-icon.danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #dc2626;
}

.integration-channel-icon.muted {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: var(--muted);
}

.integration-channel-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.integration-channel-copy strong,
.integration-channel-copy small,
.integration-channel-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-channel-copy small,
.integration-channel-copy em {
  color: var(--muted);
  font-size: 12px;
}

.integration-channel-copy em {
  font-style: normal;
}

.integration-channel-state {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 7px;
}

.integration-channel-state.success {
  background: #dcfce7;
  color: #166534;
}

.integration-channel-state.warning {
  background: #ffedd5;
  color: #9a3412;
}

.integration-channel-state.danger {
  background: #fee2e2;
  color: #991b1b;
}

.integration-channel-state.muted {
  background: #f1f5f9;
  color: var(--muted);
}

.integration-channel-empty,
.integration-side-empty {
  background: #f8fafc;
  border: 1px dashed #d9e4f5;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  padding: 14px;
}

.integration-channel-empty strong,
.integration-side-empty strong {
  color: var(--text);
}

.integration-workspace-detail {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.integration-provider-hero {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  padding: 14px;
}

.integration-provider-hero-title {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.integration-provider-hero-title h2 {
  margin: 2px 0 0;
}

.integration-provider-hero-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.integration-provider-hero-stats div,
.integration-state-summary div {
  background: #f8fafc;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  min-width: 0;
  padding: 10px 12px;
}

.integration-provider-hero-stats span,
.integration-state-summary span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.integration-provider-hero-stats strong,
.integration-state-summary strong {
  color: var(--ink);
  display: block;
  font-size: 20px;
  margin-top: 3px;
}

.integration-work-route {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 10px;
}

.integration-work-route div {
  background: #f8fbff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 9px 10px;
}

.integration-work-route span {
  align-items: center;
  background: #eaf2ff;
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.integration-work-route strong {
  color: var(--text);
  font-size: 13px;
}

.integration-work-route small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.integration-workspace-organizations .integration-fop-panel {
  margin-bottom: 0;
}

.integration-work-card {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.integration-work-card-head {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.integration-work-card-head h2 {
  font-size: 22px;
  margin: 2px 0 4px;
}

.integration-work-card-head p {
  color: var(--muted);
  margin: 0;
}

.integration-work-card-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.integration-work-main {
  display: grid;
  gap: 12px;
}

.integration-work-section {
  background: #fbfdff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.integration-work-section-head {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.integration-work-section-head h3 {
  color: var(--text);
  font-size: 17px;
  margin: 0 0 3px;
}

.integration-work-section-head p {
  color: var(--muted);
  margin: 0;
}

.integration-switch {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  gap: 8px;
  min-height: 38px;
  padding: 7px 11px;
  white-space: nowrap;
}

.integration-switch input {
  height: 16px;
  width: 16px;
}

.integration-work-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.integration-work-fields .span-2 {
  grid-column: 1 / -1;
}

.integration-work-profiles {
  background: #ffffff;
  padding: 0;
}

.integration-work-profiles > .integration-profiles-panel {
  border: 0;
  border-radius: 8px;
  margin: 0;
}

.integration-work-actions {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.integration-secondary-drawer,
.integration-org-drawer {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  overflow: hidden;
}

.integration-secondary-drawer summary,
.integration-org-drawer summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 13px 14px;
}

.integration-secondary-drawer summary::-webkit-details-marker,
.integration-org-drawer summary::-webkit-details-marker {
  display: none;
}

.integration-secondary-drawer summary span,
.integration-org-drawer summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.integration-secondary-drawer summary strong,
.integration-org-drawer summary strong {
  color: var(--text);
}

.integration-secondary-drawer summary small,
.integration-org-drawer summary small {
  color: var(--muted);
}

.integration-secondary-drawer summary i,
.integration-org-drawer summary i {
  background: #eff6ff;
  border-radius: 999px;
  color: var(--primary);
  font-style: normal;
  font-weight: 900;
  padding: 6px 10px;
}

.integration-secondary-drawer[open] summary,
.integration-org-drawer[open] summary {
  border-bottom: 1px solid #d9e4f5;
}

.integration-secondary-drawer .bank-test-panel,
.integration-org-drawer .integration-fop-panel {
  border: 0;
  border-radius: 0;
  margin: 0;
}

.integration-side-panel {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 96px);
  overflow: auto;
}

.integration-side-head {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.integration-side-head h3 {
  margin: 2px 0 0;
}

.integration-side-readiness {
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 11px 12px;
}

.integration-side-readiness.success {
  background: #ecfdf5;
  color: #047857;
}

.integration-side-readiness.warning {
  background: #fff7ed;
  color: #b45309;
}

.integration-side-readiness.danger {
  background: #fff1f2;
  color: #dc2626;
}

.integration-side-readiness.muted {
  background: #f8fafc;
  color: var(--muted);
}

.integration-side-readiness span {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.integration-side-meter {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.integration-side-meter i {
  background: currentColor;
  display: block;
  height: 100%;
}

.integration-side-checklist {
  display: grid;
  gap: 7px;
}

.integration-side-checklist div {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 8px 9px;
}

.integration-side-checklist span {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.integration-side-checklist .ok span {
  background: #dcfce7;
  color: #166534;
}

.integration-side-checklist .missing span {
  background: #fee2e2;
  color: #991b1b;
}

.integration-side-checklist .info span {
  background: #e9eef5;
  color: #475569;
}

.integration-side-checklist strong {
  font-size: 12px;
  line-height: 1.3;
}

.integration-side-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.integration-side-meta div,
.integration-side-message {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 10px;
}

.integration-side-meta span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.integration-side-meta strong {
  display: block;
  font-size: 13px;
  margin-top: 2px;
}

.integration-side-message {
  color: var(--muted);
  font-size: 13px;
}

.integration-side-log {
  display: grid;
  gap: 8px;
}

.integration-side-section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.integration-side-log-row {
  border-left: 3px solid #cbd5e1;
  display: grid;
  gap: 2px;
  padding: 4px 0 4px 9px;
}

.integration-side-log-row.success {
  border-left-color: #10b981;
}

.integration-side-log-row.danger {
  border-left-color: #ef4444;
}

.integration-side-log-row span,
.integration-side-log-row small {
  color: var(--muted);
  font-size: 12px;
}

.integration-no-results {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: 260px;
  padding: 28px;
  text-align: center;
}

.integration-state-panel,
.integration-errors-panel {
  display: grid;
  gap: 14px;
}

.integration-state-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.integration-state-summary .success strong {
  color: #047857;
}

.integration-state-summary .danger strong {
  color: #dc2626;
}

.integration-state-list {
  display: grid;
  gap: 8px;
}

.integration-state-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(160px, 0.5fr) minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.integration-state-row > button {
  justify-self: end;
  white-space: nowrap;
}

.integration-state-row.danger {
  border-color: #fecaca;
}

.integration-state-row.warning {
  border-color: #fed7aa;
}

.integration-state-row.success {
  border-color: #bbf7d0;
}

.integration-state-row.muted {
  border-color: #e2e8f0;
  color: var(--muted);
}

.integration-state-row-main {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.integration-state-row-main div,
.integration-state-row-note {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.integration-state-row-main strong,
.integration-state-row-main small,
.integration-state-row-note strong,
.integration-state-row-note small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-state-row-main small,
.integration-state-row-note small {
  color: var(--muted);
}

.integration-state-progress {
  background: #e5e7eb;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.integration-state-progress span {
  background: var(--primary);
  display: block;
  height: 100%;
}

.integration-state-row.success .integration-state-progress span {
  background: #10b981;
}

.integration-state-row.warning .integration-state-progress span {
  background: #f59e0b;
}

.integration-state-row.danger .integration-state-progress span {
  background: #ef4444;
}

.integration-state-row.muted .integration-state-progress span {
  background: #94a3b8;
}

.integration-errors-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.integration-error-card {
  background: #fff7f7;
  border: 1px solid #fecaca;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.integration-error-card > div {
  align-items: center;
  display: flex;
  gap: 10px;
}

.integration-error-card p {
  color: #7f1d1d;
  margin: 0;
}

.integration-empty-state {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.integration-empty-state strong {
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}

@media (max-width: 1500px) {
  .integration-workspace-shell {
    grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
  }

  .integration-side-panel {
    grid-column: 1 / -1;
    max-height: none;
    position: static;
  }

  .integration-side-checklist {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .integration-side-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .integration-work-route {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.integration-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.integration-card-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.integration-card-head h2 {
  margin-top: 2px;
}

.integration-status.success {
  background: #eef8f1;
  color: var(--accent-dark);
}

.integration-status.danger {
  background: #ffe4e4;
  color: #b42318;
}

.integration-message {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  padding: 9px 10px;
}

.integration-toggle {
  color: var(--ink);
  font-weight: 700;
}

.integration-readiness {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.integration-readiness.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.integration-readiness.warning {
  background: #fff7ed;
  border-color: #fed7aa;
}

.integration-readiness.danger {
  background: #fff1f2;
  border-color: #fecdd3;
}

.integration-readiness-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.integration-readiness-head span {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  padding: 4px 9px;
}

.integration-readiness-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.integration-readiness-items span {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}

.integration-readiness-items .ok {
  background: #dcfce7;
  color: #166534;
}

.integration-readiness-items .missing {
  background: #fee2e2;
  color: #991b1b;
}

.integration-readiness-items .info {
  background: #e9eef5;
  color: #475569;
}

.integration-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.integration-fields label:nth-child(2) {
  grid-column: 1 / -1;
}

.integration-config-check {
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 8px 10px;
}

.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.integration-profiles-panel {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.integration-profiles-head {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.integration-profiles-head h3 {
  margin: 0 0 4px;
}

.integration-profiles-head p {
  color: var(--muted);
  margin: 0;
}

.integration-profile-add {
  display: grid;
  gap: 8px;
}

.integration-profile-count {
  background: #eef6ff;
  border: 1px solid #cfe4ff;
  border-radius: 999px;
  color: #1d4ed8;
  font-weight: 800;
  padding: 7px 10px;
}

.integration-profile-picker {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1fr) auto auto auto;
}

.integration-profile-unlinked-note {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.integration-profile-unlinked-note div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.integration-profile-unlinked-note span {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.integration-profile-selected {
  display: grid;
  gap: 10px;
}

.integration-profile-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
}

.integration-profile-status-line {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.integration-profile-status {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-profile-status.success {
  background: #dcfce7;
  color: #166534;
}

.integration-profile-status.warning {
  background: #ffedd5;
  color: #9a3412;
}

.integration-profile-status.danger {
  background: #fee2e2;
  color: #991b1b;
}

.integration-profile-status.muted {
  background: #f1f5f9;
  color: var(--muted);
}

.integration-profile-card.inactive {
  opacity: 0.68;
}

.integration-profile-card-head {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
}

.integration-profile-enabled,
.integration-profile-check {
  align-items: center;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  padding: 7px 10px;
}

.integration-profile-check.exclusive {
  background: #eef6ff;
}

.integration-profile-org-note {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px;
}

.integration-profile-org-note span {
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px 8px;
}

.integration-profile-unlinked-card {
  margin: 0;
}

.integration-np-autofill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
}

.integration-np-autofill.ready {
  border-color: #86b99a;
  background: #f2f8f4;
}

.integration-np-autofill > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.integration-np-autofill strong,
.integration-np-autofill span {
  overflow-wrap: anywhere;
}

.integration-np-autofill span {
  color: var(--muted);
  font-size: 12px;
}

.integration-np-autofill button {
  flex: 0 0 auto;
}

.integration-profile-sections {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.integration-profile-section {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.integration-profile-section h4 {
  color: var(--ink);
  font-size: 13px;
  margin: 0;
}

.integration-profile-section-advanced summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.integration-profile-section-advanced > p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.integration-profile-section-advanced:not([open]) > p,
.integration-profile-section-advanced:not([open]) > .integration-profile-fields {
  display: none;
}

.integration-profile-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.integration-profile-fields label {
  min-width: 0;
}

.integration-profile-fields input,
.integration-profile-fields select,
.integration-profile-picker input,
.integration-profile-picker select {
  min-width: 0;
}

.integration-profile-actions {
  display: flex;
  justify-content: flex-end;
}

.integration-profile-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 12px;
  text-align: center;
}

.integration-profile-empty-guide {
  background: #f8fbff;
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.integration-profile-empty-guide > div {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: 38px minmax(0, 1fr);
}

.integration-profile-empty-guide strong,
.integration-profile-empty-guide small {
  grid-column: 2;
}

.integration-profile-empty-guide small {
  color: var(--muted);
  line-height: 1.35;
}

.integration-profile-empty-icon {
  align-items: center;
  background: #eaf2ff;
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  grid-row: 1 / span 2;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.integration-profile-empty-guide ul {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.integration-profile-empty-guide li {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 8px 9px;
}

.integration-profile-empty-guide li span {
  align-items: center;
  background: #eef6ff;
  border-radius: 50%;
  color: var(--primary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.integration-profile-empty-guide li em {
  color: var(--text);
  font-style: normal;
  font-weight: 800;
}

.integration-bank-profiles {
  background: #ffffff;
  border-color: #d9e4f5;
  gap: 12px;
}

.integration-bank-head {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.integration-bank-head h3 {
  color: var(--text);
  font-size: 20px;
  margin: 2px 0 4px;
}

.integration-bank-head p {
  color: var(--muted);
  margin: 0;
}

.integration-bank-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.integration-bank-summary div {
  background: #f8fbff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  min-width: 0;
  padding: 9px 10px;
}

.integration-bank-summary span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.integration-bank-summary strong {
  color: var(--text);
  display: block;
  font-size: 20px;
  margin-top: 2px;
}

.integration-bank-audit {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.integration-bank-audit article {
  background: #f8fbff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
}

.integration-bank-audit article.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.integration-bank-audit article.warning {
  background: #fff7ed;
  border-color: #fed7aa;
}

.integration-bank-audit article.danger {
  background: #fef2f2;
  border-color: #fecaca;
}

.integration-bank-audit span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.integration-bank-audit strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.integration-bank-audit small {
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  min-height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.integration-bank-toolbar {
  display: grid;
  gap: 10px;
}

.integration-bank-profile-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration-bank-profile-filters button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
}

.integration-bank-profile-filters button.active {
  background: #eff6ff;
  border-color: var(--primary);
  color: var(--primary);
}

.integration-bank-profile-filters span {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: inherit;
  display: inline-flex;
  font-size: 11px;
  justify-content: center;
  min-width: 22px;
  padding: 3px 6px;
}

.integration-bank-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.integration-bank-tabs button {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 4px;
  min-width: 176px;
  padding: 10px 12px;
  text-align: left;
}

.integration-bank-tabs button.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.integration-bank-tabs button.success i,
.integration-bank-state.success,
.integration-bank-checklist .ok {
  color: #047857;
}

.integration-bank-tabs button.warning i,
.integration-bank-state.warning,
.integration-bank-checklist .optional {
  color: #b45309;
}

.integration-bank-tabs button.danger i,
.integration-bank-state.danger,
.integration-bank-checklist .missing {
  color: #dc2626;
}

.integration-bank-tabs button.muted i,
.integration-bank-state.muted {
  color: var(--muted);
}

.integration-bank-tab-title {
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-bank-tab-meta {
  color: var(--muted);
  font-size: 12px;
}

.integration-bank-tabs i {
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.integration-bank-tabs b {
  border-radius: 999px;
  display: block;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-bank-tabs b.success {
  background: #dcfce7;
  color: #166534;
}

.integration-bank-tabs b.danger {
  background: #fee2e2;
  color: #991b1b;
}

.integration-bank-tabs button.has-error {
  border-color: #fecaca;
}

.integration-bank-empty-tab {
  border: 1px dashed #d9e4f5;
  border-radius: 8px;
  color: var(--muted);
  padding: 12px;
}

.integration-bank-add {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.integration-bank-fallback {
  align-items: center;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
  padding: 12px;
}

.integration-bank-fallback.warning {
  background: #fffbeb;
  border-color: #fde68a;
}

.integration-bank-fallback.danger {
  background: #fff1f2;
  border-color: #fecdd3;
}

.integration-bank-fallback.muted {
  background: #f8fafc;
}

.integration-bank-fallback strong,
.integration-bank-org-bridge-head strong {
  color: var(--text);
  display: block;
  font-size: 16px;
}

.integration-bank-fallback small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.integration-bank-fallback-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.integration-bank-fallback-grid span {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  padding: 8px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-bank-fallback-grid .ok {
  color: #047857;
}

.integration-bank-fallback-grid .missing {
  color: #dc2626;
}

.integration-bank-org-bridge {
  background: #f8fbff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.integration-bank-org-bridge.empty {
  color: var(--muted);
}

.integration-bank-org-bridge-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.integration-bank-org-bridge-head small {
  color: var(--muted);
  font-weight: 800;
}

.integration-bank-org-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.integration-bank-org-grid article {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 10px;
}

.integration-bank-org-grid article.connected {
  border-color: #bbf7d0;
}

.integration-bank-org-grid strong,
.integration-bank-org-grid span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-bank-org-grid span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.integration-bank-org-grid button {
  min-height: 34px;
  white-space: nowrap;
}

.integration-bank-profile-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.integration-bank-profile-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.integration-bank-selected-head {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.integration-bank-selected-head > div {
  min-width: 0;
}

.integration-bank-selected-head h4 {
  color: var(--text);
  font-size: 18px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-bank-selected-head p {
  color: var(--muted);
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-bank-state {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  white-space: nowrap;
}

.integration-bank-profile-alert {
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.integration-bank-profile-alert.success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #047857;
}

.integration-bank-profile-alert.danger {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #991b1b;
}

.integration-bank-profile-alert span {
  color: inherit;
  font-size: 13px;
}

.integration-bank-save-state {
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.integration-bank-save-state.success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #047857;
}

.integration-bank-save-state.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.integration-bank-save-state.danger {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #991b1b;
}

.integration-bank-save-state strong {
  font-size: 13px;
}

.integration-bank-save-state span {
  color: inherit;
  font-size: 13px;
  line-height: 1.35;
}

.integration-bank-profile-help {
  background: #f8fafc;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.integration-bank-profile-help h4 {
  margin: 0;
}

.integration-bank-profile-help p {
  color: var(--muted);
  margin: 0;
}

.integration-bank-checklist {
  display: grid;
  gap: 7px;
}

.integration-bank-checklist span {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  font-weight: 800;
  padding: 8px 10px;
}

.integration-bank-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration-bank-help-actions button {
  flex: 1 1 180px;
}

.integration-fop-panel {
  margin-bottom: 14px;
}

.integration-fop-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 10px 0 14px;
}

.integration-fop-summary div {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.integration-fop-summary span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.integration-fop-summary strong {
  color: var(--ink);
  display: block;
  font-size: 22px;
  margin-top: 3px;
}

.integration-fop-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.integration-fop-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 12px;
  padding: 12px;
}

.integration-fop-card.inactive {
  background: #f8faf9;
  opacity: 0.76;
}

.integration-fop-card-head {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.integration-fop-card-head input {
  font-weight: 800;
}

.integration-org-connections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.integration-org-connections span {
  border: 1px solid #d9e4f5;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  padding: 5px 8px;
}

.integration-org-connections span.connected {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}

.integration-org-connections span.disabled {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.integration-org-connections span.missing {
  background: #f8fafc;
}

.integration-fop-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.integration-fop-field-wide {
  grid-column: 1 / -1;
}

.integration-fop-flags-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.integration-fop-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration-fop-flags .check-line,
.integration-fop-card-head .check-line {
  align-items: center;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  padding: 7px 10px;
}

.integration-fop-actions {
  display: flex;
  justify-content: flex-end;
}

.integration-fop-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.integration-log-table {
  min-width: 860px;
}

.integration-roadmap-panel {
  margin-bottom: 14px;
}

.integration-roadmap {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.integration-roadmap > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.integration-roadmap strong {
  font-size: 14px;
}

.integration-roadmap p {
  color: var(--muted);
  margin: 0;
}

.bank-test-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.bank-test-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.bank-sync-panel {
  align-items: end;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding: 12px;
}

.bank-sync-panel button,
.bank-test-actions button {
  min-height: 40px;
  width: 100%;
}

.bank-test-form .span-2 {
  grid-column: span 2;
}

.bank-test-check {
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 8px 10px;
}

.bank-test-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.bank-match-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.bank-match-preview.is-empty {
  background: #f8faf9;
}

.bank-match-preview.success {
  background: #f1f8f4;
  border-color: #b7e1c4;
}

.bank-match-preview.warning {
  background: #fff8e8;
  border-color: #f5d28b;
}

.bank-match-preview.danger {
  background: #fff1f1;
  border-color: #f3b5b5;
}

.bank-match-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bank-match-grid div {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
}

.bank-match-grid span {
  color: var(--muted);
  font-size: 12px;
}

.bank-payments-log {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.compact-head {
  min-height: auto;
}

.bank-status.success {
  background: #eef8f1;
  color: var(--accent-dark);
}

.bank-status.warning {
  background: #fff3d8;
  color: #9a5b00;
}

.bank-status.danger {
  background: #ffe4e4;
  color: #b42318;
}

.bank-x-report {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.bank-cashier-page {
  padding: 8px 12px 10px;
}

.bank-x-report-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.bank-x-report-table {
  min-width: 980px;
}

.bank-x-report .print-only-table {
  display: none;
}

.bank-display-controls {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 12px 0;
  padding: 10px 12px;
}

.bank-display-controls > div:first-child {
  display: grid;
  gap: 2px;
}

.bank-display-controls span,
.bank-display-controls small {
  color: var(--muted);
  font-size: 12px;
}

.bank-display-controls strong {
  color: var(--text);
  font-size: 15px;
}

.bank-page-size {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.bank-page-size button {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: var(--text);
  font-weight: 800;
  min-width: 48px;
  padding: 8px 10px;
}

.bank-page-size button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.bank-status-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
}

.bank-fop-tabs,
.bank-channel-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.bank-fop-tabs button,
.bank-channel-filter button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: var(--text);
  display: flex;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
}

.bank-fop-tabs button.active,
.bank-channel-filter button.active {
  background: #eef6ff;
  border-color: var(--primary);
  color: var(--primary);
}

.bank-fop-tabs span,
.bank-channel-filter span {
  font-weight: 800;
}

.bank-fop-tabs strong,
.bank-channel-filter strong {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 2px 7px;
}

.bank-channel-filter i {
  color: var(--primary);
  font-style: normal;
  font-weight: 900;
}

.bank-fop-workspace {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
}

.bank-fop-workspace-head {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.bank-fop-workspace-head h2 {
  color: var(--text);
  font-size: 22px;
  line-height: 1.15;
  margin: 2px 0 4px;
}

.bank-fop-workspace-head p {
  color: var(--muted);
  margin: 0;
}

.bank-fop-setup-warning {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  color: #9a3412;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.bank-fop-setup-warning span {
  color: #9a3412;
}

.bank-fop-card-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bank-fop-card {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 4px;
  min-height: 106px;
  padding: 10px 12px;
  text-align: left;
}

.bank-fop-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.bank-fop-card span {
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-fop-card strong {
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
}

.bank-fop-card small {
  color: var(--muted);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-fop-card i {
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.bank-fop-card.green i,
.bank-fop-selected-meta b.green {
  color: #047857;
}

.bank-fop-card.orange i,
.bank-fop-selected-meta b.orange {
  color: #b45309;
}

.bank-fop-card.red i,
.bank-fop-selected-meta b.red {
  color: #dc2626;
}

.bank-fop-card.blue i,
.bank-fop-selected-meta b.blue {
  color: var(--primary);
}

.bank-fop-selected-panel {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(280px, 0.6fr) minmax(0, 1fr);
}

.bank-fop-selected-info {
  background: #f8fbff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.bank-fop-selected-info h3 {
  color: var(--text);
  font-size: 20px;
  margin: 0;
}

.bank-fop-selected-info p {
  color: var(--muted);
  margin: 0;
}

.bank-fop-selected-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bank-fop-selected-meta span,
.bank-fop-selected-meta b {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 999px;
  padding: 5px 9px;
}

.bank-fop-sync-panel {
  margin: 0;
}

.bank-filter-line {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-width: 0;
}

.bank-kpi-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 4px 0;
}

.bank-kpi-grid div {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px 8px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 68px;
  position: relative;
  padding: 9px 10px;
}

.bank-kpi-grid span,
.bank-kpi-grid small {
  color: var(--muted);
  font-size: 12px;
}

.bank-kpi-grid strong {
  color: var(--primary);
  font-size: 19px;
  grid-column: 2;
  line-height: 1.1;
}

.bank-kpi-grid small {
  grid-column: 2;
}

.bank-kpi-icon {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  grid-row: 1 / span 3;
  margin-bottom: 0;
  width: 30px;
}

.bank-kpi-icon.balance,
.bank-kpi-icon.month,
.bank-kpi-icon.year {
  background: #eaf3ff;
  color: #1d4ed8;
}

.bank-kpi-icon.income,
.bank-kpi-icon.linked {
  background: #dcfce7;
  color: #166534;
}

.bank-kpi-icon.review {
  background: #fef3c7;
  color: #92400e;
}

.bank-kpi-icon.danger {
  background: #fee2e2;
  color: #991b1b;
}

.bank-status-filter button {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: var(--text);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 32px;
  padding: 7px 11px;
}

body[data-current-view="bankPayments"] .bank-fop-tabs,
body[data-current-view="bankPayments"] .bank-channel-filter,
body[data-current-view="bankPayments"] .bank-status-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-current-view="bankPayments"] .bank-fop-tabs button,
body[data-current-view="bankPayments"] .bank-channel-filter button,
body[data-current-view="bankPayments"] .bank-status-filter button {
  min-width: 0;
  width: 100%;
}

.bank-status-filter button.active {
  background: #eef6ff;
  border-color: var(--primary);
  color: var(--primary);
}

.bank-status-filter span {
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.bank-status-filter strong {
  font-size: 16px;
}

.bank-workspace-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.bank-cashier-workspace {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.42fr);
  min-width: 0;
}

.bank-payments-table-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow: auto;
}

.bank-cashier-table {
  min-width: max-content;
  table-layout: fixed;
  width: 100%;
}

.bank-cashier-table tr[data-bank-select-payment] {
  cursor: pointer;
}

.bank-cashier-table tr.is-selected {
  background: #eef6ff;
}

.bank-cashier-table td {
  font-size: 12px;
  line-height: 1.25;
  padding: 7px 8px;
  vertical-align: top;
}

.bank-cashier-table th {
  font-size: 11px;
  padding: 7px 8px;
}

.bank-cashier-table th:nth-child(1),
.bank-cashier-table td:nth-child(1) {
  text-align: center;
  width: 34px;
}

.bank-cashier-table th:nth-child(2),
.bank-cashier-table td:nth-child(2) {
  width: 88px;
}

.bank-cashier-table th:nth-child(3),
.bank-cashier-table td:nth-child(3) {
  width: 170px;
}

.bank-cashier-table th:nth-child(4),
.bank-cashier-table td:nth-child(4) {
  width: 230px;
}

.bank-cashier-table th:nth-child(5),
.bank-cashier-table td:nth-child(5) {
  width: 104px;
}

.bank-cashier-table th:nth-child(6),
.bank-cashier-table td:nth-child(6) {
  width: 108px;
}

.bank-cashier-table th:nth-child(7),
.bank-cashier-table td:nth-child(7) {
  width: 138px;
}

.bank-cashier-table th:nth-child(8),
.bank-cashier-table td:nth-child(8) {
  width: 108px;
}

.bank-cashier-table th:nth-child(9),
.bank-cashier-table td:nth-child(9) {
  width: 96px;
}

.bank-cashier-table td small,
.bank-cashier-table td span {
  display: block;
}

.bank-purpose-cell {
  max-width: none;
  min-width: 0;
  overflow-wrap: anywhere;
}

.bank-purpose-cell span,
.bank-payer-cell strong,
.bank-payer-cell small {
  -webkit-box-orient: vertical;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.bank-payer-cell small {
  color: var(--muted);
  margin-top: 2px;
}

.bank-date-cell {
  color: #344054;
  white-space: normal;
}

.bank-table-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto auto;
  padding: 8px 10px;
}

.bank-table-footer span,
.bank-table-footer label {
  color: var(--muted);
  font-size: 12px;
}

.bank-table-footer label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.bank-table-footer select {
  min-height: 32px;
  padding: 4px 28px 4px 8px;
}

.bank-table-pages {
  align-items: center;
  display: flex;
  gap: 6px;
}

.bank-type-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  padding: 5px 8px 5px 5px;
  white-space: nowrap;
}

.bank-type-badge i {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-style: normal;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.bank-type-badge b {
  font-size: 12px;
}

.bank-type-badge.income {
  background: #dcfce7;
  color: #166534;
}

.bank-type-badge.expense {
  background: #fee2e2;
  color: #991b1b;
}

.bank-type-badge.transfer {
  background: #eaf3ff;
  color: #1d4ed8;
}

.bank-type-badge.income i {
  background: #bbf7d0;
}

.bank-type-badge.expense i {
  background: #fecaca;
}

.bank-type-badge.transfer i {
  background: #bfdbfe;
}

.bank-allocation-panel {
  background: #ffffff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  position: sticky;
  top: 12px;
}

.bank-allocation-panel.empty {
  background: #f8faf9;
  border-style: dashed;
}

.bank-allocation-panel.empty p {
  color: var(--muted);
  margin: 0;
}

.bank-allocation-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: block;
  padding-bottom: 8px;
}

.bank-allocation-head div {
  display: grid;
  gap: 4px;
}

.bank-allocation-facts span,
.bank-allocation-purpose span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bank-allocation-head strong {
  color: var(--text);
  font-size: 18px;
}

.bank-allocation-facts {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.bank-allocation-facts div,
.bank-allocation-purpose {
  background: #ffffff;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
}

.bank-allocation-facts div {
  align-items: start;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(7rem, 0.35fr) minmax(0, 1fr);
}

.bank-allocation-facts div:last-child {
  border-bottom: 0;
}

.bank-allocation-facts strong,
.bank-allocation-purpose p {
  margin: 0;
  overflow-wrap: anywhere;
}

.bank-allocation-purpose small {
  color: var(--muted);
}

.bank-workspace-list.empty {
  background: #f8faf9;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  padding: 18px;
}

.bank-workspace-list.empty p {
  color: var(--muted);
  margin: 4px 0 0;
}

.bank-workspace-row {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  padding: 12px;
}

.bank-workspace-row.needs-link {
  border-color: #f7c566;
}

.bank-workspace-main,
.bank-workspace-actions {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.bank-workspace-topline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bank-workspace-topline strong {
  color: var(--primary);
  font-size: 20px;
}

.bank-workspace-topline span,
.bank-workspace-person span,
.bank-workspace-purpose span,
.bank-workspace-linked span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bank-workspace-person,
.bank-workspace-purpose,
.bank-workspace-linked {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bank-workspace-person b,
.bank-workspace-purpose p,
.bank-workspace-linked strong {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.bank-workspace-purpose small,
.bank-workspace-linked small {
  color: var(--muted);
}

.bank-workspace-actions label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.bank-workspace-actions input,
.bank-workspace-actions select {
  min-width: 0;
  width: 100%;
}

.bank-workspace-actions button {
  width: 100%;
}

.bank-workspace-actions .bank-link-type {
  display: none;
}

.bank-found-hints {
  color: var(--muted);
  font-size: 12px;
}

.bank-document-suggestions,
.bank-document-search-results {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.bank-document-suggestions-details {
  background: #f8fbff;
  border: 1px dashed #cbd9ee;
  border-radius: 10px;
  padding: 8px;
}

.bank-document-suggestions-details summary {
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.bank-document-suggestions-details summary::-webkit-details-marker {
  display: none;
}

.bank-document-suggestions-details[open] summary {
  margin-bottom: 8px;
}

.bank-document-search-results:empty {
  display: none;
}

.bank-document-suggestions > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.bank-document-suggestions button,
.bank-document-search-results button {
  background: #f8fbff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 2px;
  justify-items: start;
  min-width: 0;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.bank-document-suggestions button:hover,
.bank-document-search-results button:hover {
  background: #eef6ff;
  border-color: var(--primary);
}

.bank-document-search-results button.is-selected {
  background: #eef6ff;
  border-color: var(--primary);
  box-shadow: inset 4px 0 0 var(--primary);
}

.bank-document-suggestions button.is-selected {
  background: #eef6ff;
  border-color: var(--primary);
  box-shadow: inset 4px 0 0 var(--primary);
}

.bank-document-suggestions strong,
.bank-document-suggestions small,
.bank-document-search-results strong,
.bank-document-search-results small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bank-document-suggestions small,
.bank-document-search-results small,
.bank-document-search-empty {
  color: var(--muted);
  font-size: 12px;
}

.bank-document-search-empty {
  background: #fff7ed;
  border: 1px dashed #fed7aa;
  border-radius: 8px;
  padding: 8px 10px;
}

.bank-manual-queue {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.bank-manual-help {
  background: #f8fbff;
  border: 1px solid #d9e4f5;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.bank-manual-help span {
  color: var(--muted);
  font-size: 13px;
}

.bank-manual-queue.empty {
  background: #f8faf9;
}

.bank-manual-queue.empty p {
  color: var(--muted);
  margin: 0;
}

.bank-manual-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(130px, 0.5fr) minmax(260px, 1.1fr) minmax(140px, 0.5fr) minmax(200px, 0.75fr) minmax(160px, 0.55fr);
  min-width: 0;
  padding-top: 10px;
}

.bank-manual-row > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bank-manual-row > div:first-child strong,
.bank-manual-row > div:first-child span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bank-manual-row span,
.bank-manual-row small {
  color: var(--muted);
}

.bank-manual-purpose {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bank-manual-purpose span,
.bank-manual-purpose small {
  overflow-wrap: anywhere;
}

.bank-manual-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.bank-manual-row input,
.bank-manual-row select {
  min-width: 0;
  width: 100%;
}

.bank-manual-row button {
  align-self: end;
  min-width: 0;
  white-space: nowrap;
  width: 100%;
}

@media (max-width: 1280px) {
  .bank-manual-row {
    grid-template-columns: minmax(150px, 0.65fr) minmax(260px, 1fr);
  }

  .bank-manual-row label,
  .bank-manual-row button {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .bank-workspace-row {
    grid-template-columns: 1fr;
  }

  .bank-manual-row {
    grid-template-columns: 1fr;
  }
}

.order-delivery-documents,
.order-delivery-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
}

.order-delivery-documents.empty {
  background: #f8faf9;
}

.order-delivery-documents h3 {
  margin: 0 0 4px;
}

.order-delivery-documents p {
  color: var(--muted);
  margin: 0;
}

.order-delivery-documents.has-conflict {
  border-color: #efb3b3;
}

.supplier-delivery-card {
  background: #f8fafc;
  border-color: #cfd9e8;
}

.supplier-delivery-card .panel-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.supplier-delivery-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supplier-delivery-summary-grid > div {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
}

.supplier-delivery-summary-grid span,
.supplier-delivery-summary-grid small,
.supplier-delivery-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.supplier-delivery-summary-grid strong,
.supplier-delivery-summary-grid small {
  overflow-wrap: anywhere;
}

.supplier-delivery-note {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.supplier-delivery-note p {
  color: var(--ink);
  margin: 0;
  overflow-wrap: anywhere;
}

.supplier-delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.supplier-delivery-history {
  border-top: 1px solid #e4e7ec;
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.supplier-delivery-history-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 8px 10px;
}

.supplier-delivery-history-row.active {
  border-color: #98c8a7;
}

.supplier-delivery-history-row span,
.supplier-delivery-history-row strong,
.supplier-delivery-history-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.supplier-delivery-document-row {
  background: #f8fafc;
}

.delivery-truth-summary {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 12px;
}

.delivery-truth-summary > div {
  display: grid;
  gap: 3px;
}

.delivery-truth-summary span,
.delivery-truth-summary small {
  color: var(--muted);
}

.delivery-truth-summary strong {
  font-size: 16px;
}

.delivery-sender-provenance {
  color: var(--muted);
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.delivery-sender-provenance strong {
  color: var(--text);
  font-size: inherit;
}

.order-delivery-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.order-delivery-grid .delivery-wide {
  grid-column: span 2;
}

.order-delivery-grid .delivery-full {
  grid-column: 1 / -1;
}

.delivery-legal-inline {
  background: #f7fafc;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.delivery-legal-lookup {
  background: #eef4f8;
  border: 1px solid #ccd9e3;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  grid-column: 1 / -1;
  padding: 9px 10px;
}

.delivery-legal-lookup.is-success {
  background: #edf8f1;
  border-color: #abd6b9;
  color: #17613a;
}

.delivery-legal-lookup.is-error {
  background: #fff2f0;
  border-color: #efb4ac;
  color: #a33125;
}

.delivery-address-workspace {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.delivery-address-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.delivery-address-heading > div {
  display: grid;
  gap: 3px;
}

.delivery-address-heading small,
.delivery-address-workspace label > small {
  color: var(--muted);
}

.delivery-address-source {
  font-size: 13px;
  margin: -4px 0 0;
}

.delivery-mode-switch {
  background: #edf1f5;
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
}

.delivery-mode-switch button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #415164;
  min-height: 36px;
  padding: 7px 10px;
}

.delivery-mode-switch button.is-active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 36, 55, 0.16);
  color: #0f6b4f;
  font-weight: 700;
}

.delivery-address-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.delivery-lookup-control {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.delivery-lookup-results {
  background: #ffffff;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  display: grid;
  margin-top: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 4px;
}

.delivery-lookup-option {
  align-items: start;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  display: grid;
  gap: 2px;
  justify-items: start;
  min-width: 0;
  padding: 9px;
  text-align: left;
  width: 100%;
}

.delivery-lookup-option:hover,
.delivery-lookup-option:focus-visible {
  background: #eef5ff;
}

.delivery-lookup-option strong,
.delivery-lookup-option small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.delivery-quote-action {
  display: grid;
  gap: 4px;
  margin-right: auto;
}

.delivery-quote-action small,
.delivery-create-actions small {
  color: var(--muted);
  max-width: 440px;
}

.delivery-create-actions {
  display: grid;
  gap: 4px;
  justify-items: stretch;
}

.delivery-create-actions button {
  white-space: nowrap;
}

.delivery-creation-state-panel {
  align-content: start;
}

.delivery-creation-state-panel.is-unknown {
  border-color: #efb3b3;
}

.delivery-reconcile-profile {
  grid-template-columns: minmax(0, 1fr);
}

.delivery-recovery-note {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.delivery-recovery-note ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
}

.delivery-recovery-actions {
  justify-content: flex-end;
}

.delivery-recovery-actions .danger-outline {
  border-color: #c96262;
  color: #9d2929;
}

.delivery-price-estimate {
  background: #f8fafc;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px;
}

.delivery-price-estimate > div {
  display: grid;
  gap: 3px;
}

.delivery-price-estimate span,
.delivery-price-estimate p {
  color: var(--muted);
  margin: 0;
}

.delivery-price-estimate p,
.delivery-price-estimate > strong {
  grid-column: 1 / -1;
}

.delivery-price-estimate.exact {
  background: #f1faf4;
  border-color: #a7d8b5;
}

.delivery-price-estimate.test {
  background: #fff9e9;
  border-color: #e8cf88;
}

.delivery-verification-panel,
.delivery-conflict-panel,
.delivery-confirmed-panel {
  align-content: start;
}

.delivery-verification-number,
.delivery-verification-result,
.delivery-conflict-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 14px;
}

.delivery-verification-number strong {
  font-size: 22px;
}

.delivery-verification-number span,
.delivery-verification-number small,
.delivery-verification-result span,
.delivery-verification-result small {
  color: var(--muted);
}

.delivery-verification-result.success {
  background: #f1faf4;
  border-color: #a7d8b5;
}

.delivery-verification-result.danger,
.delivery-conflict-summary {
  background: #fff4f4;
  border-color: #efb3b3;
}

.delivery-verification-result p,
.delivery-conflict-summary p {
  margin: 4px 0 0;
}

.delivery-truth-facts {
  display: grid;
  gap: 1px;
  margin: 0;
}

.delivery-truth-facts > div {
  background: #f8fafc;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(140px, 0.45fr) minmax(0, 1fr);
  padding: 10px 12px;
}

.delivery-truth-facts dt {
  color: var(--muted);
}

.delivery-truth-facts dd {
  font-weight: 750;
  margin: 0;
  overflow-wrap: anywhere;
}

.order-delivery-modal-backdrop {
  align-items: center;
  justify-items: center;
  padding: 24px;
}

.order-delivery-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  max-height: calc(100vh - 48px);
  overflow: auto;
  width: min(1040px, 96vw);
}

.order-delivery-dialog .order-delivery-panel {
  border: 0;
  border-radius: 10px;
  margin: 0;
}

.order-delivery-dialog .order-delivery-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

@media (max-width: 1280px) {
  .order-detail-hero-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-detail-hero .order-back-button {
    grid-column: 1 / -1;
  }

  .order-detail-core-grid {
    grid-template-columns: 1fr;
  }

  .order-detail-lines-grid {
    grid-template-columns: 1fr;
  }

  .order-detail-main > .order-finance-card {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .order-detail-main > .order-finance-card .order-payment-actions {
    grid-column: 2 / -1;
  }

  .order-line-card {
    grid-template-columns: minmax(0, 1fr) minmax(128px, auto) minmax(86px, auto) minmax(92px, auto) auto;
  }

  .order-line-product {
    grid-column: 1 / -1;
  }

  .order-line-stock-area {
    grid-column: 1 / 3;
  }

  .order-line-price-type {
    grid-column: 3 / -1;
  }
}

@media (max-width: 1180px) {
  .order-detail-layout {
    grid-template-columns: 1fr;
  }

  .order-detail-side {
    position: static;
  }

  .order-detail-side-stack {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .order-line-card {
    grid-template-columns: minmax(0, 1fr) minmax(128px, auto) minmax(92px, auto) minmax(96px, auto) auto;
  }

  .order-line-product,
  .order-line-stock-area,
  .order-line-price-type {
    grid-column: 1 / -1;
  }

  .order-line-upsell {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  .order-delivery-modal-backdrop {
    padding: 8px;
  }

  .order-detail-hero-top,
  .order-status-band {
    grid-template-columns: 1fr;
  }

  .order-detail-hero-actions > button,
  .order-detail-hero-actions .order-print-menu-wrap,
  .order-detail-hero-actions .order-print-menu-wrap > button {
    width: 100%;
  }

  .order-pick-facts-collapsible summary {
    align-items: stretch;
    flex-direction: column;
  }

  .order-pick-summary-actions {
    justify-content: flex-start;
  }

  .order-detail-main > .order-finance-card {
    grid-template-columns: 1fr;
  }

  .order-detail-main > .order-finance-card .order-payment-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .order-detail-main > .order-finance-card .order-payment-actions > button {
    width: 100%;
  }

  .order-status-card-reminder.is-open {
    grid-column: auto;
  }

  .order-next-step-panel {
    align-items: stretch;
  }

  .order-next-step-actions,
  .order-next-step-actions > button,
  .order-danger-item,
  .order-danger-item > button {
    width: 100%;
  }

  .order-danger-item {
    grid-template-columns: 1fr;
  }

  .order-delivery-dialog {
    max-height: calc(100vh - 16px);
    width: calc(100vw - 16px);
  }

  .order-delivery-dialog .order-delivery-grid {
    grid-template-columns: 1fr;
  }

  .order-delivery-dialog .order-delivery-grid .delivery-wide,
  .order-delivery-dialog .order-delivery-grid .delivery-full {
    grid-column: auto;
  }

  .delivery-legal-inline {
    grid-template-columns: 1fr;
  }

  .delivery-address-grid,
  .delivery-price-estimate,
  .supplier-delivery-summary-grid {
    grid-template-columns: 1fr;
  }

  .delivery-mode-switch {
    grid-template-columns: 1fr;
  }

  .delivery-truth-summary,
  .delivery-address-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-truth-summary > button,
  .delivery-quote-action,
  .delivery-quote-action > button,
  .delivery-create-actions,
  .delivery-create-actions > button,
  .supplier-delivery-actions,
  .supplier-delivery-actions > button,
  .delivery-recovery-actions,
  .delivery-recovery-actions > button,
  .order-delivery-panel > .integration-actions > button {
    width: 100%;
  }

  .supplier-delivery-card .panel-head,
  .supplier-delivery-history-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .delivery-truth-facts > div {
    grid-template-columns: 1fr;
  }
}

.delivery-places {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.delivery-places-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.delivery-places-head h3 {
  font-size: 15px;
  margin: 0;
}

.delivery-places-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-place-grid {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 64px repeat(4, minmax(78px, 1fr)) minmax(92px, 0.9fr);
}

.delivery-place-grid strong {
  color: var(--accent-dark);
}

.delivery-place-grid-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.delivery-place-grid input {
  min-height: 34px;
}

.delivery-place-grid output {
  background: #eef7f2;
  border: 1px solid #cfe2d7;
  border-radius: 6px;
  color: #166534;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  place-items: center;
}

.delivery-place-summary {
  display: block;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.delivery-payment-hint {
  align-self: stretch;
  background: #f8fbfa;
  border: 1px solid #cfe2dd;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px;
}

.delivery-payment-hint div {
  display: grid;
  gap: 2px;
}

.delivery-payment-hint span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-payment-hint strong {
  color: var(--ink);
  font-size: 16px;
}

.delivery-payment-hint p {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  grid-column: 1 / -1;
  margin: 0;
}

.success-text {
  color: var(--accent-dark);
  font-weight: 700;
}

.danger-text {
  color: #b42318;
  font-weight: 800;
}

.eyebrow {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dashboard-actions button {
  padding: 0 14px;
}

.dashboard-stats {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  margin-bottom: 14px;
}

.dashboard-stats .stat strong {
  font-size: 21px;
}

.dashboard-main {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(520px, 1.25fr) minmax(360px, 0.75fr);
}

.dashboard-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.panel-head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.dashboard-table {
  border: 0;
}

.dashboard-table th,
.dashboard-table td {
  padding: 9px 8px;
}

.home-dashboard {
  color: #182033;
  display: grid;
  gap: 14px;
}

.home-head {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 0.8fr) max-content;
}

.home-head h1 {
  font-size: 28px;
  margin: 0 0 5px;
}

.home-head p,
.home-title-row p {
  color: #667085;
  margin: 0;
}

.home-search {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 8px 12px;
}

.home-search span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.home-search input {
  border: 0;
  min-height: 24px;
  padding: 0;
}

.home-search input:focus {
  outline: none;
}

.home-head-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.home-head-actions > button:first-child {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  font-weight: 800;
}

.home-user-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 34px max-content;
  min-width: 165px;
  padding: 8px 12px;
}

.home-user-card span {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.home-user-card strong {
  font-size: 13px;
}

.home-user-card small {
  color: #667085;
}

.home-surface {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 16px 45px rgba(29, 41, 57, 0.05);
  display: grid;
  gap: 14px;
  padding: 18px;
}

.home-title-row {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.home-title-row h2 {
  font-size: 25px;
  margin: 0 0 5px;
}

.home-period-tabs {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: inline-flex;
  overflow: hidden;
}

.home-period-tabs button {
  background: transparent;
  border: 0;
  border-right: 1px solid #dfe5ef;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 36px;
  padding: 0 14px;
}

.home-period-tabs button:last-child {
  border-right: 0;
}

.home-period-tabs button.active {
  background: #eef2ff;
  color: #4f46e5;
}

.home-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.home-plan-panel {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  padding: 14px;
}

.home-plan-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.home-plan-main span,
.home-plan-edit span {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}

.home-plan-main strong {
  color: #182033;
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.home-plan-main small {
  color: #667085;
  display: block;
  font-weight: 800;
  margin-top: 4px;
}

.home-plan-progress {
  background: #e4e7ec;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.home-plan-progress span {
  background: #31a66f;
  display: block;
  height: 100%;
}

.home-plan-edit {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) max-content;
}

.home-plan-edit input {
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.home-kpi,
.home-card {
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(29, 41, 57, 0.04);
}

.home-kpi {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 14px;
}

.home-kpi-title {
  align-items: center;
  color: #344054;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
  justify-content: space-between;
}

.home-kpi-title i {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4f46e5;
  display: inline-flex;
  font-style: normal;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.home-kpi.green .home-kpi-title i {
  background: #e8f7f2;
  color: #138050;
}

.home-kpi.orange .home-kpi-title i {
  background: #fff4e5;
  color: #d97706;
}

.home-kpi.red .home-kpi-title i {
  background: #ffe8ea;
  color: #c33131;
}

.home-kpi strong {
  font-size: 23px;
  line-height: 1.1;
}

.home-kpi-foot {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: max-content 1fr;
}

.home-kpi small {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-delta {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 7px;
  white-space: nowrap;
}

.dashboard-delta.positive {
  background: #eaf8f0;
  color: #127446;
}

.dashboard-delta.negative {
  background: #ffe8ea;
  color: #b42318;
}

.dashboard-delta.neutral {
  background: #eef1f5;
  color: #667085;
}

.home-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
}

.home-main-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-width: 0;
}

.home-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px;
}

.home-card.span-3 {
  grid-column: span 3;
}

.home-card.span-4 {
  grid-column: span 4;
}

.home-card.span-5 {
  grid-column: span 5;
}

.home-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.home-card-head h3 {
  font-size: 15px;
  margin: 0;
}

.home-card-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.home-donut-layout {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 150px minmax(0, 1fr);
}

.home-donut,
.home-status-donut {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  position: relative;
}

.home-donut {
  height: 148px;
  width: 148px;
}

.home-donut::after,
.home-status-donut::after {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  position: absolute;
}

.home-donut::after {
  height: 82px;
  width: 82px;
}

.home-donut span,
.home-status-donut span {
  font-weight: 900;
  position: relative;
  text-align: center;
  z-index: 1;
}

.home-donut span {
  font-size: 13px;
  max-width: 76px;
}

.home-donut-list {
  display: grid;
  gap: 8px;
}

.home-donut-row {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: 10px minmax(0, 1fr) max-content;
}

.home-donut-row i,
.home-status-list i,
.home-chart-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.home-donut-row span {
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-donut-row strong {
  font-size: 12px;
}

.home-donut-row small {
  color: #667085;
  grid-column: 2 / -1;
}

.home-table {
  border: 0;
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

.home-table th,
.home-table td {
  border-bottom: 1px solid #eef1f5;
  padding: 8px 7px;
}

.home-table th {
  background: transparent;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.home-table small {
  color: #667085;
  display: block;
  margin-top: 2px;
}

.home-progress {
  background: #eef1f6;
  border-radius: 999px;
  display: inline-flex;
  height: 7px;
  margin-right: 7px;
  overflow: hidden;
  vertical-align: middle;
  width: 60px;
}

.home-progress i {
  background: #7c65f6;
  border-radius: inherit;
  display: block;
}

.home-status-layout {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 128px minmax(0, 1fr);
}

.home-status-donut {
  height: 124px;
  width: 124px;
}

.home-status-donut::after {
  height: 70px;
  width: 70px;
}

.home-status-donut span {
  display: grid;
  gap: 2px;
}

.home-status-donut strong {
  font-size: 22px;
}

.home-status-donut small {
  color: #667085;
  font-size: 11px;
}

.home-status-list {
  display: grid;
  gap: 8px;
}

.home-status-list div {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 10px minmax(0, 1fr) max-content;
}

.home-status-list span,
.home-status-list strong {
  font-size: 12px;
}

.home-status-list span {
  font-weight: 800;
}

.home-status-list small {
  color: #667085;
  grid-column: 2 / -1;
}

.home-link-action {
  background: transparent;
  border: 0;
  color: #4f46e5;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  justify-self: center;
}

.home-cash-chart {
  display: grid;
  gap: 12px;
}

.home-chart-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.home-chart-legend span {
  align-items: center;
  color: #667085;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.home-chart-legend .green {
  background: #31a66f;
}

.home-chart-legend .red {
  background: #ef6f6c;
}

.home-chart-legend .blue {
  background: #5b5ff4;
}

.home-cash-bars {
  align-items: end;
  border-bottom: 1px solid #dfe5ef;
  border-top: 1px solid #eef1f5;
  display: grid;
  gap: 6px;
  grid-auto-flow: column;
  min-height: 210px;
  overflow: hidden;
  padding-top: 16px;
}

.home-cash-day {
  align-items: end;
  display: flex;
  gap: 2px;
  height: 180px;
  justify-content: center;
  min-width: 12px;
  position: relative;
}

.home-cash-day span {
  border-radius: 4px 4px 0 0;
  display: block;
  width: 5px;
}

.home-cash-day .income {
  background: rgba(49, 166, 111, 0.75);
}

.home-cash-day .expense {
  background: rgba(239, 111, 108, 0.65);
}

.home-cash-day i {
  background: #5b5ff4;
  border-radius: 999px;
  height: 4px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 14px;
}

.home-cash-day small {
  bottom: -22px;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.home-tasks {
  display: grid;
  gap: 8px;
}

.home-task {
  align-items: center;
  background: #fbfcff;
  border: 1px solid #e6ebf4;
  border-radius: 8px;
  color: #182033;
  cursor: pointer;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 32px minmax(0, 1fr) max-content;
  min-height: 58px;
  padding: 8px 10px;
  text-align: left;
}

.home-task span {
  align-items: center;
  background: #eef2ff;
  border-radius: 8px;
  color: #4f46e5;
  display: inline-flex;
  font-weight: 900;
  grid-row: span 2;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.home-task strong {
  font-size: 12px;
}

.home-task small {
  color: #667085;
  font-size: 11px;
}

.home-task em {
  color: #f97316;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  grid-column: 3;
  grid-row: 1 / span 2;
}

.home-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.home-events {
  display: grid;
  gap: 10px;
}

.home-event {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
}

.home-event > span {
  align-items: center;
  background: #eef2ff;
  border-radius: 10px;
  color: #4f46e5;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.home-event strong {
  font-size: 12px;
}

.home-event p,
.home-event small {
  color: #667085;
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin: 2px 0 0;
}

.home-finance-box {
  display: grid;
  gap: 9px;
}

.home-finance-box div {
  align-items: center;
  border-bottom: 1px solid #eef1f5;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-bottom: 8px;
}

.home-finance-box div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.home-finance-box span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.home-finance-box strong {
  font-size: 13px;
}

.stat,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.stat span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.stat strong {
  display: block;
  font-size: 24px;
  margin-top: 7px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef1f5;
  font-weight: 700;
}

.status {
  display: inline-block;
  border-radius: 999px;
  background: #eef8f1;
  color: var(--accent-dark);
  padding: 3px 9px;
  font-size: 13px;
}

.status.success {
  background: #e8f7ef;
  color: #047857;
}

.status.warning {
  background: #fff7df;
  color: #a15c00;
}

.status.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.status.danger {
  background: #ffe8e8;
  color: #b42318;
}

.site-request-state {
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}

.site-request-history-states {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.site-request-state-reserved {
  background: #f2ecff;
  border-color: #c8b6ff;
  color: #5b21b6;
}

.site-request-state-unpaid {
  background: #fff2d6;
  border-color: #f4c45f;
  color: #8a4b00;
}

.site-request-state-sold {
  background: #e7f0ff;
  border-color: #aecbfa;
  color: #1d4ed8;
}

.site-request-state-paid {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.site-request-state-cancelled {
  background: #ffe4e4;
  border-color: #f0a8a8;
  color: #b42318;
}

.site-request-state-converted {
  background: #eef1f5;
  border-color: #d5dce5;
  color: #344054;
}

.warning {
  color: var(--warn);
  font-weight: 700;
}

.success {
  color: var(--accent-dark);
  font-weight: 700;
}

@media (max-width: 1250px) {
  .bank-cashier-workspace {
    grid-template-columns: 1fr;
  }

  .bank-allocation-panel {
    position: static;
  }

  body[data-current-view="bankPayments"] .bank-fop-card-grid,
  body[data-current-view="bankPayments"] .bank-kpi-grid,
  body[data-current-view="bankPayments"] .bank-fop-tabs,
  body[data-current-view="bankPayments"] .bank-channel-filter,
  body[data-current-view="bankPayments"] .bank-status-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-stats {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .analytics-command,
  .analytics-config,
  .analytics-layout,
  .analytics-mini-grid,
  .analytics-report-head,
  .analytics-filter-panel,
  .analytics-dashboard-layout,
  .analytics-customizer-grid,
  .home-head,
  .home-layout,
  .home-donut-layout,
  .home-status-layout,
  .dashboard-main,
  .customer-layout,
  .integration-overview-main,
  .integration-command-center,
  .integration-grid,
  .integration-kpi-grid,
  .integration-workspace-shell,
  .integration-provider-hero,
  .integration-provider-hero-stats,
  .integration-work-card-head,
  .integration-work-section-head,
  .integration-work-fields,
  .integration-state-summary,
  .integration-state-row,
  .integration-profiles-head,
  .integration-profile-picker,
  .integration-profile-card-head,
  .integration-profile-sections,
  .integration-profile-fields,
  .integration-fop-summary,
  .integration-fop-grid,
  .integration-fop-card-head,
  .integration-fop-fields,
  .integration-roadmap,
  .price-list-builder,
  .reorder-hero,
  .supplier-directory,
  .supplier-documents-workspace,
  .supplier-order-layout,
  .site-request-layout,
  .warehouse-analytics-grid,
  .warehouse-dashboard-layout,
  .warehouse-focused-layout,
  .orders-smart-layout,
  .orders-smart-insights,
  .site-request-smart-filters,
  .site-request-smart-stats,
  .site-requests-smart-layout {
    grid-template-columns: 1fr;
  }

  .bank-test-form,
  .bank-match-grid,
  .bank-sync-panel,
  .bank-manual-row {
    grid-template-columns: 1fr;
  }

  .customer-segment-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .bank-test-form .span-2 {
    grid-column: auto;
  }

  .warehouse-kpi-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .warehouse-side-column {
    position: static;
  }

  .supplier-directory-card {
    max-height: none;
    position: static;
  }

  .supplier-document-card {
    max-height: none;
    position: static;
  }

  .unified-document-row {
    grid-template-columns: 1fr;
  }

  .unified-document-side {
    justify-items: start;
    text-align: left;
  }

  .unified-document-actions {
    justify-content: flex-start;
  }

  .group-manager-grid {
    grid-template-columns: 1fr;
  }

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

  .supplier-order-head-grid {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 0.45fr);
  }

  .order-filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .site-request-filters {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .order-work-tabs {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .order-summary {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .analytics-stats {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .analytics-kpi-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .home-kpi-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .home-plan-panel {
    grid-template-columns: 1fr;
  }

  .home-card.span-3,
  .home-card.span-4,
  .home-card.span-5 {
    grid-column: span 6;
  }

  .analytics-report-card.span-4,
  .analytics-report-card.span-5,
  .analytics-report-card.span-6,
  .analytics-report-card.span-7 {
    grid-column: span 6;
  }

  .analytics-ai-panel {
    position: static;
  }

  .order-catalog-dialog {
    grid-template-rows: auto auto auto;
    overflow: auto;
  }

  .order-catalog-layout {
    grid-template-columns: 1fr;
  }

  .order-catalog-main {
    min-height: 540px;
  }

  .order-recommendations-panel.compact .order-recommendations-grid {
    grid-auto-columns: minmax(240px, calc((100% - 8px) / 2));
  }

  .cash-layout,
  .cash-filter-panel,
  .cash-kpi-grid,
  .finance-focus-grid,
  .analytics-workspace-focus,
  .crm-interaction-form,
  .employee-payment-edit-form,
  .finance-review-row {
    grid-template-columns: 1fr;
  }

  .employee-payment-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .write-off-journal .compact-kpis {
    min-width: 0;
  }

  .order-catalog-sidebar,
  .order-catalog-cart-panel {
    max-height: none;
  }

  .customer-list {
    position: static;
  }
}

@media (min-width: 1100px) and (max-width: 1250px) {
  .order-catalog-dialog {
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
  }

  .order-catalog-layout {
    grid-template-columns: minmax(190px, 220px) minmax(0, 1fr) minmax(270px, 300px);
  }

  .order-catalog-main {
    min-height: 0;
  }
}

@media (min-width: 801px) and (max-width: 1099px) {
  .order-catalog-layout {
    min-height: max-content;
    overflow: visible;
  }

  .order-catalog-sidebar {
    height: min(320px, 38dvh);
    max-height: min(320px, 38dvh);
  }

  .order-catalog-main {
    min-height: min(620px, 70dvh);
  }

  .order-catalog-cart-panel {
    max-height: min(520px, 70dvh);
    min-height: min(360px, 45dvh);
  }
}

@media (max-width: 800px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    height: auto;
    max-height: none;
  }

  nav {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  }

  .main-nav {
    grid-template-columns: 1fr;
  }

  .nav-subitems {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  nav button {
    text-align: center;
    padding: 8px;
  }

  .nav-subitems button {
    padding: 8px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .period-lock-body {
    grid-template-columns: 1fr;
  }

  .accounting-health-header,
  .accounting-health-item {
    grid-template-columns: 1fr;
  }

  .accounting-health-header {
    flex-direction: column;
  }

  .accounting-health-summary {
    grid-template-columns: 1fr;
  }

  .accounting-health-item > div:last-child {
    text-align: left;
  }

  .customer-segment-grid {
    grid-template-columns: 1fr;
  }

  .analytics-command,
  .dashboard-command,
  .site-request-command {
    align-items: stretch;
    flex-direction: column;
  }

  .site-request-dialog {
    max-height: calc(100vh - 24px);
    width: min(100%, calc(100vw - 20px));
  }

  .site-request-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .order-catalog-backdrop {
    padding: 8px;
  }

  .order-catalog-dialog {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 10px;
    width: calc(100vw - 16px);
  }

  .order-catalog-layout {
    min-height: max-content;
    overflow: visible;
  }

  .order-catalog-sidebar {
    height: min(300px, 42dvh);
    max-height: min(300px, 42dvh);
  }

  .order-catalog-main {
    min-height: min(620px, 72dvh);
  }

  .order-catalog-cart-panel {
    min-height: min(320px, 50dvh);
  }

  .order-catalog-header,
  .order-catalog-header-actions,
  .order-catalog-toolbar,
  .order-catalog-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .order-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .order-recommendations-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-recommendations-grid,
  .order-catalog-recommendations-panel .order-recommendations-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .order-recommendations-panel.compact .order-recommendations-grid {
    grid-auto-columns: minmax(240px, 86vw);
    grid-template-columns: none;
  }

  .order-recommendation-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .order-recommendation-card .primary.small {
    grid-column: 1 / -1;
  }

  .order-catalog-card-actions,
  .order-edit-catalog-entry,
  .invoice-add-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-catalog-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .invoice-add-actions {
    justify-items: stretch;
  }

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

  .delivery-dialog-actions {
    grid-template-columns: 1fr;
  }

  .delivery-dialog {
    max-height: calc(100vh - 24px);
    width: min(100%, calc(100vw - 20px));
  }

  .catalog-command,
  .draft-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

  .analytics-stats,
  .dashboard-stats,
  .dashboard-main {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .analytics-filters,
  .analytics-report-head,
  .analytics-filter-panel,
  .analytics-dashboard-layout,
  .analytics-customizer-grid,
  .analytics-main-grid,
  .analytics-ops-grid,
  .analytics-channel-layout,
  .home-head,
  .home-layout,
  .home-main-grid,
  .home-kpi-grid,
  .home-donut-layout,
  .home-status-layout,
  .catalog-workspace,
  .catalog-toolbar,
  .category-create,
  .integration-fields,
  .orders-smart-filters,
  .orders-smart-layout,
  .orders-smart-insights,
  .site-request-smart-filters,
  .site-request-smart-stats,
  .site-requests-smart-layout,
  .warehouse-kpi-grid,
  .warehouse-analytics-grid,
  .warehouse-dashboard-layout,
  .warehouse-focused-layout,
  .warehouse-dashboard-page .warehouse-toolbar,
  .order-detail-layout,
  .order-info-panel,
  .order-work-summary-strip,
  .order-work-core-grid,
  .order-work-quick-facts,
  .order-delivery-grid,
  .bank-test-form,
  .bank-match-grid,
  .bank-sync-panel,
  .bank-manual-row,
  .reorder-stat-grid,
  .site-request-customer,
  .site-request-filters,
  .supplier-order-head-grid,
  .supplier-order-summary-cards,
  .store-integration-grid {
    grid-template-columns: 1fr;
  }

  .bank-test-form .span-2 {
    grid-column: auto;
  }

  .analytics-kpi-grid {
    grid-template-columns: 1fr;
  }

  .analytics-filter-actions,
  .analytics-period-buttons,
  .analytics-card-head,
  .home-head-actions,
  .home-title-row,
  .home-plan-edit,
  .home-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .home-plan-edit {
    display: grid;
    grid-template-columns: 1fr;
  }

  .analytics-filter-actions {
    justify-content: flex-start;
  }

  .analytics-report-card.span-4,
  .analytics-report-card.span-5,
  .analytics-report-card.span-6,
  .analytics-report-card.span-7,
  .analytics-report-card.span-8,
  .analytics-report-card.span-12 {
    grid-column: 1 / -1;
  }

  .home-card.span-3,
  .home-card.span-4,
  .home-card.span-5 {
    grid-column: 1 / -1;
  }

  .home-period-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .home-period-tabs button {
    border-bottom: 1px solid #dfe5ef;
  }

  .home-task {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .home-task em {
    grid-column: 2;
    grid-row: auto;
  }

  .analytics-manager-table th:nth-child(3),
  .analytics-manager-table td:nth-child(3),
  .analytics-manager-table th:nth-child(5),
  .analytics-manager-table td:nth-child(5),
  .analytics-manager-table th:nth-child(6),
  .analytics-manager-table td:nth-child(6),
  .analytics-manager-table th:nth-child(7),
  .analytics-manager-table td:nth-child(7),
  .analytics-control-table th:nth-child(3),
  .analytics-control-table td:nth-child(3),
  .analytics-control-table th:nth-child(4),
  .analytics-control-table td:nth-child(4) {
    display: none;
  }

  .analytics-bar-row {
    grid-template-columns: 1fr;
  }

  .analytics-ops-column {
    border-right: 0;
    border-bottom: 1px solid #eef1f5;
    padding: 0 0 12px;
  }

  .analytics-ops-column:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .reorder-action-bar,
  .supplier-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .reorder-main-actions {
    justify-content: flex-start;
  }

  .catalog-sidebar,
  .catalog-preview {
    position: static;
  }

  .integration-fields label:nth-child(2) {
    grid-column: auto;
  }

  .order-delivery-grid .delivery-wide {
    grid-column: auto;
  }

  .order-delivery-grid .delivery-full {
    grid-column: auto;
  }

  .delivery-payment-hint {
    grid-template-columns: 1fr;
  }

  .delivery-place-grid,
  .delivery-place-grid-head {
    grid-template-columns: 1fr 1fr;
  }

  .order-sale-layout,
  .order-setup-grid,
  .order-product-add,
  .invoice-meta-grid,
  .quick-customer-form {
    grid-template-columns: 1fr;
  }

  .order-create-head {
    align-items: stretch;
    flex-direction: column;
  }

  .orders-smart-head,
  .site-requests-smart-head,
  .warehouse-dashboard-head,
  .warehouse-stock-head,
  .order-detail-top,
  .order-lines-head,
  .orders-smart-toolbar,
  .site-requests-smart-toolbar,
  .orders-section-head,
  .site-requests-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-detail-actions,
  .order-lines-actions {
    justify-content: flex-start;
  }

  .order-line-card {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .order-line-product,
  .order-line-stock-area,
  .order-line-price-type,
  .order-line-qty-area,
  .order-line-menu {
    grid-column: 1 / -1;
  }

  .order-line-money,
  .order-line-upsell {
    grid-column: auto;
  }

  .order-line-menu {
    justify-self: start;
  }

  .order-line-menu > div {
    left: 0;
    right: auto;
  }

  .order-lines-total-card,
  .order-conversation-empty {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .order-conversation-empty {
    display: grid;
  }

  .order-print-menu {
    left: 0;
    right: auto;
    width: min(280px, calc(100vw - 48px));
  }

  .order-detail-side {
    position: static;
  }

  .order-info-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 12px;
  }

  .order-info-column:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .orders-smart-count {
    margin-left: 0;
  }

  .orders-smart-search,
  .site-requests-smart-search {
    flex: 1 1 auto;
    width: 100%;
  }

  .orders-preview-card,
  .site-request-preview-card {
    position: static;
  }

  .order-create-total {
    text-align: left;
  }

  .order-draft-card {
    padding: 12px;
  }

  .draft-actions {
    justify-content: flex-start;
  }

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

  .order-filter-grid,
  .audit-filter-grid,
  .order-summary {
    grid-template-columns: 1fr;
  }

  .order-work-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .journal-payment-stats {
    grid-template-columns: 1fr;
  }

  .order-edit-head,
  .order-edit-add,
  .order-return-actions,
  .return-create-shell,
  .return-mode-tabs,
  .return-document-grid,
  .return-lines-head,
  .return-work-footer,
  .return-work-meta-table,
  .returns-workspace-head,
  .returns-workspace-layout {
    grid-template-columns: 1fr;
  }

  .return-work-top {
    align-items: stretch;
    flex-direction: column;
  }

  .return-work-total {
    text-align: left;
  }

  .return-work-meta-table > div {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .return-work-meta-table > div:last-child {
    border-bottom: 0;
  }

  .return-work-actions {
    justify-content: flex-start;
  }

  .return-work-actions small {
    flex-basis: 100%;
    max-width: none;
  }

  .return-side-panel {
    position: static;
  }

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

  .returns-detail-stack {
    position: static;
  }

  .return-document-meta,
  .return-detail-kpis {
    grid-template-columns: 1fr;
  }

  .customer-layout,
  .customer-edit-form,
  .customer-pay-form,
  .customer-stats,
  .customer-segment-hero,
  .customer-segment-board,
  .customer-history-hero,
  .customer-history-workspace,
  .customer-segment-summary,
  .customer-history-summary,
  .customer-card-metrics,
  .customer-overview-grid,
  .customer-shortcuts > div,
  .customer-reconciliation-filters,
  .customer-reconciliation-summary,
  .crm-extra-filters,
  .customer-danger-zone {
    grid-template-columns: 1fr;
  }

  .customer-card-actions,
  .customer-edit-actions,
  .customer-hero-actions,
  .customer-reconciliation-presets,
  .customer-pay-compact {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-card-actions,
  .customer-edit-actions,
  .customer-hero-actions {
    justify-content: flex-start;
  }

  .crm-date-filters {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .crm-date-filters > small {
    justify-self: start;
    white-space: normal;
  }

  .crm-log-item {
    align-items: start;
    grid-template-areas:
      "kind"
      "main"
      "customer"
      "due"
      "actions";
    grid-template-columns: 1fr;
  }

  .crm-log-actions {
    justify-items: start;
    text-align: left;
  }

  .customer-segment-banner,
  .customer-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .customer-row-money {
    align-items: start;
    justify-items: start;
    text-align: left;
  }

  .customer-list {
    position: static;
  }

  .crm-entry-panel {
    position: static;
  }

  .customer-segment-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
  }

  .customer-segment-action {
    grid-column: 2 / -1;
  }

  .customer-phone-row {
    grid-template-columns: 1fr;
  }

  .customer-contact-row {
    grid-template-columns: 1fr;
  }

  .customer-legal-row {
    grid-template-columns: 1fr;
  }

  .customer-phone-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .purchase-layout,
  .purchase-history,
  .purchase-history.has-selection,
  .purchase-head,
  .purchase-line-form,
  .inventory-document-bar,
  .inventory-layout,
  .mini-stats,
  .supplier-stats,
  .product-finance-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-toolbar,
  .warehouse-admin {
    grid-template-columns: 1fr;
  }

  .location-create-form {
    grid-template-columns: 1fr;
  }

  .warehouse-detail {
    position: static;
  }

  .warehouse-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-title-row,
  .signatures {
    flex-direction: column;
  }

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

/* Customer Base V1. Everything is scoped to keep shared finance, supplier and print UI unchanged. */
.cb2 {
  color: #172033;
  min-width: 0;
}

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

.cb2 .customer-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(286px, 320px) minmax(0, 1fr);
  height: calc(100dvh - 126px);
  min-height: 610px;
  overflow: hidden;
}

.cb2 .customer-list,
.cb2 .customer-card {
  background: #fff;
  border: 1px solid #dbe3ed;
  border-radius: 8px;
  min-width: 0;
}

.cb2 .customer-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  max-height: none;
  overflow: hidden;
  position: static;
  top: auto;
  width: 100%;
}

.cb2 .cb2-list-head {
  border-bottom: 1px solid #e5eaf1;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  padding: 4px 6px;
}

.cb2 .cb2-list-title {
  align-items: center;
  display: flex;
  height: 25px;
  justify-content: space-between;
}

.cb2 .cb2-list-title h2 {
  font-size: 15px;
  line-height: 1;
  margin: 0;
}

.cb2 .cb2-list-title h2 span {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.cb2 .cb2-list-title .small {
  min-height: 26px;
  padding: 4px 9px;
}

.cb2 .cb2-search {
  align-items: center;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  height: 30px;
  margin: 0;
  position: relative;
}

.cb2 .cb2-search > span {
  color: #667085;
  font-size: 19px;
  left: 8px;
  pointer-events: none;
  position: absolute;
  top: 4px;
  z-index: 1;
}

.cb2 .cb2-search input {
  grid-column: 1 / -1;
  height: 30px;
  min-height: 30px;
  min-width: 0;
  padding: 5px 8px 5px 28px;
  width: 100%;
}

.cb2 .customer-history-filter-row {
  background: #eef2f6;
  border-radius: 6px;
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 26px;
  padding: 2px;
}

.cb2 .customer-history-filter-row button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #475467;
  font-size: 11px;
  min-height: 22px;
  overflow: hidden;
  padding: 2px 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb2 .customer-history-filter-row button.is-active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
  color: #155eef;
  font-weight: 700;
}

.cb2 .customer-history-filter-row small {
  font-size: 10px;
}

.cb2 .cb2-list-selects {
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
}

.cb2 .cb2-list-selects select {
  font-size: 11px;
  height: 30px;
  min-height: 30px;
  min-width: 0;
  padding: 4px 22px 4px 7px;
}

.cb2 .customer-segment-banner {
  font-size: 11px;
  margin: 0;
  min-height: 26px;
  padding: 4px 6px;
}

.cb2 .customer-list-items {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
  max-height: none;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 0 8px;
}

.cb2 .customer-row {
  border-bottom: 1px solid #edf1f5;
  flex: 0 0 52px;
  height: 52px;
  min-height: 52px;
  position: relative;
}

.cb2 .customer-row::before {
  background: transparent;
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 3px;
}

.cb2 .customer-row:hover {
  background: #f7f9fc;
}

.cb2 .customer-row.active {
  background: #edf4ff;
}

.cb2 .customer-row.active::before {
  background: #2563eb;
}

.cb2 .customer-row-main {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  height: 100%;
  min-width: 0;
  padding: 5px 29px 5px 10px;
  text-align: left;
  width: 100%;
}

.cb2 .cb2-row-copy {
  min-width: 0;
}

.cb2 .cb2-row-copy > strong {
  align-items: center;
  display: flex;
  font-size: 13px;
  gap: 5px;
  line-height: 16px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb2 .cb2-note-mark {
  align-items: center;
  background: #fff0c2;
  border: 1px solid #f4c542;
  border-radius: 50%;
  color: #8a4b00;
  display: inline-flex;
  flex: 0 0 16px;
  font-size: 10px;
  font-style: normal;
  height: 16px;
  justify-content: center;
}

.cb2 .customer-row-meta {
  color: #667085;
  display: block;
  font-size: 11px;
  line-height: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb2 .customer-row-meta em {
  color: #9a6700;
  font-style: normal;
}

.cb2 .customer-row-money {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  line-height: 14px;
  white-space: nowrap;
}

.cb2 .customer-row-money .debt {
  color: #b42318;
}

.cb2 .customer-row-money .credit {
  color: #067647;
}

.cb2 .cb2-row-menu-button {
  background: transparent;
  border: 0;
  color: #667085;
  font-size: 11px;
  height: 28px;
  opacity: 0;
  padding: 0;
  position: absolute;
  right: 2px;
  top: 13px;
  width: 26px;
}

.cb2 .customer-row:hover .cb2-row-menu-button,
.cb2 .customer-row:focus-within .cb2-row-menu-button,
.cb2 .customer-row.active .cb2-row-menu-button {
  opacity: 1;
}

.cb2 .cb2-row-menu {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
  display: flex;
  flex-direction: column;
  max-height: 360px;
  min-width: 210px;
  overflow-y: auto;
  padding: 5px;
  position: absolute;
  right: 4px;
  top: 42px;
  z-index: 30;
}

.cb2 .cb2-row-menu strong {
  color: #667085;
  font-size: 10px;
  padding: 7px 8px 3px;
  text-transform: uppercase;
}

.cb2 .cb2-row-menu button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #344054;
  font-size: 12px;
  min-height: 28px;
  padding: 5px 8px;
  text-align: left;
}

.cb2 .cb2-row-menu button:hover {
  background: #f2f4f7;
}

.cb2 .customer-card {
  display: block;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: auto;
  position: relative;
  width: 100%;
}

.cb2 .cb2-empty-card {
  align-items: center;
  display: flex;
  justify-content: center;
}

.cb2 .cb2-card-sticky {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #e4e7ec;
  position: sticky;
  top: 0;
  z-index: 12;
}

.cb2 .customer-card-hero {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 14px 8px;
}

.cb2 .cb2-customer-identity {
  min-width: 0;
}

.cb2 .cb2-customer-identity h2 {
  font-size: 20px;
  line-height: 25px;
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}

.cb2 .cb2-identity-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cb2 .cb2-phone {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.cb2 .cb2-phone b {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.cb2 .cb2-phone button,
.cb2 .cb2-call {
  background: transparent;
  border: 0;
  color: #155eef;
  font-size: 11px;
  min-height: 24px;
  padding: 2px 4px;
  text-decoration: none;
}

.cb2 .cb2-chip {
  background: #f2f4f7;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #344054;
  font-size: 10px;
  min-height: 22px;
  padding: 3px 7px;
}

.cb2 button.cb2-chip {
  cursor: pointer;
}

.cb2 .cb2-chip.is-warning {
  background: #fff7dc;
  border-color: #f4c542;
  color: #7a4a00;
}

.cb2 .customer-hero-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  position: relative;
}

.cb2 .cb2-card-menu {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
  display: flex;
  flex-direction: column;
  min-width: 240px;
  padding: 5px;
  position: absolute;
  right: 0;
  top: 38px;
  z-index: 25;
}

.cb2 .cb2-card-menu button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  min-height: 32px;
  padding: 6px 9px;
  text-align: left;
}

.cb2 .cb2-card-menu button:hover:not(:disabled) {
  background: #f2f4f7;
}

.cb2 .customer-internal-note-alert {
  border-left-width: 3px;
  margin: 0 14px 8px;
  padding: 7px 9px;
}

.cb2 .customer-internal-note-alert strong {
  font-size: 12px;
}

.cb2 .cb2-metrics {
  border-top: 1px solid #edf1f5;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cb2 .cb2-metrics > button,
.cb2 .cb2-metrics > div {
  background: #fff;
  border: 0;
  border-right: 1px solid #edf1f5;
  color: #344054;
  display: flex;
  flex-direction: column;
  min-height: 68px;
  min-width: 0;
  padding: 8px 9px;
  text-align: left;
}

.cb2 .cb2-metrics > button:hover {
  background: #f7f9fc;
}

.cb2 .cb2-metrics > :last-child {
  border-right: 0;
}

.cb2 .cb2-metrics span,
.cb2 .cb2-metrics small {
  color: #667085;
  font-size: 10px;
  line-height: 12px;
}

.cb2 .cb2-metrics strong {
  color: #101828;
  font-size: 14px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb2 .cb2-metrics .danger strong {
  color: #b42318;
}

.cb2 .cb2-metrics .success strong {
  color: #067647;
}

.cb2 .cb2-no-history {
  align-items: center;
  border-top: 1px solid #edf1f5;
  display: flex;
  gap: 8px;
  padding: 9px 14px;
}

.cb2 .cb2-no-history span {
  color: #667085;
  font-size: 12px;
}

.cb2 .cb2-tabs {
  border-top: 1px solid #edf1f5;
  display: flex;
  min-height: 38px;
  overflow-x: auto;
  padding: 0 12px;
}

.cb2 .cb2-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #667085;
  font-size: 13px;
  min-height: 38px;
  padding: 7px 11px;
  white-space: nowrap;
}

.cb2 .cb2-tabs button.is-active {
  border-bottom-color: #2563eb;
  color: #155eef;
  font-weight: 700;
}

.cb2 .cb2-tabs small {
  font-size: 10px;
}

.cb2 .cb2-card-body {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 250px;
  min-width: 0;
}

.cb2 .cb2-tab-content {
  min-width: 0;
  padding: 14px;
}

.cb2 .cb2-profile {
  border-left: 1px solid #e4e7ec;
  min-width: 0;
  padding: 12px;
}

.cb2 .cb2-profile-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cb2 .cb2-profile > div:not(.cb2-profile-head),
.cb2 .cb2-rating {
  border-bottom: 1px solid #edf1f5;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 0;
}

.cb2 .cb2-profile span,
.cb2 .cb2-profile small,
.cb2 .cb2-profile em {
  color: #667085;
  font-size: 11px;
  font-style: normal;
  line-height: 14px;
}

.cb2 .cb2-profile strong {
  font-size: 13px;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.cb2 .cb2-profile-missing {
  background: #f7f9fc;
  border-radius: 6px;
  margin: 7px 0;
  padding: 8px !important;
}

.cb2 .cb2-rating {
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  margin-top: 8px;
  padding: 9px;
}

.cb2 .cb2-section-head,
.cb2 .panel-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 9px;
}

.cb2 .cb2-section-head h3,
.cb2 .panel-head h3,
.cb2 .panel-head h2 {
  font-size: 15px;
  line-height: 20px;
  margin: 0;
}

.cb2 .cb2-section-head p,
.cb2 .panel-head p {
  color: #667085;
  font-size: 11px;
  margin: 1px 0 0;
}

.cb2 .cb2-table-wrap,
.cb2 .customer-reconciliation-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.cb2 .cb2-unpaid-table,
.cb2 .cb2-purchase-table,
.cb2 .customer-reconciliation-table {
  min-width: 620px;
  width: 100%;
}

.cb2 .cb2-unpaid-table tr.is-selected {
  background: #eff8ff;
}

.cb2 .cb2-selection-summary,
.cb2 .cb2-empty-row,
.cb2 .cb2-documents-more {
  align-items: center;
  background: #f7f9fc;
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 9px;
}

.cb2 .customer-reconciliation-panel {
  border-top: 1px solid #dfe5ec;
  margin-top: 16px;
  padding-top: 14px;
}

.cb2 .customer-reconciliation-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cb2 .cb2-document-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.cb2 .cb2-document-filters button {
  background: #f2f4f7;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #475467;
  font-size: 11px;
  min-height: 28px;
  padding: 4px 9px;
}

.cb2 .cb2-document-filters button.is-active {
  background: #eaf2ff;
  border-color: #84adff;
  color: #155eef;
  font-weight: 700;
}

.cb2 .unified-document-list {
  display: flex;
  flex-direction: column;
}

.cb2 .unified-document-row {
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  display: grid;
  gap: 10px;
  grid-template-columns: 150px minmax(0, 1fr) 165px;
  min-width: 0;
  padding: 9px 0;
}

.cb2 .unified-document-main,
.cb2 .unified-document-type,
.cb2 .unified-document-side {
  min-width: 0;
}

.cb2 .unified-document-main > strong,
.cb2 .unified-document-main > span,
.cb2 .unified-document-main > small {
  display: block;
  overflow-wrap: anywhere;
}

.cb2 .unified-document-side {
  text-align: right;
}

.cb2 .unified-document-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cb2 .cb2-activity-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cb2 .cb2-activity-actions label {
  align-items: center;
  display: inline-flex;
  flex-direction: row;
  font-size: 11px;
  gap: 5px;
}

.cb2 .cb2-activity-month h4 {
  color: #475467;
  font-size: 12px;
  margin: 14px 0 4px;
  text-transform: capitalize;
}

.cb2 .customer-activity-item {
  grid-template-columns: 130px minmax(0, 1fr);
}

.cb2 .cb2-backdrop,
.cb2 .cb2-drawer-backdrop {
  background: rgba(16, 24, 40, 0.46);
  inset: 0;
  position: fixed;
  z-index: 1100;
}

.cb2 .cb2-dialog {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  box-shadow: 0 24px 56px rgba(16, 24, 40, 0.24);
  left: 50%;
  max-height: calc(100dvh - 40px);
  max-width: calc(100vw - 32px);
  overflow-y: auto;
  padding: 16px;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 680px;
  z-index: 1101;
}

.cb2 .cb2-dialog-head,
.cb2 .cb2-drawer-head {
  align-items: flex-start;
  border-bottom: 1px solid #e4e7ec;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.cb2 .cb2-dialog-head h2,
.cb2 .cb2-drawer-head h2,
.cb2 .cb2-unsaved-dialog h2 {
  font-size: 18px;
  margin: 1px 0;
}

.cb2 .cb2-dialog-head p {
  color: #667085;
  font-size: 11px;
  margin: 2px 0 0;
}

.cb2 .cb2-dialog-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.cb2 .cb2-three-actions {
  justify-content: space-between;
}

.cb2 .cb2-confirm-layer {
  z-index: 1210;
}

.cb2 .cb2-confirm-layer .cb2-dialog {
  z-index: 1211;
}

.cb2 .cb2-quick-create {
  width: 460px;
}

.cb2 .cb2-payment-dialog {
  width: 760px;
}

.cb2 .customer-pay-form {
  display: block;
}

.cb2 .cb2-payment-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cb2 .customer-payment-suggestions {
  border: 1px solid #dfe5ec;
  border-radius: 6px;
  display: block;
  margin: 10px 0;
  overflow: hidden;
}

.cb2 .cb2-payment-select-all,
.cb2 .cb2-payment-invoices label {
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  display: grid;
  gap: 8px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  margin: 0;
  min-height: 40px;
  padding: 5px 8px;
}

.cb2 .cb2-payment-select-all {
  background: #f7f9fc;
  grid-template-columns: 18px minmax(0, 1fr);
}

.cb2 .cb2-payment-invoices label.active {
  background: #eff8ff;
}

.cb2 .cb2-payment-select-all input[type="checkbox"],
.cb2 .cb2-payment-invoices input[type="checkbox"] {
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  width: 16px;
}

.cb2 .cb2-settlements input[type="checkbox"] {
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  width: 16px;
}

.cb2 .cb2-payment-select-all span,
.cb2 .cb2-payment-invoices label span {
  display: flex;
  flex-direction: column;
}

.cb2 .cb2-payment-select-all small,
.cb2 .cb2-payment-invoices small {
  color: #667085;
  font-size: 10px;
}

.cb2 .selected-payment-sum,
.cb2 .cb2-payment-rule {
  color: #475467;
  display: block;
  font-size: 11px;
  padding: 8px 9px;
}

.cb2 .cb2-payment-rule {
  background: #fff7dc;
  border: 1px solid #f4c542;
  border-radius: 6px;
  margin-top: 10px;
}

.cb2 .cb2-payment-summary {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.cb2 .cb2-payment-summary span {
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.cb2 .cb2-payment-summary small {
  color: #667085;
  font-size: 10px;
}

.cb2 .cb2-drawer {
  background: #fff;
  bottom: 0;
  box-shadow: -18px 0 48px rgba(16, 24, 40, 0.2);
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow: hidden;
  position: fixed;
  right: 0;
  top: 0;
  width: min(620px, 100vw);
  z-index: 1101;
}

.cb2 .cb2-drawer > form,
.cb2 .cb2-drawer > .customer-payment-editor {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.cb2 .cb2-drawer-head {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 16px;
}

.cb2 .cb2-drawer-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 24px;
}

.cb2 .cb2-drawer-footer {
  align-items: center;
  background: #fff;
  border-top: 1px solid #d0d5dd;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  justify-content: space-between;
  min-height: 62px;
  padding: 10px 16px;
}

.cb2 .cb2-drawer-footer > span {
  color: #667085;
  font-size: 11px;
}

.cb2 .cb2-drawer-footer > span.is-dirty {
  color: #b54708;
  font-weight: 700;
}

.cb2 .cb2-drawer-footer > div {
  display: flex;
  gap: 8px;
}

.cb2 .cb2-customer-editor details {
  border: 1px solid #dfe5ec;
  border-radius: 6px;
}

.cb2 .cb2-customer-editor details > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 10px;
}

.cb2 .cb2-customer-editor details > summary small {
  color: #667085;
  float: right;
  font-size: 10px;
  font-weight: 400;
}

.cb2 .cb2-edit-section {
  border-top: 1px solid #edf1f5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

.cb2 .customer-phone-row,
.cb2 .customer-contact-row,
.cb2 .customer-legal-row {
  grid-template-columns: minmax(90px, 0.8fr) minmax(140px, 1.2fr) minmax(120px, 1fr) auto;
}

.cb2 .customer-contact-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cb2 .customer-contact-row .danger-button {
  justify-self: start;
}

.cb2 .customer-legal-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cb2 .customer-payment-editor {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow-y: auto;
  padding: 16px;
}

.cb2 .customer-payment-editor-list {
  max-height: none;
}

.cb2 .cb2-payment-allocation-group h3 {
  color: #475467;
  font-size: 12px;
  margin: 12px 0 6px;
}

.cb2 .customer-payment-editor-actions {
  background: #fff;
  bottom: -16px;
  position: sticky;
  z-index: 2;
}

.cb2 .customer-group-manager-dialog {
  width: min(860px, calc(100vw - 32px));
}

.cb2 .customer-group-admin-list {
  max-height: 46dvh;
  overflow-y: auto;
}

.cb2 .customer-group-member-list {
  max-height: 220px;
  overflow-y: auto;
}

.cb2 .cb2-group-add {
  background: #f7f9fc;
  border: 1px solid #dfe5ec;
  border-radius: 6px;
  margin: 10px 0;
  padding: 10px;
}

.cb2 .cb2-group-candidates {
  background: #fff;
  border: 1px solid #dfe5ec;
  max-height: 210px;
  overflow-y: auto;
  margin: 7px 0;
}

.cb2 .cb2-group-candidates label {
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  display: grid;
  gap: 8px;
  grid-template-columns: 18px minmax(0, 1fr);
  margin: 0;
  padding: 6px 8px;
}

.cb2 .cb2-group-candidates span {
  display: flex;
  flex-direction: column;
}

.cb2 .cb2-group-candidates small {
  color: #667085;
  font-size: 10px;
}

@media (max-width: 1380px) {
  .cb2 .cb2-card-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .cb2 .cb2-profile {
    border-left: 0;
    border-top: 1px solid #e4e7ec;
    display: grid;
    gap: 0 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cb2 .cb2-profile-head,
  .cb2 .cb2-profile-missing,
  .cb2 .cb2-rating {
    grid-column: 1 / -1;
  }

  .cb2 .cb2-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cb2 .cb2-metrics > :nth-child(4) {
    border-right: 0;
  }

  .cb2 .cb2-metrics > :nth-child(n+5) {
    border-top: 1px solid #edf1f5;
  }
}

@media (max-width: 1025px) {
  .cb2 .customer-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .cb2 .customer-list {
    max-height: 350px;
    min-height: 300px;
  }

  .cb2 .customer-card {
    height: auto;
    min-height: 620px;
    overflow: visible;
  }

  .cb2 .cb2-card-sticky {
    top: var(--app-header-height, 0);
  }
}

@media (max-width: 768px) {
  .cb2 .customer-card-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .cb2 .customer-hero-actions {
    flex-wrap: wrap;
  }

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

  .cb2 .cb2-metrics > * {
    border-bottom: 1px solid #edf1f5;
  }

  .cb2 .cb2-profile {
    grid-template-columns: minmax(0, 1fr);
  }

  .cb2 .cb2-profile > * {
    grid-column: 1;
  }

  .cb2 .unified-document-row {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .cb2 .unified-document-main {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .cb2 .cb2-payment-grid,
  .cb2 .customer-reconciliation-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .cb2 .cb2-payment-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cb2 .cb2-dialog {
    max-height: calc(100dvh - 16px);
    max-width: calc(100vw - 16px);
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .cb2 .customer-list {
    max-height: 330px;
    min-height: 280px;
  }

  .cb2 .cb2-list-selects {
    grid-template-columns: minmax(0, 1fr);
  }

  .cb2 .cb2-list-head {
    gap: 5px;
  }

  .cb2 .customer-row {
    flex-basis: 58px;
    height: 58px;
    min-height: 58px;
  }

  .cb2 .customer-card-hero,
  .cb2 .cb2-tab-content,
  .cb2 .cb2-profile {
    padding-left: 10px;
    padding-right: 10px;
  }

  .cb2 .cb2-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .cb2 .cb2-metrics > button,
  .cb2 .cb2-metrics > div {
    border-right: 0;
    min-height: 58px;
  }

  .cb2 .cb2-tabs {
    padding: 0 4px;
  }

  .cb2 .cb2-tabs button {
    padding-left: 8px;
    padding-right: 8px;
  }

  .cb2 .cb2-payment-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .cb2 .cb2-three-actions,
  .cb2 .cb2-dialog-actions,
  .cb2 .cb2-drawer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .cb2 .cb2-drawer-footer > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cb2 .customer-phone-row,
  .cb2 .customer-contact-row,
  .cb2 .customer-legal-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Global Customer Search V1 follow-up */
body.global-customer-search-enabled:not(.auth-required) .topbar {
  display: flex !important;
}

@media (min-width: 1101px) {
  body.global-search-only-topbar .topbar {
    justify-content: flex-end;
    margin-bottom: 10px;
  }

  body.global-search-only-topbar .topbar-title {
    display: none;
  }
}

/* Customer Search V1 */
.global-customer-search-host {
  flex: 0 1 520px;
  margin-left: auto;
  min-width: 300px;
  position: relative;
  width: min(520px, 46vw);
  z-index: 90;
}

.order-customer-lookup {
  align-items: center;
  background: #f7faf8;
  border: 1px solid #cbd8d0;
  border-left: 4px solid #16845b;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(180px, 240px) minmax(280px, 680px);
  margin: 14px 0;
  padding: 14px 16px;
  position: relative;
  z-index: 20;
}

.order-customer-lookup.global-customer-lookup {
  background: transparent;
  border: 0;
  display: block;
  margin: 0;
  padding: 0;
  z-index: auto;
}

.global-customer-lookup .order-customer-lookup-field {
  border-left: 4px solid #16845b;
  min-height: 42px;
}

.global-customer-lookup .order-customer-lookup-dropdown {
  left: auto;
  max-height: min(680px, calc(100dvh - 92px));
  right: 0;
  top: calc(100% + 7px);
  width: min(900px, calc(100vw - 300px));
}

.order-customer-lookup-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-customer-lookup-copy strong {
  color: #173d31;
  font-size: 15px;
}

.order-customer-lookup-copy span {
  color: #607168;
  font-size: 12px;
}

.order-customer-lookup-field {
  align-items: center;
  background: #fff;
  border: 1px solid #9eb7aa;
  border-radius: 7px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 30px;
  min-height: 44px;
  padding: 0 8px 0 12px;
}

.order-customer-lookup-field:focus-within {
  border-color: #16845b;
  box-shadow: 0 0 0 3px rgb(22 132 91 / 14%);
}

.order-customer-lookup-field svg {
  color: #527064;
  height: 18px;
  width: 18px;
}

.order-customer-lookup-field input {
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 14px;
  min-width: 0;
  outline: 0;
  padding: 10px;
  width: 100%;
}

.order-customer-lookup-clear {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #68766f;
  display: inline-flex;
  font-size: 20px;
  height: 28px;
  justify-content: center;
  padding: 0;
  width: 28px;
}

.order-customer-lookup-clear:hover {
  background: #edf2ef;
  color: #1f4033;
}

.order-customer-lookup-clear[hidden] {
  display: none;
}

.order-customer-lookup-dropdown {
  background: #fff;
  border: 1px solid #cbd5d0;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgb(27 45 36 / 18%);
  display: none;
  left: 272px;
  max-height: min(620px, calc(100dvh - 220px));
  overflow: hidden;
  position: absolute;
  right: auto;
  top: calc(100% - 7px);
  width: min(920px, calc(100% - 288px));
  z-index: 80;
}

.order-customer-lookup-dropdown.is-open {
  display: block;
}

.order-customer-lookup-results-head {
  align-items: center;
  border-bottom: 1px solid #e4e9e6;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.order-customer-lookup-results-head > span,
.order-customer-lookup-limit {
  color: #69766f;
  font-size: 12px;
  white-space: nowrap;
}

.order-customer-lookup-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-customer-lookup-filter-chips button {
  background: #f4f6f5;
  border: 1px solid #d7dfdb;
  border-radius: 6px;
  color: #3d4d45;
  min-height: 30px;
  padding: 5px 9px;
}

.order-customer-lookup-filter-chips button.active {
  background: #e4f5ec;
  border-color: #78b899;
  color: #126443;
  font-weight: 700;
}

.order-customer-lookup-result-list {
  max-height: min(520px, calc(100dvh - 300px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.order-customer-lookup-result {
  align-items: start;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf0ee;
  border-radius: 0;
  color: #1d2923;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 14px;
  text-align: left;
  width: 100%;
}

.order-customer-lookup-result:hover,
.order-customer-lookup-result.is-active {
  background: #eff8f3;
}

.order-customer-lookup-result.is-active {
  box-shadow: inset 3px 0 #16845b;
}

.order-customer-lookup-result-main,
.order-customer-lookup-result-contact {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.order-customer-lookup-result-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-customer-lookup-result-title > strong {
  font-size: 14px;
}

.order-customer-lookup-result-title mark {
  background: #fff0a8;
  color: inherit;
  padding: 0 1px;
}

.order-customer-lookup-result-contact {
  color: #68756f;
  font-size: 12px;
  grid-template-columns: repeat(2, minmax(0, max-content));
}

.order-customer-lookup-result-contact .recipient-match {
  color: #925a0a;
  font-weight: 700;
  grid-column: 1 / -1;
}

.order-customer-lookup-channels,
.order-customer-lookup-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lookup-channel,
.lookup-work,
.order-customer-chain-label {
  border-radius: 5px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  padding: 3px 6px;
}

.lookup-channel {
  background: #edf1f5;
  color: #445269;
}

.lookup-channel.channel-prom {
  background: #eaf5ff;
  color: #17669a;
}

.lookup-channel.channel-horoshop {
  background: #e6f6eb;
  color: #176a3e;
}

.lookup-channel.channel-uman {
  background: #fff2df;
  color: #8b5409;
}

.lookup-work.lookup-info {
  background: #e9f1ff;
  color: #315f9d;
}

.lookup-work.lookup-warning {
  background: #fff3d8;
  color: #8a5700;
}

.lookup-work.lookup-danger {
  background: #ffebea;
  color: #a53732;
}

.lookup-work.lookup-muted {
  background: #eef1ef;
  color: #69756f;
}

.order-customer-lookup-active-chips {
  margin-top: 3px;
}

.order-customer-lookup-result-summary {
  align-items: end;
  color: #6b7771;
  display: grid;
  font-size: 11px;
  gap: 3px;
  justify-items: end;
  min-width: 120px;
}

.order-customer-lookup-result-summary strong {
  color: #1c3b2f;
  font-size: 14px;
}

.order-customer-lookup-guide,
.order-customer-lookup-empty {
  color: #66736c;
  display: grid;
  gap: 4px;
  padding: 18px;
  text-align: center;
}

.order-customer-lookup-limit {
  display: block;
  padding: 8px 12px;
}

.order-customer-profile-page {
  display: grid;
  gap: 14px;
}

.order-customer-profile-hero {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #d8dfdb;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 18px 4px;
}

.order-customer-profile-back {
  align-self: start;
}

.order-customer-profile-identity {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  min-width: 0;
}

.order-customer-profile-identity h2 {
  font-size: 25px;
  margin: 3px 0;
}

.order-customer-profile-identity p {
  color: #627069;
  margin: 0;
}

.order-customer-profile-actions {
  display: flex;
  gap: 8px;
}

.order-customer-profile-metrics {
  background: #fff;
  border-bottom: 1px solid #dde3df;
  border-top: 1px solid #dde3df;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.order-customer-profile-metrics > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
}

.order-customer-profile-metrics > div + div {
  border-left: 1px solid #e1e6e3;
}

.order-customer-profile-metrics span,
.order-customer-profile-metrics small {
  color: #66736c;
  font-size: 11px;
}

.order-customer-profile-metrics strong {
  color: #193b2e;
  font-size: 20px;
}

.order-customer-profile-warnings {
  display: grid;
  gap: 8px;
}

.order-customer-profile-warning {
  border: 1px solid #d9dfdc;
  border-left: 4px solid #4f7fb6;
  border-radius: 6px;
  display: grid;
  gap: 5px;
  padding: 11px 14px;
}

.order-customer-profile-warning.warning {
  background: #fff9eb;
  border-left-color: #c98516;
}

.order-customer-profile-warning.info {
  background: #f2f7fc;
}

.order-customer-section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.order-customer-section-head h3 {
  font-size: 17px;
  margin: 2px 0 0;
}

.order-customer-section-head > strong {
  align-items: center;
  background: #edf3ef;
  border-radius: 50%;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.order-customer-active-list,
.order-customer-history-month > div {
  border-top: 1px solid #e2e7e4;
  display: grid;
  margin-top: 12px;
}

.order-customer-history-month + .order-customer-history-month {
  margin-top: 18px;
}

.order-customer-history-month h4 {
  color: #52625a;
  font-size: 13px;
  margin: 16px 0 0;
}

.order-customer-history-row {
  align-items: center;
  border-bottom: 1px solid #e7ebe9;
  display: grid;
  gap: 12px;
  grid-template-columns: 10px minmax(0, 1fr) minmax(130px, auto) auto;
  min-height: 64px;
  padding: 10px 4px;
}

.order-customer-history-row.is-clickable {
  cursor: pointer;
}

.order-customer-history-row.is-clickable:hover {
  background: #f7faf8;
}

.order-customer-history-dot {
  background: #5383b8;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.order-customer-history-row.tone-success .order-customer-history-dot {
  background: #27865d;
}

.order-customer-history-row.tone-warning .order-customer-history-dot {
  background: #c98516;
}

.order-customer-history-row.tone-danger .order-customer-history-dot {
  background: #c74742;
}

.order-customer-history-main,
.order-customer-history-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-customer-history-main > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.order-customer-history-main > span,
.order-customer-history-meta > span {
  color: #69766f;
  font-size: 12px;
}

.order-customer-history-meta {
  justify-items: end;
}

.order-customer-chain-label {
  background: #f1ecff;
  color: #6548a3;
}

.order-customer-empty {
  color: #68756f;
  display: grid;
  gap: 5px;
  padding: 24px 0 10px;
}

.order-customer-history-more {
  margin-top: 14px;
  width: 100%;
}

.global-customer-profile-backdrop {
  align-items: start;
  overflow-y: auto;
  padding: 18px;
  z-index: 230;
}

.global-customer-profile-dialog {
  background: #fff;
  border: 1px solid #d6dfda;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgb(24 42 33 / 30%);
  max-height: calc(100dvh - 36px);
  max-width: 1180px;
  overflow-y: auto;
  width: min(1180px, 100%);
}

.order-customer-profile-page.is-dialog {
  background: #fff;
  gap: 12px;
  margin: 0;
  padding: 14px 16px 18px;
}

.order-customer-profile-page.is-dialog .order-customer-profile-hero {
  padding-top: 4px;
}

@media (max-width: 1100px) {
  .order-customer-lookup {
    grid-template-columns: minmax(160px, 210px) minmax(240px, 1fr);
  }

  .order-customer-lookup-dropdown {
    left: 242px;
  }

  .order-customer-profile-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-customer-profile-metrics > div:nth-child(4) {
    border-left: 0;
    border-top: 1px solid #e1e6e3;
  }

  .order-customer-profile-metrics > div:nth-child(5) {
    border-top: 1px solid #e1e6e3;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
  }

  .global-customer-search-host {
    flex-basis: 100%;
    min-width: 0;
    width: 100%;
  }

  .order-customer-lookup {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .order-customer-lookup-dropdown {
    left: 12px;
    max-height: min(620px, calc(100dvh - 160px));
    right: 12px;
    top: calc(100% - 4px);
    width: auto;
  }

  .global-customer-lookup .order-customer-lookup-dropdown {
    left: 0;
    max-height: min(620px, calc(100dvh - 150px));
    right: 0;
    top: calc(100% + 6px);
    width: auto;
  }

  .global-customer-profile-backdrop {
    padding: 8px;
  }

  .global-customer-profile-dialog {
    max-height: calc(100dvh - 16px);
  }

  .order-customer-lookup-results-head {
    align-items: start;
    display: grid;
  }

  .order-customer-lookup-result {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-customer-lookup-result-contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-customer-lookup-result-summary {
    display: flex;
    justify-content: start;
    min-width: 0;
  }

  .order-customer-profile-hero {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .order-customer-profile-actions {
    flex-wrap: wrap;
  }

  .order-customer-profile-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-customer-profile-metrics > div,
  .order-customer-profile-metrics > div:nth-child(4) {
    border-left: 0;
    border-top: 1px solid #e1e6e3;
  }

  .order-customer-profile-metrics > div:nth-child(even) {
    border-left: 1px solid #e1e6e3;
  }

  .order-customer-history-row {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .order-customer-history-meta,
  .order-customer-history-row > button {
    grid-column: 2;
    justify-items: start;
  }
}

@media (max-width: 430px) {
  .order-customer-lookup {
    margin-left: 0;
    margin-right: 0;
    padding: 12px;
  }

  .order-customer-lookup-filter-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-customer-lookup-filter-chips button {
    min-width: 0;
    white-space: normal;
  }

  .order-customer-profile-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-customer-profile-metrics > div:nth-child(even) {
    border-left: 0;
  }

  .order-customer-lookup.global-customer-lookup {
    padding: 0;
  }

  .order-customer-profile-page.is-dialog {
    padding: 10px;
  }
}

/* Order Screen V1: compact work surface over the existing order contracts. */
.order-workbar {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  gap: 0;
  overflow: visible;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 35;
}

.order-workbar-main {
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns: 46px minmax(210px, 1.2fr) minmax(190px, 1fr) minmax(150px, 0.7fr) auto;
  min-width: 0;
}

.order-workbar .order-back-button {
  align-items: center;
  border: 0;
  border-radius: 0;
  border-right: 1px solid #e5eaf2;
  display: flex;
  font-size: 20px;
  grid-column: auto;
  grid-row: auto;
  justify-content: center;
  min-height: 64px;
  min-width: 46px;
  padding: 0;
}

.order-workbar-identity,
.order-workbar-customer,
.order-workbar-amount {
  align-content: center;
  border-right: 1px solid #e5eaf2;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 12px;
}

.order-workbar-identity > div {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.order-workbar-identity > div > strong {
  font-size: 18px;
  white-space: nowrap;
}

.order-workbar-identity .status,
.order-workbar-identity .uman-journal-status-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-workbar-customer > span,
.order-workbar-amount > span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-workbar-customer > strong,
.order-workbar-amount > strong {
  color: #101828;
  font-size: 15px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-workbar-amount > strong {
  font-size: 18px;
}

.order-workbar-main small {
  color: #667085;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-workbar-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  padding: 8px 10px;
}

.order-workbar-actions .order-action-button {
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
}

.order-workbar-context {
  align-items: center;
  background: #f8fafc;
  border-top: 1px solid #e5eaf2;
  color: #667085;
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 5px 16px;
  min-height: 30px;
  padding: 5px 12px 6px 58px;
}

.order-workbar-context span {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  min-width: 0;
}

.order-workbar-context b {
  color: #344054;
}

.order-workbar-context .status {
  font-size: 10px;
  min-height: 22px;
}

.order-utility-menu {
  position: relative;
}

.order-utility-menu > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 20px;
  height: 38px;
  justify-content: center;
  list-style: none;
  padding: 0;
  width: 38px;
}

.order-utility-menu > summary::-webkit-details-marker {
  display: none;
}

.order-utility-menu-popover {
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  display: grid;
  min-width: 220px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 45;
}

.order-utility-menu-popover button,
.order-utility-menu-popover a {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  display: block;
  font-size: 13px;
  font-weight: 700;
  height: auto;
  padding: 9px 10px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.order-utility-menu-popover button:hover,
.order-utility-menu-popover a:hover {
  background: #f2f4f7;
}

.order-detail-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 324px);
}

.order-detail-side {
  max-height: calc(100dvh - 106px);
  top: 96px;
}

.order-detail-side-stack {
  max-height: calc(100dvh - 106px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.order-next-step-panel {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 62px;
  padding: 9px 12px;
}

.order-next-step-panel > div:first-child {
  gap: 2px;
}

.order-next-step-panel .eyebrow {
  font-size: 10px;
}

.order-next-step-panel > div:first-child > strong {
  font-size: 15px;
}

.order-next-step-panel > div:first-child > span:last-child {
  line-height: 1.25;
}

.order-progress-card {
  padding: 9px 12px 10px;
}

.order-progress-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.order-progress-head > div {
  display: grid;
  gap: 2px;
}

.order-progress-head h3 {
  font-size: 14px;
}

.order-progress-current {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  max-width: 58%;
  text-align: right;
}

.order-detail-main .order-progress-card .order-timeline {
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  margin-top: 8px;
  overflow: visible;
}

.order-detail-main .order-progress-card .order-timeline-step {
  min-width: 0;
  padding: 0 4px;
}

.order-detail-main .order-progress-card .order-timeline-step > span {
  height: 20px;
  width: 20px;
}

.order-detail-main .order-progress-card .order-timeline-step::after {
  left: calc(50% + 11px);
  right: calc(-50% + 11px);
  top: 10px;
}

.order-detail-main .order-progress-card .order-timeline-step strong {
  font-size: 11px;
}

.order-detail-main .order-progress-card .order-timeline-step small {
  font-size: 9px;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-lines-workspace {
  overflow: visible;
}

.order-lines-head {
  background: #ffffff;
  border-radius: 8px 8px 0 0;
  padding: 10px 12px;
}

.order-lines-head h3 {
  font-size: 17px;
}

.order-lines-column-head {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #dce3ec;
  color: #667085;
  display: grid;
  font-size: 10px;
  font-weight: 800;
  gap: 8px 10px;
  grid-template-columns: minmax(240px, 1fr) minmax(116px, auto) minmax(76px, auto) minmax(86px, auto) minmax(92px, auto) 34px;
  padding: 6px 0;
  text-transform: uppercase;
}

.order-lines-column-head span:not(:first-child) {
  text-align: center;
}

.order-lines-list {
  background: #ffffff;
}

.order-lines-total-card {
  margin-top: 8px;
}

.order-lines-save-bar {
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  bottom: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 10px 12px 12px;
  padding: 9px 10px;
  position: sticky;
  z-index: 20;
}

.order-lines-save-bar > div:first-child {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.order-save-state {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.order-save-state::before {
  background: #98a2b3;
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 7px;
  margin-right: 6px;
  width: 7px;
}

.order-save-state.is-dirty {
  color: #9a6700;
}

.order-save-state.is-dirty::before {
  background: #d97706;
}

.order-work-core-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.order-side-collapsible {
  padding: 0;
}

.order-side-collapsible > summary,
.order-danger-zone > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  list-style: none;
  padding: 10px 12px;
}

.order-side-collapsible > summary::-webkit-details-marker,
.order-danger-zone > summary::-webkit-details-marker {
  display: none;
}

.order-side-collapsible > summary span,
.order-danger-zone > summary span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.order-side-collapsible > summary strong,
.order-danger-zone > summary small {
  color: #667085;
  font-size: 11px;
}

.delivery-quote-card-body,
.order-danger-body {
  border-top: 1px solid #e5eaf2;
  padding: 10px 12px 12px;
}

.order-danger-zone {
  border-color: #e5eaf2;
  padding: 0;
}

.order-danger-zone[open] {
  border-color: #fecdd3;
}

.order-detail-side-stack .order-document-row {
  min-height: 38px;
  padding: 6px 8px;
}

.order-detail-side-stack .order-document-list {
  gap: 4px;
}

.order-detail-side-stack .order-finance-total {
  padding: 9px 10px;
}

.order-detail-side-stack .order-finance-total strong {
  font-size: 24px;
}

.order-detail-side-stack .order-finance-row-method strong {
  justify-self: end;
}

.order-finance-card .order-card-section-head .order-payment-marker {
  max-width: 150px;
}

.order-finance-card .order-card-section-head .order-payment-marker::after {
  left: auto;
  max-width: min(260px, calc(100vw - 64px));
  min-width: min(210px, calc(100vw - 64px));
  right: 0;
}

@media (max-width: 1280px) {
  .order-workbar-main {
    grid-template-columns: 44px minmax(190px, 1.1fr) minmax(170px, 1fr) minmax(135px, 0.65fr) auto;
  }

  .order-workbar-context {
    padding-left: 56px;
  }

  .order-workbar-actions .order-action-button span:not(.order-action-icon) {
    display: none;
  }

  .order-line-card,
  .order-lines-column-head {
    grid-template-columns: minmax(220px, 1fr) minmax(112px, auto) minmax(76px, auto) minmax(86px, auto) minmax(88px, auto) 34px;
  }
}

@media (max-width: 1180px) {
  .order-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-detail-side,
  .order-detail-side-stack {
    max-height: none;
  }

  .order-detail-side-stack {
    overflow: visible;
  }

  .order-workbar {
    position: relative;
  }

  .order-workbar-main {
    grid-template-columns: 44px minmax(180px, 1fr) minmax(170px, 1fr) minmax(135px, 0.7fr) auto;
  }

  .order-detail-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .order-workbar-main {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .order-workbar-customer {
    border-top: 1px solid #e5eaf2;
    grid-column: 1 / 3;
  }

  .order-workbar-amount {
    border-top: 1px solid #e5eaf2;
    grid-column: 3;
    grid-row: 2;
  }

  .order-workbar-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .order-workbar-context {
    padding-left: 12px;
  }

  .order-progress-head {
    align-items: flex-start;
    display: grid;
    gap: 5px;
  }

  .order-progress-current {
    max-width: none;
    text-align: left;
  }

  .order-detail-main .order-progress-card .order-timeline {
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    row-gap: 10px;
  }

  .order-detail-main .order-progress-card .order-timeline-step:nth-child(3)::after,
  .order-detail-main .order-progress-card .order-timeline-step:last-child::after {
    display: none;
  }

  .order-lines-column-head {
    display: none;
  }

  .order-lines-save-bar {
    align-items: stretch;
    display: grid;
    position: static;
  }

  .order-lines-save-actions,
  .order-lines-save-actions > button {
    width: 100%;
  }

  .order-detail-side-stack {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .order-workbar-main {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .order-workbar-identity {
    border-right: 0;
  }

  .order-workbar-actions {
    border-top: 1px solid #e5eaf2;
    grid-column: 1 / -1;
    grid-row: auto;
    justify-content: flex-end;
    padding: 6px;
  }

  .order-workbar-customer,
  .order-workbar-amount {
    grid-column: 1 / -1;
  }

  .order-workbar-amount {
    grid-row: auto;
  }

  .order-workbar-context {
    align-items: flex-start;
    display: grid;
    gap: 4px;
  }

  .order-next-step-panel {
    align-items: stretch;
    display: grid;
  }

  .order-next-step-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    width: auto;
  }

  .order-next-step-actions > button {
    width: 100%;
  }

  .order-detail-main .order-progress-card .order-timeline {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  .order-detail-main .order-progress-card .order-timeline-step:nth-child(3)::after {
    display: block;
  }

  .order-detail-main .order-progress-card .order-timeline-step:nth-child(2n)::after {
    display: none;
  }
}

.site-request-contact-meta {
  color: #526070;
  display: grid;
  font-size: 11px;
  gap: 2px;
  line-height: 1.3;
  max-width: 210px;
}

.site-request-contact-meta strong {
  color: #334155;
  font-size: 12px;
}

.site-request-contact-meta.is-overdue,
.site-request-contact-meta.is-overdue strong {
  color: #b42318;
}

.site-request-contact-meta:not(.is-compact) {
  background: #fff8e7;
  border-left: 3px solid #d97706;
  margin: 10px 0;
  max-width: none;
  padding: 8px 10px;
}

.site-request-contact-meta:not(.is-compact).is-overdue {
  background: #fff1f0;
  border-left-color: #d92d20;
}

.site-request-contact-history {
  border-top: 1px solid #e7edf5;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
}

.site-request-contact-history-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.site-request-contact-history-head > div {
  display: grid;
  gap: 2px;
}

.site-request-contact-history-head span,
.site-request-contact-history-head small {
  color: #64748b;
  font-size: 12px;
}

.site-request-contact-history.is-overdue .site-request-contact-history-head small {
  color: #b42318;
  font-weight: 700;
}

.site-request-contact-history details summary {
  color: #4f46e5;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.site-request-contact-attempt-list {
  display: grid;
  margin-top: 6px;
}

.site-request-contact-attempt-list > div {
  border-top: 1px solid #eef2f6;
  display: grid;
  gap: 2px;
  padding: 7px 0;
}

.site-request-contact-attempt-list span,
.site-request-contact-attempt-list small {
  color: #64748b;
  font-size: 11px;
}

@media (max-width: 768px) {
  .site-request-contact-history-head {
    align-items: flex-start;
    display: grid;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  body {
    background: white;
    display: block;
  }

  .sidebar,
  .topbar,
  .order-card,
  .panel:not(.order-card):not(.return-act),
  nav {
    display: none !important;
  }

  .shell {
    padding: 0;
  }

  .print-document {
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 0;
  }

  body.printing-document * {
    visibility: hidden !important;
  }

  body.printing-document .print-active,
  body.printing-document .print-active * {
    visibility: visible !important;
  }

  body.printing-document .print-active {
    display: block !important;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
  }

  body.printing-document .print-document:not(.print-active) {
    display: none !important;
  }

  body.printing-document > :not(.print-root) {
    display: none !important;
  }

  body.printing-document .print-root {
    display: block !important;
    margin: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    position: static !important;
    width: auto !important;
  }

  body.printing-document .print-root,
  body.printing-document .print-root * {
    visibility: visible !important;
  }

  body.printing-document .print-root .print-document {
    border: 0 !important;
    border-radius: 0 !important;
    display: block !important;
    left: auto !important;
    margin: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    position: static !important;
    top: auto !important;
    width: auto !important;
  }

  .document-title-row,
  .signatures {
    break-inside: avoid;
  }

  .receipt-summary {
    grid-template-columns: repeat(4, 1fr);
  }

  .report-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .document-parties,
  .receipt-summary div,
  .official-document-meta {
    border-color: #333;
  }

  .official-requisites {
    grid-template-columns: repeat(3, 1fr);
  }

  .print-document table {
    border-color: #333;
  }

  .print-document th,
  .print-document td {
    border-color: #333;
  }

  .invoice-product-photo {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Final smart order workspace overrides */
.site-request-smart-stats {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.orders-smart-insights {
  grid-template-columns: repeat(8, minmax(118px, 1fr));
}

.erp-status-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.erp-status-tab {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
}

.erp-status-tab strong {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 13px;
  justify-content: center;
  min-width: 28px;
  padding: 3px 8px;
}

.erp-status-tab.active {
  border-color: #2563eb;
  box-shadow: inset 3px 0 0 #2563eb;
  color: #1d4ed8;
}

.erp-status-tab.attention-danger {
  background: #fef2f2;
  border-color: #fecaca;
  box-shadow: inset 3px 0 0 #dc2626;
  color: #991b1b;
}

.erp-status-tab.attention-danger strong {
  background: #fee2e2;
  color: #dc2626;
}

.erp-status-tab.attention-danger.active {
  border-color: #dc2626;
  box-shadow: inset 4px 0 0 #dc2626, 0 10px 24px rgba(220, 38, 38, 0.12);
}

.erp-status-badge,
.erp-finance-badge {
  align-items: center;
  border: 1px solid #d8e0ec;
  border-radius: 7px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  min-height: 24px;
  padding: 3px 8px;
  white-space: nowrap;
}

.order-sla-badge {
  align-items: center;
  border: 1px solid #d8e0ec;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  margin: 3px 4px 0 0;
  min-height: 20px;
  padding: 3px 7px;
  white-space: nowrap;
}

.order-sla-ok {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #15803d;
}

.order-sla-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.order-sla-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.erp-status-blue {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.erp-status-red,
.finance-error,
.finance-unpaid {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.erp-status-orange,
.finance-awaiting,
.finance-prom-awaiting,
.finance-partial {
  background: #ffedd5;
  border-color: #fed7aa;
  color: #c2410c;
}

.erp-status-green,
.finance-paid,
.finance-paid_out {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #15803d;
}

.erp-status-violet {
  background: #f3e8ff;
  border-color: #e9d5ff;
  color: #7c3aed;
}

.site-requests-smart-layout,
.orders-smart-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
}

.site-requests-smart-table {
  min-width: 1180px;
  table-layout: fixed;
  width: 100%;
}

.orders-smart-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.site-requests-smart-table th:first-child,
.site-requests-smart-table td:first-child,
.orders-smart-table.order-work-table th:first-child,
.orders-smart-table.order-work-table td:first-child {
  text-align: left;
  width: auto;
}

.site-requests-smart-table th:nth-child(1) { width: 138px; }
.site-requests-smart-table th:nth-child(2) { width: 190px; }
.site-requests-smart-table th:nth-child(3) { width: 136px; }
.site-requests-smart-table th:nth-child(4) { width: 96px; }
.site-requests-smart-table th:nth-child(5) { width: 176px; }
.site-requests-smart-table th:nth-child(6) { width: 132px; }
.site-requests-smart-table th:nth-child(7) { width: 148px; }
.site-requests-smart-table th:nth-child(8) { width: 140px; }
.site-requests-smart-table th:nth-child(9) { width: 118px; }

.orders-smart-table.order-work-table th:nth-child(1) { width: 11%; }
.orders-smart-table.order-work-table th:nth-child(2) { width: 18%; }
.orders-smart-table.order-work-table th:nth-child(3) { width: 10%; }
.orders-smart-table.order-work-table th:nth-child(4) { width: 14%; }
.orders-smart-table.order-work-table th:nth-child(5) { width: 13%; }
.orders-smart-table.order-work-table th:nth-child(6) { width: 13%; }
.orders-smart-table.order-work-table th:nth-child(7) { width: 15%; }
.orders-smart-table.order-work-table th:nth-child(8) { width: 6%; }

.site-requests-smart-table th,
.site-requests-smart-table td,
.orders-smart-table th,
.orders-smart-table td {
  height: auto;
  line-height: 1.28;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.orders-smart-table.order-work-table th,
.orders-smart-table.order-work-table td {
  font-size: 11px;
  padding: 4px 5px;
}

.orders-smart-table.order-work-table .order-number-link {
  font-size: 12px;
  font-weight: 900;
  padding: 0;
}

.orders-smart-table.order-work-table .order-source-main,
.orders-smart-table.order-work-table .order-row-person {
  color: #111827;
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.orders-smart-table.order-work-table .order-row-date {
  color: #64748b;
  font-size: 10px;
}

.orders-smart-table.order-work-table .order-payment-marker,
.orders-smart-table.order-work-table .order-workflow-badge,
.orders-smart-table.order-work-table .status,
.orders-smart-table.order-work-table .channel-pill,
.orders-smart-table.order-work-table .payment-due-badge {
  font-size: 10px;
  padding: 2px 5px;
}

.orders-smart-table.order-work-table .delivery-badge-table {
  min-width: 0;
  width: 100%;
}

.orders-smart-table.order-work-table th:nth-child(7),
.orders-smart-table.order-work-table td:nth-child(7),
.orders-smart-table.order-work-table th:nth-child(8),
.orders-smart-table.order-work-table td:nth-child(8) {
  background: #fff;
  position: sticky;
  z-index: 3;
}

.orders-smart-table.order-work-table th:nth-child(7),
.orders-smart-table.order-work-table td:nth-child(7) {
  box-shadow: -10px 0 18px rgba(15, 23, 42, 0.06);
  min-width: 148px;
  right: 72px;
}

.orders-smart-table.order-work-table th:nth-child(8),
.orders-smart-table.order-work-table td:nth-child(8) {
  min-width: 72px;
  right: 0;
  text-align: right;
}

.orders-smart-table.order-work-table th:nth-child(7),
.orders-smart-table.order-work-table th:nth-child(8) {
  background: #f8fafc;
  z-index: 5;
}

.orders-smart-table .order-work-row:hover td:nth-child(7),
.orders-smart-table .order-work-row:hover td:nth-child(8) {
  background: #f8faf9;
}

.orders-smart-table.order-work-table .delivery-badge-table span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.orders-smart-table.order-work-table .order-needs-action-chips {
  display: none;
}

.site-requests-smart-table td > strong,
.site-requests-smart-table td > span,
.orders-smart-table td > strong,
.orders-smart-table td > span {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.orders-smart-table td > strong,
.orders-smart-table td > span:not(.status):not(.channel-pill):not(.priority-pill):not(.customer-business-type-badge),
.orders-smart-table .order-delivery-cell,
.orders-smart-table .order-row-sub,
.orders-smart-table .order-row-manager,
.site-requests-smart-table .site-request-row-sub {
  white-space: normal;
}

.orders-smart-table .status,
.orders-smart-table .channel-pill,
.orders-smart-table .priority-pill,
.orders-smart-table .customer-business-type-badge,
.orders-smart-table .customer-internal-note-badge,
.orders-smart-table .order-workflow-badge,
.orders-smart-table .order-payment-marker,
.site-requests-smart-table .site-request-channel,
.site-requests-smart-table .site-request-state-badge {
  line-height: 1.15;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  white-space: normal;
}

.orders-smart-table .order-status-stack,
.orders-smart-table .order-needs-action-chips,
.site-requests-smart-table .site-request-row-actions {
  max-width: 100%;
}

.site-requests-smart-table .site-request-row-actions.is-compact {
  flex-wrap: wrap;
}

.site-request-preview-comment,
.orders-preview-comment,
.site-request-preview-history,
.orders-preview-history,
.orders-preview-execution {
  background: #f8fafc;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.orders-preview-actions > strong,
.site-request-preview-actions > strong {
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  grid-column: 1 / -1;
}

.orders-preview-steps {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.orders-preview-steps span {
  align-items: center;
  color: #667085;
  display: grid;
  font-size: 10px;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.orders-preview-steps i {
  background: #e5e7eb;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  display: block;
  height: 16px;
  width: 16px;
}

.orders-preview-steps span.done i {
  background: #bbf7d0;
  border-color: #22c55e;
}

.orders-preview-steps span.active i {
  background: #2563eb;
  border-color: #2563eb;
}

.executive-control-panel {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.executive-control-head {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 18px;
}

.executive-control-head h2 {
  color: #101828;
  font-size: 22px;
  line-height: 1.15;
  margin: 2px 0 4px;
}

.executive-control-head p,
.executive-control-note span {
  color: #667085;
  font-size: 13px;
  margin: 0;
}

.executive-control-note {
  background: #f8fafc;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  max-width: 420px;
  padding: 10px 12px;
}

.executive-control-note strong {
  color: #344054;
  font-size: 12px;
  text-transform: uppercase;
}

.executive-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.executive-kpi-card {
  background: #ffffff;
  border: 1px solid #e5ebf3;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 12px;
}

.executive-kpi-card span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.executive-kpi-card strong {
  color: #101828;
  font-size: 26px;
  line-height: 1;
}

.executive-kpi-card small {
  color: #667085;
  font-size: 12px;
}

.executive-kpi-card.green { border-left-color: #16a34a; }
.executive-kpi-card.amber { border-left-color: #f59e0b; }
.executive-kpi-card.red { border-left-color: #dc2626; }
.executive-kpi-card.blue { border-left-color: #2563eb; }

.executive-control-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.executive-table {
  font-size: 12px;
  table-layout: auto;
}

.executive-table th,
.executive-table td {
  padding: 9px 10px;
  vertical-align: top;
}

.executive-table td small {
  color: #667085;
  display: block;
  font-size: 11px;
  line-height: 1.25;
  margin-top: 3px;
}

.executive-critical-row {
  background: #fff7ed;
}

.executive-critical-row td:first-child {
  border-left: 3px solid #f97316;
}

.executive-norm-bar {
  background: #eef2f7;
  border-radius: 999px;
  display: block;
  height: 7px;
  margin-bottom: 4px;
  overflow: hidden;
  width: 92px;
}

.executive-norm-bar i {
  background: #2563eb;
  border-radius: inherit;
  display: block;
  height: 100%;
}

@media (max-width: 1280px) {
  .executive-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .executive-control-head {
    align-items: stretch;
    flex-direction: column;
  }

  .executive-kpi-grid,
  .executive-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1250px) {
  .warehouse-assembly-workspace .warehouse-work-head {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-work-search {
    flex: 1 1 auto;
  }

  .warehouse-assembly-kpis {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

  .warehouse-lifecycle-flow {
    grid-template-columns: repeat(8, minmax(140px, 1fr));
  }
}

@media (max-width: 900px) {
  .warehouse-assembly-workspace .warehouse-work-head h2 {
    font-size: 26px;
  }

  .warehouse-assembly-kpis {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .warehouse-lifecycle-card,
  .warehouse-work-table-card,
  .warehouse-route-card {
    padding: 16px;
  }

  .warehouse-route-card-head,
  .warehouse-route-subhead,
  .warehouse-route-select-row,
  .warehouse-route-actions,
  .warehouse-route-archive-tools,
  .warehouse-route-period-shift {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-route-summary,
  .warehouse-route-form,
  .warehouse-route-archive-stats {
    grid-template-columns: 1fr;
  }

  .warehouse-work-inline-form {
    grid-template-columns: 1fr;
  }

  .warehouse-work-wide {
    grid-column: auto;
  }

  .warehouse-delivery-inline-form .delivery-wide,
  .warehouse-delivery-inline-form .delivery-full {
    grid-column: auto;
  }

  .warehouse-work-inline-form > .warehouse-delivery-inline-head {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-delivery-payment-hint {
    grid-template-columns: 1fr;
  }
}

/* Responsive workspace layer */
body {
  grid-template-columns: clamp(220px, 17vw, 260px) minmax(0, 1fr);
}

.shell,
.orders-smart-page,
.site-requests-smart-page,
.warehouse-assembly-page,
.warehouse-workspace,
.warehouse-work-table-card,
.orders-smart-main,
.site-requests-smart-main {
  max-width: 100%;
  min-width: 0;
}

.shell {
  padding: clamp(10px, 1.35vw, 22px);
}

body[data-current-view="integrations"] .shell {
  overflow: visible;
}

body[data-current-view="orders"] .shell,
body[data-current-view="siteRequests"] .shell,
body[data-current-view="warehouseOrders"] .shell {
  padding: clamp(10px, 1.05vw, 16px);
}

.orders-smart-head,
.site-requests-smart-head,
.warehouse-assembly-workspace .warehouse-work-head,
.orders-smart-toolbar,
.site-requests-smart-toolbar,
.orders-section-head,
.site-requests-section-head {
  flex-wrap: wrap;
  min-width: 0;
}

.orders-smart-actions,
.site-requests-smart-actions,
.warehouse-work-inline-actions,
.warehouse-work-actions,
.warehouse-next-action {
  flex-wrap: wrap;
  min-width: 0;
}

.orders-smart-search,
.site-requests-smart-search,
.warehouse-work-search {
  flex: 1 1 min(100%, 340px);
  min-width: min(100%, 260px);
}

.orders-smart-layout,
.site-requests-smart-layout {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 360px);
}

.orders-smart-layout.orders-smart-layout-full {
  grid-template-columns: minmax(0, 1fr);
}

body[data-current-view="siteRequests"] .site-requests-smart-layout {
  grid-template-columns: minmax(0, 1fr) clamp(280px, 21vw, 330px);
}

body[data-current-view="siteRequests"] .site-requests-smart-layout.is-preview-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.orders-preview-card,
.site-request-preview-card {
  max-width: 100%;
}

.orders-smart-filters,
.site-request-smart-filters {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.site-request-smart-stats,
.orders-smart-insights,
.warehouse-assembly-kpis {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.warehouse-lifecycle-flow {
  grid-auto-flow: column;
  grid-auto-columns: minmax(138px, 1fr);
  grid-template-columns: none;
}

.orders-table-wrap,
.site-requests-table-wrap,
.warehouse-work-table-shell {
  max-width: 100%;
  overscroll-behavior-x: contain;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.orders-smart-table {
  min-width: 0;
}

.site-requests-smart-table {
  min-width: max(1040px, 100%);
}

body[data-current-view="siteRequests"] .site-requests-table-wrap {
  overflow-x: hidden;
}

body[data-current-view="siteRequests"] .site-requests-smart-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

body[data-current-view="siteRequests"] .site-requests-smart-table th,
body[data-current-view="siteRequests"] .site-requests-smart-table td {
  font-size: 11px;
  padding: 4px 5px;
}

body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(1) { width: 11%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(2) { width: 17%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(3) { width: 11%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(4) { width: 8%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(5) { width: 15%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(6) { width: 10%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(7) { width: 13%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(8) { width: 8%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.no-selection th:nth-child(9) { width: 7%; }

body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(1) { width: 4%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(2) { width: 11%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(3) { width: 16%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(4) { width: 10%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(5) { width: 8%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(6) { width: 14%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(7) { width: 10%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(8) { width: 12%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(9) { width: 8%; }
body[data-current-view="siteRequests"] .site-requests-smart-table.has-selection th:nth-child(10) { width: 7%; }

body[data-current-view="siteRequests"] .site-requests-smart-table td,
body[data-current-view="siteRequests"] .site-requests-smart-table th,
body[data-current-view="siteRequests"] .site-requests-smart-table .site-request-row-sub,
body[data-current-view="siteRequests"] .site-requests-smart-table .site-request-phone {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-current-view="siteRequests"] .site-requests-smart-table .site-request-row-sub {
  white-space: nowrap;
}

body[data-current-view="siteRequests"] .site-requests-smart-table .erp-status-badge,
body[data-current-view="siteRequests"] .site-requests-smart-table .erp-finance-badge,
body[data-current-view="siteRequests"] .site-requests-smart-table .site-request-channel {
  font-size: 10px;
  padding: 2px 5px;
}

.warehouse-assembly-table {
  min-width: max(1340px, 100%);
}

@media (max-width: 1500px) {
  body {
    grid-template-columns: clamp(210px, 18vw, 240px) minmax(0, 1fr);
  }

  .orders-smart-table {
    min-width: 1180px;
  }

  .site-requests-smart-table {
    min-width: 980px;
  }

  .warehouse-assembly-table {
    min-width: 1340px;
  }
}

@media (max-width: 1250px) {
  .orders-smart-layout,
  .site-requests-smart-layout {
    grid-template-columns: 1fr;
  }

  .orders-preview-card,
  .site-request-preview-card {
    max-height: none;
    position: static;
  }

  .orders-table-wrap,
  .site-requests-table-wrap {
    max-height: min(62vh, 620px);
  }

  .warehouse-assembly-workspace .warehouse-work-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    height: auto;
    max-height: 42vh;
    overflow-y: auto;
    position: static;
  }

  .shell {
    padding: 10px;
  }

  .orders-smart-page,
  .site-requests-smart-page,
  .warehouse-assembly-page {
    padding: 10px;
  }

  .orders-smart-actions,
  .site-requests-smart-actions,
  .order-channel-head,
  .orders-smart-toolbar,
  .site-requests-smart-toolbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .orders-smart-search,
  .site-requests-smart-search,
  .orders-smart-search input,
  .site-requests-smart-search input {
    grid-column: 1 / -1;
    width: 100%;
  }

  .orders-smart-count,
  .site-requests-smart-count {
    margin-left: 0;
    white-space: normal;
  }

	  .site-request-smart-stats,
	  .orders-smart-insights,
	  .order-channel-flow,
	  .order-channel-stats,
	  .settlement-channel-breakdown,
	  .warehouse-assembly-kpis,
    .motivation-head,
    .motivation-summary-grid,
    .motivation-settings-grid {
	    grid-template-columns: repeat(2, minmax(0, 1fr));
	  }

  .motivation-layout {
    grid-template-columns: 1fr;
  }

  .motivation-layout .span-6,
  .motivation-layout .span-12 {
    grid-column: 1 / -1;
  }

  .orders-table-wrap,
  .site-requests-table-wrap,
  .warehouse-work-table-shell {
    max-height: none;
    min-height: 260px;
  }

  .orders-smart-table {
    min-width: 1080px;
  }

  .site-requests-smart-table {
    min-width: 1180px;
  }

  .warehouse-assembly-table {
    min-width: 1340px;
  }

  .customer-payment-editor-grid,
  .customer-payment-editor-summary {
    grid-template-columns: 1fr;
  }

  .customer-payment-editor-doc {
    align-items: start;
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .customer-payment-editor-doc-amount {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .orders-smart-actions,
  .site-requests-smart-actions,
  .orders-smart-toolbar,
  .site-requests-smart-toolbar,
	  .site-request-smart-stats,
	  .orders-smart-insights,
	  .order-channel-flow,
	  .order-channel-stats,
	  .settlement-channel-breakdown,
	  .warehouse-assembly-kpis,
    .motivation-head,
    .motivation-summary-grid,
    .motivation-quality-grid,
    .motivation-settings-grid {
	    grid-template-columns: 1fr;
	  }

  .orders-smart-table {
    min-width: 980px;
  }

  .site-requests-smart-table {
    min-width: 1080px;
  }

  .warehouse-assembly-table {
    min-width: 1340px;
  }

  .warehouse-lifecycle-flow {
    grid-auto-columns: minmax(128px, 72vw);
  }

  .customer-payment-editor {
    margin: 6px 0;
    padding: 10px;
  }

  .customer-payment-editor-head,
  .customer-payment-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-payment-editor-allocation-head {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-payment-editor-actions-main {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  body::before {
    background: rgba(15, 23, 42, 0.38);
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.16s ease;
    z-index: 900;
  }

  body.sidebar-drawer-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  body.auth-required::before {
    display: none;
  }

  .sidebar,
  body.sidebar-collapsed .sidebar {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    box-shadow: 24px 0 44px rgba(15, 23, 42, 0.22);
    height: 100vh;
    inset: 0 auto 0 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 14px 12px 18px;
    position: fixed;
    transform: translateX(-104%);
    transition: transform 0.18s ease;
    width: min(330px, 88vw);
    z-index: 1000;
  }

  body.sidebar-drawer-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-collapsed .sidebar-head,
  .sidebar-head {
    align-items: center;
    flex-direction: row;
    margin-bottom: 16px;
  }

  body.sidebar-collapsed .brand span,
  body.sidebar-collapsed .main-nav {
    display: grid;
  }

  body.sidebar-collapsed .brand span {
    display: inline;
  }

  body.sidebar-collapsed .brand {
    justify-content: flex-start;
  }

  .sidebar-toggle,
  body.sidebar-collapsed .sidebar-toggle {
    display: inline-flex;
  }

  .main-nav,
  nav {
    grid-template-columns: 1fr;
  }

  .nav-subitems {
    grid-template-columns: 1fr;
  }

  nav button,
  .nav-subitems button {
    text-align: left;
  }

  .sidebar-drawer-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #d9e4f5;
    border-radius: 8px;
    color: #1d4ed8;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    width: max-content;
  }

  body[data-current-view="dashboard"] .topbar,
  body[data-current-view="orders"] .topbar,
  body[data-current-view="warehouseOrders"] .topbar {
    display: flex;
  }

  .topbar {
    align-items: flex-start;
  }

  .shell {
    max-width: 100vw;
  }
}

/* Warehouse assembly 2030 workspace */
body[data-current-view="warehouseOrders"] {
  background: #ffffff;
}

body[data-current-view="warehouseOrders"] .shell,
body[data-current-view="warehouseOrders"] .warehouse-assembly-page,
body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace {
  background: #ffffff;
}

@media (max-width: 1100px) {
  body[data-current-view="warehouseOrders"] {
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  body[data-current-view="warehouseOrders"]::before {
    background: rgba(15, 23, 42, 0.38);
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.16s ease;
    z-index: 900;
  }

  body[data-current-view="warehouseOrders"].sidebar-drawer-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  body[data-current-view="warehouseOrders"] .sidebar,
  body[data-current-view="warehouseOrders"].sidebar-collapsed .sidebar {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    box-shadow: 24px 0 44px rgba(15, 23, 42, 0.22);
    height: 100vh;
    inset: 0 auto 0 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 14px 12px 18px;
    position: fixed;
    transform: translateX(-104%);
    transition: transform 0.18s ease;
    width: min(330px, 88vw);
    z-index: 1000;
  }

  body[data-current-view="warehouseOrders"].sidebar-drawer-open .sidebar {
    transform: translateX(0);
  }

  body[data-current-view="warehouseOrders"] .topbar {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
  }

  body[data-current-view="warehouseOrders"] .sidebar-drawer-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #d9e4f5;
    border-radius: 8px;
    color: #1d4ed8;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    width: max-content;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace .warehouse-work-head h2 {
    font-size: 26px;
    overflow-wrap: anywhere;
  }

  body[data-current-view="warehouseOrders"] .topbar-title,
  body[data-current-view="warehouseOrders"] .topbar-title h1,
  body[data-current-view="warehouseOrders"] .topbar-title p,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace .warehouse-work-head,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace .warehouse-work-head > div,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace .warehouse-work-head h2,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace .warehouse-work-head p {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.warehouse-assembly-topbar {
  align-items: flex-start;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 4px;
}

.warehouse-assembly-top-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.warehouse-assembly-top-actions button,
.warehouse-selected-actions button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}

.warehouse-assembly-icon,
.warehouse-selected-actions .order-action-icon {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.warehouse-assembly-icon {
  background: #eff6ff;
  color: #2563eb;
}

.warehouse-assembly-icon svg,
.warehouse-selected-actions .order-action-icon svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.warehouse-assembly-kpis {
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}

.warehouse-kpi-filter {
  align-items: start;
  gap: 8px 10px;
  grid-template-areas:
    "icon value"
    "label label";
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 82px;
  padding: 12px 14px;
}

.warehouse-kpi-filter .warehouse-assembly-icon {
  grid-area: icon;
}

.warehouse-kpi-filter > span:not(.warehouse-assembly-icon) {
  color: #344054;
  font-size: 13px;
  grid-area: label;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.warehouse-kpi-filter strong {
  font-size: 24px;
  grid-area: value;
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace .warehouse-work-head p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.warehouse-kpi-filter.active {
  box-shadow: inset 0 0 0 2px #2563eb, 0 10px 24px rgba(37, 99, 235, 0.10);
}

.warehouse-info-backdrop {
  align-items: start;
  overflow-y: auto;
  padding: 42px 24px;
  z-index: 80;
}

.warehouse-info-dialog {
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 22px;
  box-shadow: 0 26px 90px rgba(15, 23, 42, 0.24);
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 84px);
  overflow: auto;
  padding: 18px;
  width: min(1180px, 100%);
}

.warehouse-info-dialog-head {
  align-items: flex-start;
  border-bottom: 1px solid #eef2f6;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 4px 4px 14px;
}

.warehouse-info-dialog-head span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.warehouse-info-dialog-head h2 {
  color: #101828;
  font-size: 26px;
  line-height: 1.15;
  margin: 4px 0 2px;
}

.warehouse-info-dialog-head p {
  color: #667085;
  font-size: 14px;
  margin: 0;
}

.warehouse-info-dialog-body {
  display: grid;
  min-width: 0;
}

.warehouse-info-dialog-body .warehouse-kpi-overview,
.warehouse-info-dialog-body .warehouse-lifecycle-card {
  border: 0;
  box-shadow: none;
  padding: 2px;
}

.warehouse-kpi-overview {
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
  gap: 12px;
  padding: 14px;
}

.warehouse-kpi-overview-head {
  align-items: center;
}

.warehouse-kpi-overview-grid {
  gap: 10px;
}

.warehouse-kpi-overview-card {
  min-height: 78px;
  padding: 10px 12px;
}

.warehouse-kpi-overview-card strong {
  font-size: 20px;
}

.warehouse-lifecycle-card {
  gap: 12px;
  padding: 16px 18px;
}

.warehouse-lifecycle-card h3 {
  font-size: 18px;
}

.warehouse-lifecycle-card p {
  font-size: 13px;
}

.warehouse-lifecycle-flow {
  gap: 14px;
  grid-auto-columns: minmax(116px, 1fr);
}

.warehouse-lifecycle-step {
  min-height: 66px;
  padding: 10px 8px;
}

.warehouse-lifecycle-step strong {
  font-size: 12px;
}

.warehouse-lifecycle-step small {
  font-size: 11px;
}

.warehouse-assembly-main-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) clamp(330px, 24vw, 420px);
  overflow: visible;
}

.warehouse-assembly-main-layout.warehouse-queue-mode,
.warehouse-assembly-main-layout.warehouse-detail-mode {
  grid-template-columns: minmax(0, 1fr);
}

.warehouse-assembly-main-layout.warehouse-detail-mode .warehouse-selected-card {
  max-height: none;
  overflow: visible;
  position: static;
}

.warehouse-queue-card {
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.warehouse-queue-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.warehouse-queue-head h3 {
  color: #101828;
  font-size: 20px;
  line-height: 1.2;
  margin: 0;
}

.warehouse-queue-head p {
  color: #667085;
  font-size: 13px;
  margin: 4px 0 0;
}

.warehouse-queue-head .warehouse-work-search {
  flex: 0 1 360px;
}

.warehouse-queue-head .warehouse-work-search input {
  min-height: 42px;
}

.warehouse-work-table-shell {
  overflow-x: hidden;
}

.warehouse-assembly-table {
  min-width: 0;
  table-layout: fixed;
}

.warehouse-assembly-table th,
.warehouse-assembly-table td {
  font-size: 13px;
  padding: 10px 8px;
}

.warehouse-assembly-table th:nth-child(1),
.warehouse-assembly-table td:nth-child(1) {
  width: 23%;
}

.warehouse-assembly-table th:nth-child(2),
.warehouse-assembly-table td:nth-child(2) {
  width: 18%;
}

.warehouse-assembly-table th:nth-child(3),
.warehouse-assembly-table td:nth-child(3) {
  width: 23%;
}

.warehouse-assembly-table th:nth-child(4),
.warehouse-assembly-table td:nth-child(4) {
  width: 22%;
}

.warehouse-assembly-table th:nth-child(5),
.warehouse-assembly-table td:nth-child(5) {
  width: 14%;
}

.warehouse-assembly-table th:nth-child(6),
.warehouse-assembly-table td:nth-child(6) {
  width: auto;
}

.warehouse-queue-row {
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.warehouse-queue-row:hover {
  background: #f8fafc;
}

.warehouse-queue-row.selected {
  background: #eff6ff;
}

.warehouse-order-select {
  background: transparent;
  border: 0;
  color: #101828;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 2px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.warehouse-order-select strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-row-customer {
  color: #101828;
  font-weight: 900;
}

.warehouse-assembly-row small,
.warehouse-assembly-table td small {
  font-size: 11px;
}

.warehouse-payment-line {
  grid-template-columns: 42px minmax(0, 1fr);
}

.warehouse-progress-strip {
  gap: 3px;
}

.warehouse-progress-chip {
  font-size: 10px;
  padding: 4px 6px;
}

.warehouse-next-action {
  align-items: stretch;
  flex-direction: column;
}

.warehouse-next-button,
.warehouse-next-muted,
.warehouse-next-danger {
  font-size: 13px;
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.warehouse-more-actions {
  justify-self: end;
}

.warehouse-more-actions summary {
  height: 32px;
  width: 32px;
}

.warehouse-selected-card {
  align-self: start;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.07);
  display: grid;
  gap: 14px;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  position: sticky;
  top: 12px;
  z-index: 2;
}

.warehouse-selected-card.empty {
  align-items: center;
  min-height: 260px;
  place-items: center;
  text-align: center;
}

.warehouse-selected-card.empty p {
  color: #667085;
  margin: 0;
}

.warehouse-selected-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.warehouse-selected-title {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
}

.warehouse-selected-head-actions {
  align-items: end;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.warehouse-back-to-queue-button {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  font-weight: 800;
}

.warehouse-selected-head span,
.warehouse-selected-context span {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.warehouse-selected-head strong {
  color: #101828;
  display: block;
  font-size: 26px;
  line-height: 1.05;
}

.warehouse-selected-head b {
  color: #2563eb;
  font-size: 20px;
  white-space: nowrap;
}

.warehouse-selected-head small {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.warehouse-selected-head-context {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
}

.warehouse-selected-head-context > div {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
}

.warehouse-selected-head-context strong {
  color: #101828;
  display: block;
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-selected-head-context small {
  color: #667085;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-selected-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warehouse-selected-mobile-sender {
  display: none;
}

.warehouse-selected-next .warehouse-next-button,
.warehouse-selected-next .warehouse-next-muted,
.warehouse-selected-next .warehouse-next-danger {
  min-height: 46px;
}

.warehouse-selected-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.warehouse-selected-actions button {
  min-height: 42px;
}

.warehouse-selected-actions button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-change-request-panel {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 14px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.warehouse-change-request-head {
  display: grid;
  gap: 6px;
}

.warehouse-change-request-head span,
.warehouse-change-group h4 {
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.warehouse-change-request-head strong {
  color: #7c2d12;
  display: block;
  font-size: 15px;
}

.warehouse-change-request-head small {
  color: #9a3412;
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.warehouse-change-request-head b {
  color: #111827;
  font-size: 12px;
}

.warehouse-change-lock-note {
  background: #ffedd5;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  padding: 9px 10px;
}

.warehouse-change-group {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 12px;
  padding: 8px;
}

.warehouse-change-group ul {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.warehouse-change-line {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.warehouse-change-line strong {
  color: #111827;
  display: block;
  font-size: 12px;
  line-height: 1.2;
}

.warehouse-change-line small {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.warehouse-change-line span,
.warehouse-change-line b {
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.warehouse-change-line.added span {
  color: #047857;
}

.warehouse-change-line.removed span {
  color: #b42318;
}

.warehouse-change-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.warehouse-selected-context {
  display: grid;
  gap: 10px;
}

.warehouse-selected-context > div,
.warehouse-selected-warning {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.warehouse-selected-context strong {
  color: #101828;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.warehouse-selected-context small {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.warehouse-selected-warning {
  align-items: center;
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
  grid-template-columns: auto minmax(0, 1fr);
}

.warehouse-selected-warning .warehouse-assembly-icon {
  background: #ffedd5;
  color: #c2410c;
}

.warehouse-selected-inline-panels {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.warehouse-selected-inline-table {
  border-collapse: collapse;
  width: 100%;
}

.warehouse-selected-inline-table .warehouse-work-inline-row > td,
.warehouse-selected-inline-table .warehouse-picking-inline-row > td {
  border: 0;
  padding: 0;
}

.warehouse-interface-rule {
  background: #f8fafc;
  border: 1px solid #d8e0ec;
  color: #344054;
  font-size: 13px;
  padding: 14px 16px;
}

.warehouse-interface-rule strong {
  color: #101828;
}

.warehouse-row-order-main {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.warehouse-row-order-main .warehouse-source-pill {
  margin-top: 0;
  max-width: 112px;
}

.warehouse-row-owner {
  color: #475467 !important;
  font-weight: 900;
}

.warehouse-row-status-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.warehouse-row-delivery {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.warehouse-row-delivery strong,
.warehouse-row-total {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-row-total {
  color: #101828 !important;
  font-weight: 950;
}

.warehouse-selected-section-label {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.warehouse-selected-next {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.warehouse-selected-next .warehouse-next-button {
  background: #155eef;
  border-color: #155eef;
  box-shadow: 0 10px 22px rgba(21, 94, 239, 0.20);
  color: #ffffff;
}

.warehouse-selected-next .warehouse-next-button:hover {
  background: #004eeb;
}

.warehouse-selected-next .warehouse-next-muted,
.warehouse-selected-next .warehouse-next-danger {
  box-shadow: none;
}

.warehouse-selected-actions .warehouse-selected-section-label {
  grid-column: 1 / -1;
  margin-bottom: -2px;
}

.warehouse-selected-actions button {
  background: #ffffff;
  border-color: #d8e0ec;
}

.warehouse-selected-actions button:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #b8c4d6;
}

body[data-current-view="warehouseOrders"] .app,
body[data-current-view="warehouseOrders"] main,
body[data-current-view="warehouseOrders"] .content {
  background: #ffffff;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace {
  gap: 16px;
  padding-top: 4px;
}

body[data-current-view="warehouseOrders"] .warehouse-channel-tabs {
  gap: 8px;
}

body[data-current-view="warehouseOrders"] .warehouse-channel-tabs button:not(.warehouse-info-tab) {
  border-radius: 14px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 42px;
  min-width: 112px;
  padding: 7px 12px;
  white-space: normal;
}

body[data-current-view="warehouseOrders"] .warehouse-channel-tabs button:not(.warehouse-info-tab) span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-current-view="warehouseOrders"] .warehouse-channel-tabs strong {
  align-self: center;
  justify-self: end;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-kpis {
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
}

body[data-current-view="warehouseOrders"] .warehouse-kpi-filter {
  border-radius: 14px;
  min-height: 68px;
  padding: 9px 11px;
}

body[data-current-view="warehouseOrders"] .warehouse-kpi-filter strong {
  align-self: center;
  font-size: 21px;
}

body[data-current-view="warehouseOrders"] .warehouse-kpi-filter > span:not(.warehouse-assembly-icon) {
  font-size: 11px;
  font-weight: 800;
}

body[data-current-view="warehouseOrders"] .warehouse-kpi-filter .warehouse-assembly-icon {
  height: 28px;
  width: 28px;
}

@media (max-width: 1100px) {
  body[data-current-view="warehouseOrders"] .warehouse-assembly-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-tabs {
  gap: 8px;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-tabs button {
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  line-height: 1.15;
  min-height: 40px;
  min-width: 124px;
  padding: 6px 10px;
  text-align: left;
  white-space: normal;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-tabs button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-tabs strong {
  align-self: center;
  justify-self: end;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-main-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) clamp(350px, 25vw, 430px);
  overflow: visible;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-main-layout.warehouse-queue-mode,
body[data-current-view="warehouseOrders"] .warehouse-assembly-main-layout.warehouse-detail-mode {
  grid-template-columns: minmax(0, 1fr);
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-main-layout.warehouse-detail-mode .warehouse-selected-card {
  max-height: none;
  overflow: visible;
  position: static;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-card {
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.05);
}

body[data-current-view="warehouseOrders"] .warehouse-queue-tools {
  align-items: stretch;
  display: grid;
  gap: 10px;
  justify-items: end;
  min-width: min(560px, 100%);
}

body[data-current-view="warehouseOrders"] .warehouse-queue-scopes {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-scopes button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0ec;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-scopes button.active,
body[data-current-view="warehouseOrders"] .warehouse-full-info-toggle.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-scopes strong {
  background: #eef2ff;
  border-radius: 999px;
  color: #2563eb;
  min-width: 24px;
  padding: 1px 7px;
  text-align: center;
}

body[data-current-view="warehouseOrders"] .warehouse-full-info-toggle {
  border-style: dashed;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-tools .warehouse-work-search {
  flex: none;
  width: min(520px, 100%);
}

body[data-current-view="warehouseOrders"] .warehouse-work-table-shell {
  border-radius: 14px;
  max-height: none;
  min-height: 0;
  overflow: visible;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-table {
  min-width: 1080px;
  table-layout: auto;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-table th {
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-table td {
  vertical-align: top;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-row {
  cursor: pointer;
  outline: none;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-row:focus-visible {
  box-shadow: inset 0 0 0 2px #2563eb;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-row:hover {
  background: #f8fbff;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-table th:nth-child(1),
body[data-current-view="warehouseOrders"] .warehouse-assembly-table td:nth-child(1) {
  width: 15%;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-table th:nth-child(2),
body[data-current-view="warehouseOrders"] .warehouse-assembly-table td:nth-child(2) {
  width: 18%;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-table th:nth-child(3),
body[data-current-view="warehouseOrders"] .warehouse-assembly-table td:nth-child(3) {
  width: 13%;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-table th:nth-child(4),
body[data-current-view="warehouseOrders"] .warehouse-assembly-table td:nth-child(4) {
  width: 23%;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-table th:nth-child(5),
body[data-current-view="warehouseOrders"] .warehouse-assembly-table td:nth-child(5) {
  width: 18%;
}

body[data-current-view="warehouseOrders"] .warehouse-assembly-table th:nth-child(6),
body[data-current-view="warehouseOrders"] .warehouse-assembly-table td:nth-child(6) {
  width: 13%;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-row.selected {
  background: #eff6ff;
}

body[data-current-view="warehouseOrders"] .warehouse-row-order-main {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

body[data-current-view="warehouseOrders"] .warehouse-order-select {
  border-radius: 10px;
  min-width: 0;
  padding: 2px 0;
}

body[data-current-view="warehouseOrders"] .warehouse-order-select:hover strong {
  color: #155eef;
}

body[data-current-view="warehouseOrders"] .warehouse-row-customer,
body[data-current-view="warehouseOrders"] .warehouse-row-owner,
body[data-current-view="warehouseOrders"] .warehouse-assembly-row td > small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="warehouseOrders"] .warehouse-row-delivery strong,
body[data-current-view="warehouseOrders"] .warehouse-row-total {
  max-width: 100%;
}

body[data-current-view="warehouseOrders"] .warehouse-row-volume,
body[data-current-view="warehouseOrders"] .warehouse-queue-status > strong {
  color: #101828;
  display: block;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-status {
  display: grid;
  gap: 3px;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-warnings span {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 8px;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-full-info-row td {
  background: #f8fafc;
  border-bottom: 1px solid #e4e7ec;
  padding: 10px 12px;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-full-info {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 0.6fr) minmax(220px, 1.2fr) minmax(180px, 1fr);
}

body[data-current-view="warehouseOrders"] .warehouse-queue-full-info > div {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

body[data-current-view="warehouseOrders"] .warehouse-queue-full-info > div > strong {
  color: #667085;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-current-view="warehouseOrders"] .warehouse-quote-urgent-row {
  background: #fff1f2;
}

body[data-current-view="warehouseOrders"] .warehouse-work-change-row {
  background: #fff7ed;
}

body[data-current-view="warehouseOrders"] .warehouse-work-warning-row:not(.warehouse-quote-urgent-row):not(.warehouse-work-change-row) {
  background: #fffbeb;
}

body[data-current-view="warehouseOrders"] .warehouse-selected-card {
  align-self: start;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  position: sticky;
  top: 12px;
  z-index: 2;
}

body[data-current-view="warehouseOrders"] .warehouse-selected-head {
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 12px;
}

body[data-current-view="warehouseOrders"] .warehouse-selected-status {
  gap: 7px;
}

body[data-current-view="warehouseOrders"] .warehouse-selected-context {
  gap: 8px;
}

body[data-current-view="warehouseOrders"] .warehouse-selected-context > div,
body[data-current-view="warehouseOrders"] .warehouse-selected-warning {
  border-radius: 14px;
  padding: 11px 12px;
}

@media (max-width: 1440px) {
  .warehouse-assembly-main-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .warehouse-assembly-table th,
  .warehouse-assembly-table td {
    font-size: 12px;
    padding: 9px 7px;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-tabs button {
    min-width: 112px;
  }
}

@media (max-width: 1180px) {
  .warehouse-assembly-main-layout {
    grid-template-columns: 1fr;
  }

  .warehouse-selected-card {
    max-height: none;
    overflow: visible;
    position: static;
  }

  .warehouse-work-table-shell {
    overflow-x: auto;
  }

  .warehouse-assembly-table {
    min-width: 980px;
  }
}

@media (max-width: 1100px) {
  body[data-current-view="warehouseOrders"] .warehouse-queue-card {
    padding: 14px;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-head {
    align-items: stretch;
    display: grid;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-tools {
    justify-items: stretch;
    min-width: 0;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-scopes {
    justify-content: flex-start;
  }

  body[data-current-view="warehouseOrders"] .warehouse-work-table-shell {
    overflow: visible;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-table,
  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-table tbody,
  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-table tr,
  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-table thead {
    display: none;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-table tbody {
    display: grid;
    gap: 10px;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-row {
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
    overflow: hidden;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-row td {
    align-items: start;
    border-bottom: 1px solid #eef2f6;
    display: grid;
    gap: 8px;
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 9px 12px;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-row td::before {
    color: #667085;
    content: attr(data-label);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.2;
    padding-top: 3px;
    text-transform: uppercase;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-assembly-row td:last-child {
    border-bottom: 0;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-next-action {
    justify-content: flex-start;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-work-inline-row,
  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-picking-inline-row,
  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-queue-full-info-row {
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    overflow: hidden;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-work-inline-row > td,
  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-picking-inline-row > td,
  body[data-current-view="warehouseOrders"] .warehouse-queue-card .warehouse-queue-full-info-row > td {
    display: block;
    padding: 0;
  }

  body[data-current-view="warehouseOrders"] .warehouse-queue-full-info {
    grid-template-columns: 1fr;
    padding: 10px;
  }
}

@media (max-width: 700px) {
  .warehouse-queue-head,
  .warehouse-assembly-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-queue-head .warehouse-work-search,
  .warehouse-work-search {
    flex-basis: auto;
    width: 100%;
  }

  .warehouse-selected-actions {
    grid-template-columns: 1fr;
  }

  .warehouse-selected-head {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-selected-head-actions {
    align-items: start;
    grid-template-columns: auto auto;
    justify-items: start;
  }

  .warehouse-selected-head-context {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body[data-current-view="warehouseOrders"]:has(.warehouse-mobile-detail-active) .topbar {
    display: none;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active {
    gap: 10px;
    padding-top: 0;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active > .warehouse-assembly-topbar,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active > .warehouse-channel-tabs,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active > .warehouse-assembly-kpis,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active > .warehouse-interface-rule,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active > .warehouse-picking-print-cache {
    display: none;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    gap: 10px;
    padding: 0;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-head {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
    padding: 2px 0 10px;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-head strong {
    font-size: 22px;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-head b {
    font-size: 17px;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-head-context {
    display: none;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-mobile-sender {
    border-bottom: 1px solid #eef2f6;
    display: grid;
    gap: 2px;
    padding: 0 0 10px;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-mobile-sender span {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-mobile-sender strong {
    color: #101828;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-actions,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-context,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-warning {
    display: none;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-status,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-next {
    display: flex;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-next {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-card.has-inline-work .warehouse-selected-status,
  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-card.has-inline-work .warehouse-selected-next {
    display: none;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-selected-inline-panels {
    margin-top: 0;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-picking-panel {
    border-radius: 14px;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-picking-head {
    padding: 12px;
  }

  body[data-current-view="warehouseOrders"] .warehouse-assembly-workspace.warehouse-mobile-detail-active .warehouse-picking-head > button {
    display: none;
  }
}

/* Order/site request polish: compact comments, readable history, cleaner table grid. */
.document-activity-panel {
  gap: 10px;
}

.document-activity-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.document-activity-head span {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.document-activity-head h3 {
  font-size: 17px;
  line-height: 1.2;
  margin: 2px 0 0;
}

.document-activity-head > strong {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 10px;
  white-space: nowrap;
}

.document-note-details {
  background: #fffaf0;
  border: 1px solid #fde68a;
  border-radius: 10px;
  overflow: hidden;
}

.document-note-details summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  list-style: none;
  padding: 9px 12px;
}

.document-note-details summary::-webkit-details-marker {
  display: none;
}

.document-note-details summary::after {
  color: #b45309;
  content: "▾";
  font-size: 13px;
  font-weight: 900;
  justify-self: end;
}

.document-note-details[open] summary::after {
  content: "▴";
}

.document-note-details summary span {
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.document-note-details summary strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-note-details .order-note-box {
  border: 0;
  border-top: 1px solid #fde68a;
  border-radius: 0;
  margin: 0;
}

.document-history-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.document-history-row {
  border-radius: 10px;
  gap: 9px;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 9px 10px;
}

.document-history-dot {
  font-size: 12px;
  height: 26px;
  width: 26px;
}

.document-history-meta {
  gap: 4px 8px;
}

.document-history-meta strong,
.document-history-body p {
  font-size: 12px;
}

.document-history-meta span,
.document-history-meta small,
.document-history-change span,
.document-history-change strong {
  font-size: 11px;
}

.document-history-change {
  grid-template-columns: minmax(92px, 0.24fr) minmax(0, 1fr) 16px minmax(0, 1fr);
  padding: 6px 8px;
}

.order-work-notes-card {
  background: #fffaf0;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  margin-top: 8px;
  overflow: hidden;
}

.order-work-notes-card summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  list-style: none;
  padding: 9px 12px;
}

.order-work-notes-card summary::-webkit-details-marker {
  display: none;
}

.order-work-notes-card summary span {
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-work-notes-card summary strong {
  align-items: center;
  background: #ffedd5;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  display: inline-flex;
  font-size: 12px;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 8px;
}

.order-work-notes-list {
  border-top: 1px solid #fed7aa;
  display: grid;
  gap: 0;
}

.order-work-note-item {
  display: grid;
  gap: 6px;
  grid-template-columns: 170px minmax(0, 1fr);
  padding: 9px 12px;
}

.order-work-note-item + .order-work-note-item {
  border-top: 1px solid #fed7aa;
}

.order-work-note-item div {
  display: grid;
  gap: 2px;
}

.order-work-note-item span {
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

.order-work-note-item small {
  color: #b45309;
  font-size: 11px;
  font-weight: 800;
}

.order-work-note-item strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.order-work-table-card {
  border-color: #dbe4f0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.order-work-table-card h3 {
  border-bottom: 1px solid #cfe7f8;
}

.order-work-table-row {
  grid-template-columns: 132px minmax(0, 1fr);
}

.order-work-table-row.order-phone-row {
  grid-template-columns: 132px minmax(0, 1fr) 34px;
}

.order-work-table-row span,
.order-work-table-row strong {
  min-height: 32px;
}

.order-work-table-row .site-request-row-icon {
  align-self: center;
  justify-self: center;
}

.order-card-lines-table {
  border-collapse: separate;
  border-spacing: 0;
}

.order-card-lines-table th,
.order-card-lines-table td {
  border-bottom: 1px solid #e5eaf2;
  vertical-align: middle;
}

.order-card-lines-table th:not(:last-child),
.order-card-lines-table td:not(:last-child) {
  border-right: 1px solid #eef2f6;
}

.order-card-lines-table tbody tr:last-child td {
  border-bottom: 0;
}

.order-card-lines-table tfoot td {
  border-top: 1px solid #dbe4f0;
}

.order-lines-save-header {
  min-width: 156px;
}

.order-lines-save-actions {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .document-note-details summary,
  .order-work-note-item {
    grid-template-columns: 1fr;
  }

  .order-work-table-row,
  .order-work-table-row.order-phone-row {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .order-work-table-row.order-phone-row .site-request-row-icon {
    grid-column: 2;
    justify-self: start;
    margin-left: 8px;
  }
}

/* Order detail round 2: reuse the compact manager-request rhythm for matching data. */
.order-work-identity {
  background: transparent;
  border: 0;
  overflow: visible;
  padding: 0;
}

.order-work-card {
  padding: 14px 16px;
}

.order-work-card .site-request-manager-card-head h3 {
  align-items: center;
  display: flex;
  min-height: 26px;
  min-width: 0;
}

.order-work-card .site-request-manager-card-head .link-button {
  color: #101828;
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  padding: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-work-card .site-request-manager-facts {
  margin-top: 10px;
}

.order-lines-head {
  min-width: 0;
  flex-wrap: wrap;
}

.order-lines-head > div:first-child {
  min-width: 0;
}

.order-lines-actions {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 100%;
  min-width: 0;
}

.order-lines-actions > * {
  flex: 0 0 auto;
  white-space: nowrap;
}

.order-bulk-price-type {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  display: inline-flex;
  gap: 6px;
  min-width: 0;
  padding: 4px 6px;
}

.order-bulk-price-type span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.order-bulk-price-type select {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 7px;
  color: #101828;
  font-weight: 700;
  min-height: 32px;
  min-width: 94px;
  padding: 4px 28px 4px 8px;
}

.order-lines-save-header {
  min-width: 0;
}

.order-lines-list {
  gap: 0;
  padding: 0 14px 12px;
}

.order-line-card {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 8px 10px;
  grid-template-columns: minmax(240px, 1fr) minmax(116px, auto) minmax(76px, auto) minmax(86px, auto) minmax(92px, auto) auto;
  min-width: 0;
  padding: 8px 0;
}

.order-line-product {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-column: auto;
  grid-template-columns: 34px minmax(0, 1fr);
  min-width: 0;
  position: relative;
}

.order-line-product .product-corner-link {
  left: 24px;
  right: auto;
  top: -2px;
}

.order-line-product .product-thumb {
  border-radius: 8px;
  height: 34px;
  width: 34px;
}

.order-line-product-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.order-line-product-text > strong {
  color: #101828;
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.22;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-line-product-text > span {
  color: #91a0b6;
  display: -webkit-box;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.18;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-transform: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-line-stock-mini {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
}

.order-line-stock-mini.success {
  background: #ecfdf3;
  color: #15803d;
}

.order-line-stock-mini.warning {
  background: #fff7ed;
  color: #c2410c;
}

.order-line-stock-mini.danger {
  background: #fef2f2;
  color: #b91c1c;
}

.order-line-qty-area,
.order-line-money,
.order-line-upsell,
.order-line-menu {
  min-width: 0;
}

.order-line-qty-area {
  justify-self: end;
}

.order-line-quantity-control {
  grid-template-columns: 28px minmax(42px, 48px) 28px auto;
}

.order-line-quantity-static {
  align-items: baseline;
  display: inline-flex;
  gap: 4px;
  justify-self: end;
}

.order-line-quantity-static span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

.order-line-money,
.order-line-upsell {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.order-line-money strong,
.order-line-upsell strong {
  color: #101828;
  font-size: 14px;
  white-space: nowrap;
}

.order-line-price-input,
.order-line-discount-input {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 7px;
  color: #101828;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-width: 0;
  padding: 6px 7px;
  text-align: right;
  width: 92px;
}

.order-line-discount-input {
  width: 100%;
}

.order-line-price-input::-webkit-outer-spin-button,
.order-line-price-input::-webkit-inner-spin-button,
.order-line-discount-input::-webkit-outer-spin-button,
.order-line-discount-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.order-line-money small {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.order-line-sum strong {
  font-size: 15px;
}

.order-line-upsell strong {
  color: #16a34a;
  font-size: 12px;
}

.order-line-menu {
  justify-self: end;
}

.order-line-menu > div {
  gap: 8px;
  min-width: 180px;
}

.order-line-menu-separator {
  border-top: 1px solid #edf1f6;
  height: 1px;
  margin: 2px -2px;
}

.order-line-menu-danger {
  color: #b42318;
  justify-content: flex-start;
  text-align: left;
}

.order-line-menu-danger:hover,
.order-line-menu-danger:focus-visible {
  background: #fef3f2;
  color: #912018;
}

.order-line-menu-field {
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.order-line-menu-field .line-price-type-select {
  min-width: 0;
  width: 100%;
}

.order-lines-total-card {
  border-radius: 0 0 8px 8px;
  border-top: 0;
  margin-top: 0;
}

@media (max-width: 1180px) {
  .order-line-card {
    grid-template-columns: minmax(0, 1fr) minmax(112px, auto) minmax(76px, auto) minmax(84px, auto) auto;
  }

  .order-line-upsell {
    grid-column: 2 / -1;
  }
}

@media (max-width: 900px) {
  .order-lines-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .order-lines-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .order-bulk-price-type {
    flex: 1 1 220px;
  }

  .order-bulk-price-type select {
    flex: 1 1 auto;
  }

  .order-line-card {
    grid-template-columns: minmax(0, 1fr) minmax(106px, auto) minmax(76px, auto) auto;
  }

  .order-line-product,
  .order-line-upsell {
    grid-column: 1 / -1;
  }

  .order-line-qty-area {
    justify-self: start;
  }

  .order-line-money,
  .order-line-upsell {
    justify-items: start;
  }

  .order-line-menu {
    grid-column: 1 / -1;
    justify-self: start;
    position: relative;
    width: 34px;
  }

  .order-line-menu > div {
    left: 0;
    right: auto;
  }
}

@media (max-width: 720px) {
  .order-line-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  }

  .order-line-product,
  .order-line-qty-area,
  .order-line-money,
  .order-line-upsell {
    grid-column: 1 / -1;
  }

  .order-line-menu {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Shared compact nomenclature rhythm for site requests and orders. */
.site-request-manager-work-zone .site-request-compact-line {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 8px 10px;
  grid-template-columns: minmax(240px, 1fr) minmax(116px, auto) minmax(82px, auto) minmax(112px, auto) auto;
  min-width: 0;
  padding: 8px 14px;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-working-line-product {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-column: auto;
  grid-template-columns: 34px minmax(0, 1fr);
  min-width: 0;
  position: relative;
}

.site-request-manager-work-zone .site-request-compact-line .product-corner-link {
  left: 24px;
  right: auto;
  top: -2px;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-working-line-product strong {
  color: #101828;
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.22;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.order-line-card .order-line-product-text > strong {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-working-line-product small,
.site-request-manager-work-zone .site-request-compact-line .order-line-product-text > span {
  color: #91a0b6;
  display: -webkit-box;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.18;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-line-qty-area {
  justify-self: end;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-line-price-area,
.site-request-manager-work-zone .site-request-compact-line .site-request-working-line-sum {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 0;
}

.site-request-line-price-input {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  color: #101828;
  font-size: 14px;
  font-weight: 800;
  height: 34px;
  min-width: 0;
  padding: 0 8px;
  text-align: right;
  width: 86px;
}

.site-request-line-price-input::-webkit-outer-spin-button,
.site-request-line-price-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-working-line-sum span {
  display: none;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-working-line-sum strong {
  color: #101828;
  font-size: 14px;
  white-space: nowrap;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-working-line-sum .site-request-line-upsell {
  color: #16a34a;
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-working-line-actions {
  align-self: center;
  display: block;
  grid-column: auto;
  justify-self: end;
  min-width: 0;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-working-line-actions > div {
  gap: 8px;
  min-width: 160px;
}

.site-request-manager-work-zone .site-request-compact-line .site-request-working-line-actions .link-button {
  justify-content: flex-start;
}

@media (max-width: 1180px) {
  .site-request-manager-work-zone .site-request-compact-line {
    grid-template-columns: minmax(0, 1fr) minmax(112px, auto) minmax(82px, auto) minmax(92px, auto) auto;
  }
}

@media (max-width: 1300px) {
  .order-lines-head {
    flex-wrap: wrap;
  }

  .order-lines-head > div:first-child {
    flex: 1 1 100%;
  }

  .order-lines-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .order-lines-head > div:first-child {
    flex: 1 1 100%;
  }

  .order-lines-actions {
    flex: 1 1 100%;
  }

  .site-request-manager-work-zone .site-request-compact-line {
    grid-template-columns: minmax(0, 1fr) minmax(106px, auto) minmax(84px, auto) auto;
  }

  .site-request-manager-work-zone .site-request-compact-line .site-request-working-line-product {
    grid-column: 1 / -1;
  }

  .site-request-manager-work-zone .site-request-compact-line .site-request-line-qty-area {
    justify-self: start;
  }

  .site-request-manager-work-zone .site-request-compact-line .site-request-line-price-area,
  .site-request-manager-work-zone .site-request-compact-line .site-request-working-line-sum {
    justify-items: start;
  }

  .order-line-card .order-line-menu {
    grid-column: 1 / -1;
    justify-self: start;
    width: 34px;
  }

  .order-line-card .order-line-menu > div {
    left: 0;
    right: auto;
  }
}

@media (max-width: 720px) {
  .site-request-manager-work-zone .site-request-compact-line {
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  }

  .site-request-manager-work-zone .site-request-compact-line .site-request-working-line-product,
  .site-request-manager-work-zone .site-request-compact-line .site-request-line-qty-area,
  .site-request-manager-work-zone .site-request-compact-line .site-request-line-price-area,
  .site-request-manager-work-zone .site-request-compact-line .site-request-working-line-sum,
  .site-request-manager-work-zone .site-request-compact-line .site-request-working-line-actions {
    grid-column: 1 / -1;
  }

  .site-request-manager-work-zone .site-request-compact-line .site-request-working-line-actions {
    justify-self: start;
  }
}

/* Final catalog polish: keep this block last so older catalog rules cannot stretch the cards again. */
body[data-view="catalog"] #view {
  background: #ffffff;
}

body[data-view="catalog"] .catalog-page {
  gap: 12px;
}

body[data-view="catalog"] .catalog-action-button.primary,
body[data-view="catalog"] .catalog-card-actions button.primary {
  background: #0b5cff;
  border-color: #0b5cff;
  color: #ffffff;
}

body[data-view="catalog"] .catalog-kpi-grid {
  gap: 12px;
}

body[data-view="catalog"] .catalog-kpi-card {
  min-height: 72px;
  padding: 11px 14px;
}

body[data-view="catalog"] .catalog-action-row {
  gap: 10px;
}

body[data-view="catalog"] .catalog-workspace {
  gap: 18px;
  grid-template-columns: minmax(300px, 320px) minmax(0, 1fr);
}

body[data-view="catalog"] .catalog-products-panel {
  gap: 10px;
  padding: 13px;
}

body[data-view="catalog"] .catalog-filter-panel {
  grid-template-columns: minmax(300px, 1.6fr) repeat(4, minmax(128px, 0.75fr)) auto;
}

body[data-view="catalog"] .catalog-grid {
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-view="catalog"] .catalog-card {
  border-radius: 8px;
  display: grid;
  grid-template-rows: 118px minmax(118px, 1fr) auto;
  min-height: 0;
}

body[data-view="catalog"] .catalog-media {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 118px;
  padding: 10px 14px 0;
}

body[data-view="catalog"] .catalog-media img {
  height: 100%;
  max-height: 108px;
  object-fit: contain;
  width: 100%;
}

body[data-view="catalog"] .catalog-media span {
  align-items: center;
  color: #344054;
  display: inline-flex;
  font-size: 28px;
  font-weight: 900;
  height: 100%;
  justify-content: center;
  width: 100%;
}

body[data-view="catalog"] .catalog-card-body {
  align-content: start;
  display: grid;
  gap: 6px;
  padding: 8px 12px 7px;
}

body[data-view="catalog"] .catalog-card-body h3 {
  -webkit-line-clamp: 3;
  color: #081125;
  font-size: 14px;
  line-height: 1.17;
  margin: 0;
  min-height: 49px;
}

body[data-view="catalog"] .catalog-badge-row {
  gap: 5px;
  min-height: 22px;
}

body[data-view="catalog"] .catalog-stock-badge {
  border-radius: 5px;
  font-size: 10.5px;
  line-height: 1;
  padding: 4px 6px;
}

body[data-view="catalog"] .catalog-meta {
  display: grid;
  gap: 2px;
}

body[data-view="catalog"] .catalog-meta span {
  color: #667085;
  font-size: 11.5px;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-view="catalog"] .catalog-card-actions {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

body[data-view="catalog"] .catalog-card-price-row {
  align-items: end;
  display: grid;
  gap: 3px;
}

body[data-view="catalog"] .catalog-card-price-row strong {
  color: #081125;
  font-size: 16px;
  line-height: 1.05;
  margin: 0;
}

body[data-view="catalog"] .catalog-card-price-row span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

body[data-view="catalog"] .catalog-card-actions > div:not(.catalog-card-price-row) {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

body[data-view="catalog"] .catalog-card-actions button {
  min-height: 34px;
}

body[data-view="catalog"] .catalog-pagination {
  padding-top: 4px;
}

@media (min-width: 1680px) {
  body[data-view="catalog"] .catalog-card {
    grid-template-rows: 112px minmax(112px, 1fr) auto;
  }

  body[data-view="catalog"] .catalog-media {
    min-height: 112px;
  }

  body[data-view="catalog"] .catalog-media img {
    max-height: 102px;
  }
}

/* Catalog page is mounted with data-current-view in the live shell, so keep unprefixed page overrides too. */
.catalog-page .catalog-action-button.primary,
.catalog-page .catalog-card-actions button.primary {
  background: #0b5cff;
  border-color: #0b5cff;
  color: #ffffff;
}

.catalog-page .catalog-card {
  grid-template-rows: 108px auto auto;
}

.catalog-page .catalog-media {
  min-height: 108px;
  padding: 8px 14px 0;
}

.catalog-page .catalog-media img {
  max-height: 100px;
}

.catalog-page .catalog-card-body {
  gap: 5px;
  padding: 7px 12px 6px;
}

.catalog-page .catalog-card-body h3 {
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.18;
  min-height: 34px;
}

.catalog-page .catalog-badge-row {
  min-height: 20px;
}

.catalog-page .catalog-stock-badge {
  font-size: 10.5px;
  padding: 4px 6px;
}

.catalog-page .catalog-meta {
  display: grid;
  gap: 2px;
}

.catalog-page .catalog-meta span {
  color: #667085;
  font-size: 11.5px;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-page .catalog-card-actions {
  gap: 7px;
  padding: 0 12px 12px;
}

.catalog-page .catalog-card-price-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
}

.catalog-page .catalog-card-price-row strong {
  color: #081125;
  font-size: 16px;
  line-height: 1.05;
  margin: 0;
}

.catalog-page .catalog-card-price-row span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-page .catalog-card-actions > div:not(.catalog-card-price-row) {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

/* Warehouse suite table: keep the central list readable beside the product side panel. */
.warehouse-suite-page .warehouse-stock-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.warehouse-suite-page .warehouse-stock-table th:nth-child(7),
.warehouse-suite-page .warehouse-stock-table td:nth-child(7),
.warehouse-suite-page .warehouse-stock-table th:nth-child(8),
.warehouse-suite-page .warehouse-stock-table td:nth-child(8),
.warehouse-suite-page .warehouse-stock-table th:nth-child(9),
.warehouse-suite-page .warehouse-stock-table td:nth-child(9),
.warehouse-suite-page .warehouse-stock-table th:nth-child(11),
.warehouse-suite-page .warehouse-stock-table td:nth-child(11) {
  display: none;
}

.warehouse-suite-page .warehouse-stock-table th:nth-child(1),
.warehouse-suite-page .warehouse-stock-table td:nth-child(1) {
  width: 42%;
}

.warehouse-suite-page .warehouse-stock-table th:nth-child(2),
.warehouse-suite-page .warehouse-stock-table td:nth-child(2) {
  width: 15%;
}

.warehouse-suite-page .warehouse-stock-table th:nth-child(3),
.warehouse-suite-page .warehouse-stock-table td:nth-child(3) {
  width: 15%;
}

.warehouse-suite-page .warehouse-stock-table th:nth-child(4),
.warehouse-suite-page .warehouse-stock-table td:nth-child(4),
.warehouse-suite-page .warehouse-stock-table th:nth-child(5),
.warehouse-suite-page .warehouse-stock-table td:nth-child(5),
.warehouse-suite-page .warehouse-stock-table th:nth-child(6),
.warehouse-suite-page .warehouse-stock-table td:nth-child(6) {
  width: 8%;
}

.warehouse-suite-page .warehouse-stock-table th:nth-child(10),
.warehouse-suite-page .warehouse-stock-table td:nth-child(10) {
  width: 12%;
}

.warehouse-suite-page .warehouse-stock-table td,
.warehouse-suite-page .warehouse-stock-table th {
  overflow: hidden;
  text-overflow: ellipsis;
}

.erp-control-page {
  background: #fff;
  color: #0f172a;
  display: grid;
  gap: 14px;
  min-height: calc(100vh - 108px);
  padding: 18px;
}

.erp-control-hero,
.erp-control-metric,
.erp-control-list,
.erp-control-side section,
.erp-control-issue,
.erp-control-repair-result {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.erp-control-hero {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px;
}

.erp-control-hero h2 {
  font-size: 26px;
  line-height: 1.15;
  margin: 3px 0 6px;
}

.erp-control-hero p,
.erp-control-section-head p,
.erp-control-side p {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.erp-control-kicker,
.erp-control-area,
.erp-control-metric span,
.erp-control-issue-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.erp-control-hero-green {
  border-color: #bbf7d0;
}

.erp-control-hero-orange {
  border-color: #fed7aa;
}

.erp-control-hero-red {
  border-color: #fecaca;
}

.erp-control-hero-actions {
  align-items: stretch;
  display: grid;
  gap: 8px;
  min-width: 300px;
}

.erp-control-hero-actions > span {
  color: #64748b;
  font-size: 12px;
  text-align: right;
}

.erp-control-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.erp-control-metric {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 88px;
  padding: 14px;
}

.erp-control-metric-icon .order-action-icon {
  height: 44px;
  width: 44px;
}

.erp-control-metric strong {
  display: block;
  font-size: 24px;
  line-height: 1.05;
  margin: 3px 0;
}

.erp-control-metric small,
.erp-control-issue-grid small,
.erp-control-area-row span,
.erp-control-repair-result small {
  color: #64748b;
  display: block;
  font-size: 12px;
}

.erp-control-metric-blue .order-action-icon { color: #2563eb; }
.erp-control-metric-green .order-action-icon { color: #059669; }
.erp-control-metric-orange .order-action-icon { color: #d97706; }
.erp-control-metric-red .order-action-icon { color: #dc2626; }

.erp-control-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
}

.erp-control-list,
.erp-control-side section {
  padding: 14px;
}

.erp-control-list {
  display: grid;
  gap: 12px;
}

.erp-control-section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.erp-control-section-head h3,
.erp-control-side h3,
.erp-control-issue h3 {
  font-size: 17px;
  line-height: 1.2;
  margin: 0;
}

.erp-control-issue {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.erp-control-issue-safe {
  border-left: 4px solid #059669;
}

.erp-control-issue-manual {
  border-left: 4px solid #d97706;
}

.erp-control-issue-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.erp-control-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.erp-control-chip.chip-green {
  background: #dcfce7;
  color: #047857;
}

.erp-control-chip.chip-orange {
  background: #ffedd5;
  color: #c2410c;
}

.erp-control-issue-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.erp-control-issue-grid > div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  min-width: 0;
  padding: 9px;
}

.erp-control-issue-grid strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-control-reason {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  color: #7c2d12;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  padding: 10px;
}

.erp-control-resolution {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.erp-control-resolution strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.25;
}

.erp-control-resolution ol {
  color: #334155;
  display: grid;
  font-size: 13px;
  gap: 5px;
  line-height: 1.4;
  margin: 0;
  padding-left: 18px;
}

.erp-control-issue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.erp-control-side {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 12px;
}

.erp-control-area-row {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 0;
}

.erp-control-area-row:first-of-type {
  border-top: 0;
}

.erp-control-area-row b {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 13px;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0 8px;
}

.erp-control-workflow-map {
  display: grid;
  gap: 12px;
}

.erp-control-workflow-meta {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding: 10px;
}

.erp-control-workflow-meta span,
.erp-control-status-counts span,
.erp-control-rule span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.erp-control-workflow-meta b {
  background: #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  padding: 5px 8px;
  white-space: nowrap;
}

.erp-control-status-counts {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.erp-control-status-counts > div {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px;
}

.erp-control-status-counts strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  margin-top: 3px;
}

.erp-control-rules {
  display: grid;
  gap: 8px;
}

.erp-control-rule {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #2563eb;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.erp-control-rule strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.erp-control-rule-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.erp-control-rule-tags small {
  background: #eef2ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 7px;
}

.erp-control-empty {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 150px;
  padding: 18px;
  text-align: center;
}

.erp-control-repair-result {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
}

.erp-control-repair-result > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

@media (max-width: 1180px) {
  .erp-control-hero,
  .erp-control-layout {
    grid-template-columns: 1fr;
  }

  .erp-control-hero-actions {
    min-width: 0;
  }

  .erp-control-hero-actions > span {
    text-align: left;
  }

  .erp-control-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .erp-control-page {
    padding: 12px;
  }

  .erp-control-metrics,
  .erp-control-issue-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .integration-bank-head,
  .integration-bank-fallback,
  .integration-bank-profile-layout,
  .bank-fop-workspace-head,
  .bank-fop-selected-panel {
    grid-template-columns: 1fr;
  }

  .integration-bank-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .integration-bank-audit {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .integration-bank-add,
  .integration-bank-fallback-grid,
  .integration-profile-card-head {
    grid-template-columns: 1fr;
  }

  .integration-bank-tabs button {
    min-width: 170px;
  }
}

/* Design atlas implementation: Site Requests journal + Uman quick offline order */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-journal-page,
.offline-quick-page {
  display: grid;
  gap: 16px;
  background: #fff;
  color: #0f172a;
}

.site-journal-head,
.offline-quick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.site-journal-head h2,
.offline-quick-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.site-journal-head p,
.offline-quick-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

.uman-home-page {
  min-width: 0;
}

.uman-home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.uman-home-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.uman-home-head p {
  margin: 6px 0 0;
  color: #64748b;
}

.uman-home-head > button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.uman-new-sale-card,
.uman-sales-journal {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.uman-new-sale-card {
  display: grid;
  grid-template-columns: minmax(16rem, 0.75fr) minmax(18rem, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.uman-new-sale-card h3 {
  margin: 4px 0 6px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.uman-new-sale-card p {
  margin: 0;
  color: #64748b;
}

.uman-new-sale-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.uman-new-sale-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.uman-home-customer-picker {
  min-width: 0;
  display: grid;
  gap: 8px;
  position: relative;
}

.uman-home-customer-picker .offline-search-field {
  margin: 0;
}

.uman-home-customer-search {
  min-width: 0;
  position: relative;
}

.uman-home-customer-picker small {
  color: #64748b;
}

.uman-home-customer-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.uman-home-customer-results.is-hidden {
  display: none;
}

.uman-home-create-customer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.uman-home-create-customer label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
}

.uman-home-create-customer input,
.uman-home-create-customer select {
  width: 100%;
}

.uman-home-create-customer button {
  min-height: 44px;
  white-space: nowrap;
}

.uman-day-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.uman-day-card {
  min-width: 0;
  min-height: 112px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  display: grid;
  align-content: center;
  gap: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.uman-day-card span {
  color: #64748b;
  font-size: 13px;
}

.uman-day-card strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0;
}

.uman-day-card small {
  color: #64748b;
  font-size: 13px;
}

.uman-sales-journal {
  overflow: hidden;
}

.uman-journal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.uman-journal-toolbar h3 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.uman-journal-date-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.uman-journal-date {
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
}

.uman-journal-date input {
  width: 1.7rem;
  min-width: 1.7rem;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.uman-journal-search {
  margin: 14px 18px;
  min-height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.uman-journal-search .order-action-icon {
  width: 20px;
  height: 20px;
  color: #64748b;
  background: transparent;
}

.uman-journal-search input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
}

.uman-journal-status-filters {
  margin: 0 18px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.uman-journal-status-filters button {
  min-height: 36px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.uman-journal-status-filters button strong {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  text-align: center;
}

.uman-journal-status-filters button.active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.uman-journal-status-filters button.active strong {
  background: #dbeafe;
  color: #1d4ed8;
}

.uman-journal-list {
  display: grid;
  min-width: 0;
}

.uman-journal-header,
.uman-journal-row {
  display: grid;
  grid-template-columns: minmax(11rem, 1.2fr) minmax(7rem, 0.72fr) minmax(12rem, 1.45fr) minmax(7rem, 0.62fr) minmax(7rem, 0.64fr) minmax(7rem, 0.62fr);
  gap: 12px;
  align-items: center;
}

.uman-journal-header {
  min-height: 42px;
  padding: 0 18px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.uman-journal-row {
  min-width: 0;
  padding: 14px 18px;
  border-top: 1px solid #e2e8f0;
  cursor: pointer;
}

.uman-journal-row:hover,
.uman-journal-row:focus {
  background: #f8fbff;
  outline: none;
}

.uman-journal-time {
  color: #64748b;
  font-weight: 700;
}

.uman-journal-status-cell {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 5px;
}

.uman-journal-status-cell small {
  max-width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uman-journal-status-pill {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.uman-journal-status-pill.created {
  color: #9a3412;
  background: #ffedd5;
}

.uman-journal-status-pill.warehouse {
  color: #1d4ed8;
  background: #dbeafe;
}

.uman-journal-status-pill.posted {
  color: #047857;
  background: #dcfce7;
}

.uman-journal-status-pill.cancelled {
  color: #b91c1c;
  background: #fee2e2;
}

.order-uman-customer-edit {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.order-uman-customer-edit summary {
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
}

.order-uman-customer-edit label {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.order-uman-customer-edit label > span,
.order-uman-customer-edit small {
  color: #64748b;
  font-size: 12px;
}

.order-uman-customer-edit select {
  width: 100%;
  min-width: 0;
}

.uman-journal-number {
  justify-self: start;
  min-width: 0;
}

.uman-journal-client {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.uman-journal-client strong,
.uman-journal-client small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uman-journal-client small,
.uman-journal-positions {
  color: #64748b;
}

.uman-payment-pill {
  width: max-content;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.uman-payment-pill.cash {
  color: #047857;
  background: #dcfce7;
}

.uman-payment-pill.card {
  color: #2563eb;
  background: #eff6ff;
}

.uman-payment-pill.debit {
  color: #c2410c;
  background: #ffedd5;
}

.uman-payment-pill.neutral {
  color: #475569;
  background: #f1f5f9;
}

.uman-journal-amount {
  justify-self: end;
  font-size: 18px;
  white-space: nowrap;
}

.uman-empty-day {
  min-height: 210px;
  padding: 32px 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  border-top: 1px solid #e2e8f0;
}

.uman-empty-day strong {
  font-size: 18px;
}

.uman-empty-day p {
  margin: 0;
  color: #64748b;
}

.uman-empty-day button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.uman-journal-footer {
  min-height: 56px;
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
}

.uman-journal-footer strong {
  color: #0f172a;
}

@media (max-width: 1280px) {
  .uman-day-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .uman-new-sale-card,
  .uman-journal-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .uman-new-sale-actions,
  .uman-journal-date-controls {
    justify-content: flex-start;
  }

  .uman-home-create-customer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .uman-home-create-customer button {
    grid-column: 1 / -1;
  }

  .uman-journal-header,
  .uman-journal-row {
    grid-template-columns: minmax(10rem, 1fr) minmax(11rem, 1.45fr) minmax(6.5rem, 0.66fr) minmax(6.5rem, 0.66fr);
  }

  .uman-journal-header span:nth-child(2),
  .uman-journal-header span:nth-child(4),
  .uman-journal-number,
  .uman-journal-positions {
    display: none;
  }
}

@media (max-width: 768px) {
  .uman-home-head {
    flex-direction: column;
  }

  .uman-home-head > button,
  .uman-new-sale-actions,
  .uman-new-sale-actions button {
    width: 100%;
  }

  .uman-home-create-customer {
    grid-template-columns: 1fr;
  }

  .uman-home-create-customer button {
    width: 100%;
  }

  .uman-day-summary-grid {
    grid-template-columns: 1fr;
  }

  .uman-journal-header,
  .uman-journal-row {
    grid-template-columns: minmax(8.6rem, 0.92fr) minmax(0, 1fr) minmax(5.4rem, 0.55fr) minmax(5.6rem, 0.56fr);
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .uman-journal-header {
    font-size: 11px;
  }

  .uman-journal-search {
    margin-left: 12px;
    margin-right: 12px;
  }

  .uman-journal-status-filters {
    margin-left: 12px;
    margin-right: 12px;
  }

  .uman-journal-amount {
    font-size: 15px;
  }

  .uman-payment-pill {
    padding: 4px 8px;
    font-size: 12px;
  }
}

@media (max-width: 560px) {
  .uman-journal-header,
  .uman-journal-row {
    grid-template-columns: minmax(8.2rem, 0.95fr) minmax(0, 1.1fr) minmax(5.4rem, 0.55fr);
  }

  .uman-journal-header span:nth-child(5),
  .uman-journal-list .uman-payment-pill {
    display: none;
  }

  .uman-journal-status-cell small {
    font-size: 11px;
  }
}

.site-journal-actions {
  display: flex;
  gap: 10px;
}

.site-journal-head-tools {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.site-request-period-control {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: stretch;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.site-request-period-control > button {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.site-request-period-step {
  width: 42px;
  min-width: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.site-request-period-step:first-child {
  border-right: 1px solid #dbe3ef;
}

.site-request-period-step:nth-child(3),
.site-request-period-calendar {
  border-left: 1px solid #dbe3ef;
}

.site-request-period-step .order-action-icon,
.site-request-period-calendar .order-action-icon {
  width: 18px;
  height: 18px;
  background: transparent;
}

.site-request-period-current {
  width: 164px;
  min-width: 0;
  padding: 6px 12px;
  display: grid;
  align-content: center;
  gap: 1px;
  background: #fff;
}

.site-request-period-current span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.1;
}

.site-request-period-current strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-request-period-calendar {
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.site-request-carryover {
  min-width: 0;
  padding: 11px 14px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  background: #fffbeb;
  color: #78350f;
}

.site-request-carryover > .order-action-icon {
  width: 32px;
  height: 32px;
  color: #b45309;
  background: #fef3c7;
}

.site-request-carryover > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.site-request-carryover strong,
.site-request-carryover span {
  line-height: 1.35;
}

.site-request-carryover span {
  color: #92400e;
  font-size: 12px;
}

.site-journal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px;
}

.offline-quick-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.site-journal-kpi-card,
.offline-quick-kpi {
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  column-gap: 12px;
  text-align: left;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.site-journal-kpi-card .order-action-icon,
.offline-quick-kpi .order-action-icon {
  grid-row: span 3;
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.site-journal-kpi-card span,
.offline-quick-kpi span {
  color: #475569;
  font-size: 14px;
}

.site-journal-kpi-card strong,
.offline-quick-kpi strong {
  font-size: 25px;
  line-height: 1.1;
}

.site-journal-kpi-card small,
.offline-quick-kpi small {
  color: #64748b;
  font-size: 12px;
}

.site-journal-kpi-card.is-active {
  border-color: #0b5cff;
  box-shadow: 0 0 0 2px rgba(11, 92, 255, 0.12), 0 10px 26px rgba(15, 23, 42, 0.06);
}

.site-journal-kpi-card.is-active span,
.site-journal-kpi-card.is-active strong {
  color: #0b5cff;
}

.tone-blue .order-action-icon { color: #2563eb; background: #eff6ff; }
.tone-green .order-action-icon { color: #059669; background: #ecfdf5; }
.tone-orange .order-action-icon { color: #f97316; background: #fff7ed; }
.tone-red .order-action-icon { color: #dc2626; background: #fef2f2; }
.tone-violet .order-action-icon { color: #7c3aed; background: #f5f3ff; }

.site-journal-filterbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) auto auto 120px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.site-journal-search,
.offline-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #fff;
}

.site-journal-search .order-action-icon,
.offline-search-field .order-action-icon {
  width: 20px;
  height: 20px;
  color: #64748b;
  background: transparent;
}

.site-journal-search input,
.offline-search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.site-journal-segment {
  display: grid;
  gap: 5px;
}

.site-journal-segment > span {
  font-size: 12px;
  color: #64748b;
}

.site-journal-segment > div {
  display: flex;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  overflow: hidden;
}

.site-journal-segment button {
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid #dbe3ef;
  background: #fff;
  color: #0f172a;
}

.site-journal-segment button:last-child {
  border-right: 0;
}

.site-journal-segment button.active {
  background: #0b5cff;
  color: #fff;
}

.site-journal-filter-button {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.site-journal-filter-button .order-action-icon {
  width: 18px;
  height: 18px;
}

.site-journal-filter-button.active {
  border-color: #0b5cff;
  color: #0b5cff;
  background: #eff6ff;
}

.site-journal-advanced-filters {
  width: min(720px, calc(100vw - 32px));
  padding: 18px;
}

.site-journal-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.site-journal-advanced-grid label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.site-journal-advanced-grid select,
.site-journal-advanced-grid input {
  height: 42px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
}

.site-journal-advanced-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.site-journal-advanced-footer .muted {
  margin-right: auto;
}

.site-journal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.site-journal-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.site-journal-table-card,
.site-journal-side-card,
.site-journal-events,
.offline-quick-card,
.offline-recent-orders {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.site-journal-table-wrap {
  min-width: 0;
  overflow: auto;
  width: 100%;
}

.site-journal-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.site-journal-table th {
  height: 44px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.site-journal-table td {
  padding: 12px 10px;
  border-top: 1px solid #e2e8f0;
  vertical-align: middle;
  font-size: 13px;
}

.site-journal-table th:nth-child(8),
.site-journal-table td:nth-child(8) {
  min-width: 180px;
}

.site-journal-table th:last-child,
.site-journal-table td:last-child {
  background: #fff;
  box-shadow: -10px 0 18px rgba(15, 23, 42, 0.06);
  position: sticky;
  right: 0;
  text-align: right;
  z-index: 3;
}

.site-journal-table th:last-child {
  background: #f8fafc;
  z-index: 4;
}

.site-journal-row {
  cursor: pointer;
}

.site-journal-row.is-selected {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 #0b5cff;
}

.site-journal-row.is-selected td:last-child {
  background: #f8fbff;
}

.site-journal-open-button {
  min-width: 76px;
}

.site-journal-row small,
.site-journal-number + small {
  display: block;
  color: #64748b;
  margin-top: 3px;
}

.site-journal-status-cell {
  align-items: flex-start;
  display: grid;
  gap: 6px;
}

.site-request-work-note-trigger {
  align-items: flex-start;
  background: #fff8e7;
  border: 0;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  color: #713f12;
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr) 14px;
  line-height: 1.3;
  max-width: 190px;
  padding: 5px 6px;
  text-align: left;
  width: 100%;
}

.site-request-work-note-trigger.is-empty {
  background: transparent;
  border-left-color: #cbd5e1;
  color: #64748b;
  font-weight: 600;
}

.site-request-work-note-trigger:hover,
.site-request-work-note-trigger:focus-visible {
  background: #ffefc2;
  color: #7c2d12;
  outline: 2px solid transparent;
}

.site-request-work-note-trigger > span:first-child,
.site-request-work-note-readonly {
  display: -webkit-box;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-request-work-note-trigger .order-action-icon {
  height: 14px;
  margin-top: 1px;
  width: 14px;
}

.site-request-work-note-trigger .order-action-icon svg,
.site-request-work-note-icon .order-action-icon svg {
  height: 100%;
  width: 100%;
}

.site-request-work-note-readonly {
  border-left: 3px solid #f59e0b;
  color: #713f12;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  max-width: 190px;
  padding-left: 6px;
}

.site-request-work-note-editor {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(130px, 1fr) 28px 28px;
  max-width: 230px;
}

.site-request-work-note-editor input {
  border: 1px solid #f59e0b;
  border-radius: 4px;
  font-size: 12px;
  height: 32px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.site-request-work-note-editor input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18);
  outline: 0;
}

.site-request-work-note-icon {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  padding: 6px;
  width: 28px;
}

.site-request-work-note-icon.save {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}

.site-request-work-note-icon:disabled,
.site-request-work-note-editor input:disabled {
  cursor: wait;
  opacity: 0.6;
}

.site-journal-status-reason {
  color: #991b1b;
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  max-width: 170px;
}

.site-journal-status-reason.reason-warning {
  color: #92400e;
}

.site-journal-pagination {
  min-height: 50px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
}

.site-journal-side-card {
  position: sticky;
  top: 14px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.site-journal-side-card.empty {
  min-height: 220px;
  place-content: center;
  color: #64748b;
}

.site-journal-side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.site-journal-side-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.site-journal-side-reason {
  background: #fff1f2;
  border-left: 4px solid #dc2626;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.site-journal-side-reason.reason-warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
}

.site-journal-side-reason span,
.site-journal-side-reason small {
  color: #991b1b;
  font-size: 12px;
  line-height: 1.35;
}

.site-journal-side-reason.reason-warning span,
.site-journal-side-reason.reason-warning small {
  color: #92400e;
}

.site-journal-side-reason strong {
  color: #0f172a;
  font-size: 14px;
}

.site-journal-side-reason p {
  color: #1e293b;
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
  white-space: pre-wrap;
}

.site-journal-side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.site-journal-side-grid div {
  display: grid;
  gap: 4px;
}

.site-journal-side-grid span,
.site-journal-quick-pay span,
.site-journal-linked-payment span {
  color: #64748b;
  font-size: 12px;
}

.site-journal-side-grid strong {
  font-size: 14px;
}

.site-journal-side-actions {
  display: grid;
  gap: 8px;
}

.site-journal-side-actions button,
.site-journal-side-actions .site-request-print-wrap > button {
  width: 100%;
  min-height: 38px;
  justify-content: center;
}

.site-journal-quick-pay,
.site-journal-linked-payment {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.site-journal-events {
  padding: 14px;
}

.site-journal-events h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.site-journal-event-list {
  display: grid;
}

.site-journal-event-row {
  display: grid;
  grid-template-columns: 170px 1fr 150px;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
}

.site-journal-event-row span,
.site-journal-event-row em {
  color: #64748b;
  font-style: normal;
}

.offline-quick-steps {
  height: 58px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  padding: 0 24px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.offline-quick-steps span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #334155;
}

.offline-quick-steps span::after {
  content: "";
  position: absolute;
  right: calc(-50% + 30px);
  width: calc(100% - 60px);
  height: 1px;
  background: #cbd5e1;
}

.offline-quick-steps span:last-child::after {
  display: none;
}

.offline-quick-steps strong {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.offline-quick-steps .active strong {
  color: #fff;
  background: #0b5cff;
  border-color: #0b5cff;
}

.offline-quick-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 410px;
  gap: 14px;
  align-items: start;
}

.offline-quick-card {
  padding: 14px;
}

.offline-quick-card h3,
.offline-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.offline-client-card {
  display: grid;
  gap: 12px;
}

.offline-recent-clients,
.offline-delivery-options {
  display: grid;
  gap: 8px;
}

.offline-recent-clients > span,
.offline-payment-methods > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.offline-client-row,
.offline-delivery-options button {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  text-align: left;
}

.offline-client-row.active,
.offline-delivery-options button.active {
  border-color: #2563eb;
  background: #eff6ff;
}

.offline-delivery-options button {
  justify-content: flex-start;
}

.offline-delivery-options .order-action-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: #2563eb;
  background: #eff6ff;
}

.offline-delivery-options small,
.offline-client-row small {
  display: block;
  color: #64748b;
}

.offline-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.offline-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 130px;
  gap: 10px;
  margin-bottom: 12px;
}

.offline-catalog-toolbar select {
  height: 44px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #fff;
}

.offline-product-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.offline-product-card {
  position: relative;
  min-height: 245px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.offline-product-card.active {
  border-color: #0b5cff;
  box-shadow: 0 0 0 1px #0b5cff;
}

.offline-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid #dbe3ef;
  border-radius: 50%;
  background: #fff;
  color: #2563eb;
}

.offline-product-thumb {
  width: 100%;
  height: 94px;
  border-radius: 6px;
  background: #f8fafc;
  margin: 0;
}

.offline-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.offline-product-card strong {
  min-height: 38px;
  font-size: 14px;
  line-height: 1.25;
}

.offline-product-card small {
  color: #64748b;
  font-size: 12px;
}

.offline-stock {
  width: max-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.offline-stock.success {
  color: #047857;
  background: #dcfce7;
}

.offline-stock.warning {
  color: #b45309;
  background: #fef3c7;
}

.offline-product-card b {
  font-size: 16px;
}

.offline-product-card .primary {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.offline-product-card .order-action-icon {
  width: 18px;
  height: 18px;
  color: currentColor;
  background: transparent;
}

.offline-quantity-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.offline-cart-card {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 12px;
}

.offline-cart-list {
  display: grid;
}

.offline-cart-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 58px 72px 78px 24px;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
}

.offline-cart-row strong {
  font-size: 12px;
  line-height: 1.25;
}

.offline-cart-row input {
  width: 58px;
  height: 32px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  text-align: center;
}

.offline-cart-thumb {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #f8fafc;
  margin: 0;
}

.offline-cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.offline-cart-total {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 14px;
}

.offline-cart-total strong {
  font-size: 18px;
}

.offline-payment-methods {
  display: grid;
  gap: 8px;
}

.offline-payment-methods > div,
.offline-print-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.offline-print-actions {
  grid-template-columns: 1fr 1fr;
}

.offline-payment-methods button,
.offline-print-actions button,
.offline-cart-card > .primary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.offline-payment-methods button {
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
}

.offline-payment-methods button.active {
  color: #0b5cff;
  border-color: #0b5cff;
  background: #eff6ff;
}

.offline-cart-card .success {
  background: #15803d;
}

.offline-recent-orders {
  padding: 14px;
}

.offline-recent-orders table {
  width: 100%;
}

/* Uman modern catalog workspace v1: scoped presentation only. */
body[data-current-view="offlineOrders"] {
  background: #f6f8fb;
  overflow-x: hidden;
}

body[data-current-view="offlineOrders"] #view,
body[data-current-view="offlineOrders"] .offline-modern-page,
body[data-current-view="offlineOrders"] .offline-modern-workspace,
body[data-current-view="offlineOrders"] .offline-catalog-card,
body[data-current-view="offlineOrders"] .offline-cart-card,
body[data-current-view="offlineOrders"] .offline-recent-orders {
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-modern-page {
  background: transparent;
  color: #0f172a;
  gap: 14px;
  padding-bottom: 10px;
}

body[data-current-view="offlineOrders"] .offline-modern-head {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(150px, 0.55fr) minmax(230px, 1.12fr) minmax(220px, 0.92fr) auto minmax(158px, 0.62fr);
}

body[data-current-view="offlineOrders"] .offline-modern-title {
  display: grid;
  gap: 3px;
  padding: 4px 0;
}

body[data-current-view="offlineOrders"] .offline-modern-title h2 {
  color: #111827;
  font-size: 25px;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

body[data-current-view="offlineOrders"] .offline-modern-title p,
body[data-current-view="offlineOrders"] .offline-context-card span,
body[data-current-view="offlineOrders"] .offline-top-invoice-summary span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
}

body[data-current-view="offlineOrders"] .offline-context-card,
body[data-current-view="offlineOrders"] .offline-history-action,
body[data-current-view="offlineOrders"] .offline-top-invoice-summary {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.045);
  display: flex;
  gap: 11px;
  min-height: 54px;
  min-width: 0;
  padding: 10px 12px;
}

body[data-current-view="offlineOrders"] .offline-delivery-context-wrap {
  display: grid;
  min-width: 0;
  position: relative;
}

body[data-current-view="offlineOrders"] button.offline-delivery-context {
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

body[data-current-view="offlineOrders"] button.offline-delivery-context:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

body[data-current-view="offlineOrders"] .offline-delivery-context.is-open {
  border-color: #0b5cff;
  box-shadow: 0 0 0 3px rgba(11, 92, 255, 0.10);
}

body[data-current-view="offlineOrders"] .offline-delivery-popover {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 10px;
  left: 0;
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 26;
}

body[data-current-view="offlineOrders"] .offline-delivery-popover div {
  display: grid;
  gap: 3px;
}

body[data-current-view="offlineOrders"] .offline-delivery-popover span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

body[data-current-view="offlineOrders"] .offline-delivery-popover button {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #0b5cff;
  display: inline-flex;
  font-weight: 900;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
}

body[data-current-view="offlineOrders"] .offline-context-card .order-action-icon,
body[data-current-view="offlineOrders"] .offline-history-action .order-action-icon,
body[data-current-view="offlineOrders"] .offline-top-invoice-summary .order-action-icon {
  background: #eef6ff;
  color: #0b5cff;
  flex: 0 0 30px;
  height: 30px;
  width: 30px;
}

body[data-current-view="offlineOrders"] .offline-context-card > div,
body[data-current-view="offlineOrders"] .offline-top-invoice-summary > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-context-card strong,
body[data-current-view="offlineOrders"] .offline-top-invoice-summary strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-context-card small {
  color: #168a45;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-history-action {
  color: #0f172a;
  font-weight: 800;
  justify-content: center;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-modern-workspace {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(372px, 404px);
}

body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-modern-workspace {
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
}

body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-cart-card {
  display: none;
}

body[data-current-view="offlineOrders"] .offline-customer-stage,
body[data-current-view="offlineOrders"] .offline-catalog-card,
body[data-current-view="offlineOrders"] .offline-cart-card,
body[data-current-view="offlineOrders"] .offline-recent-orders {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.045);
}

body[data-current-view="offlineOrders"] .offline-customer-stage,
body[data-current-view="offlineOrders"] .offline-catalog-card,
body[data-current-view="offlineOrders"] .offline-recent-orders {
  padding: 16px;
}

body[data-current-view="offlineOrders"] .offline-customer-stage {
  display: grid;
  gap: 14px;
}

body[data-current-view="offlineOrders"] .offline-section-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

body[data-current-view="offlineOrders"] .offline-section-head > span {
  align-items: center;
  background: #eef5ff;
  border: 1px solid #d7e7ff;
  border-radius: 999px;
  color: #0b5cff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
  min-height: 24px;
  padding: 0 9px;
}

body[data-current-view="offlineOrders"] .offline-section-head h3,
body[data-current-view="offlineOrders"] .offline-card-head h3 {
  color: #111827;
  font-size: 18px;
  line-height: 1.15;
}

body[data-current-view="offlineOrders"] .offline-section-head p,
body[data-current-view="offlineOrders"] .offline-card-head p {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  margin: 4px 0 0;
}

body[data-current-view="offlineOrders"] .offline-search-field {
  background: #ffffff;
  border-color: #dbe3ef;
  border-radius: 8px;
  height: 42px;
}

body[data-current-view="offlineOrders"] .offline-search-field:focus-within {
  border-color: #0b5cff;
  box-shadow: 0 0 0 3px rgba(11, 92, 255, 0.12);
}

body[data-current-view="offlineOrders"] .offline-recent-clients {
  display: grid;
  gap: 8px;
  max-height: 392px;
  overflow: auto;
}

body[data-current-view="offlineOrders"] .offline-recent-clients > span,
body[data-current-view="offlineOrders"] .offline-payment-methods > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

body[data-current-view="offlineOrders"] .offline-client-row {
  align-items: start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-height: 48px;
  padding: 10px 12px;
  text-align: left;
}

body[data-current-view="offlineOrders"] .offline-client-row span,
body[data-current-view="offlineOrders"] .offline-client-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-client-row:hover,
body[data-current-view="offlineOrders"] .offline-product-card:hover {
  border-color: #9cc5ff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

body[data-current-view="offlineOrders"] .offline-client-row.active {
  background: #f3f8ff;
  border-color: #0b5cff;
}

body[data-current-view="offlineOrders"] .offline-client-row:focus-visible,
body[data-current-view="offlineOrders"] .offline-tabs button:focus-visible,
body[data-current-view="offlineOrders"] .offline-category-strip button:focus-visible,
body[data-current-view="offlineOrders"] .offline-product-card button:focus-visible,
body[data-current-view="offlineOrders"] .offline-cart-row button:focus-visible,
body[data-current-view="offlineOrders"] .offline-payment-methods button:focus-visible,
body[data-current-view="offlineOrders"] .offline-submit-actions button:focus-visible {
  outline: 3px solid rgba(11, 92, 255, 0.24);
  outline-offset: 2px;
}

body[data-current-view="offlineOrders"] .offline-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

body[data-current-view="offlineOrders"] .offline-tabs {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 22px;
  min-height: 38px;
}

body[data-current-view="offlineOrders"] .offline-tabs button {
  background: transparent;
  border: 0;
  color: #475569;
  font-weight: 900;
  height: 38px;
  padding: 0 2px;
  position: relative;
}

body[data-current-view="offlineOrders"] .offline-tabs button.active {
  color: #0b5cff;
}

body[data-current-view="offlineOrders"] .offline-tabs button.active::after {
  background: #0b5cff;
  border-radius: 999px;
  bottom: -1px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
}

body[data-current-view="offlineOrders"] .offline-filter-summary {
  align-items: center;
  color: #64748b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-filter-summary .order-action-icon {
  background: #f3f7fb;
  color: #64748b;
  height: 26px;
  width: 26px;
}

body[data-current-view="offlineOrders"] .offline-catalog-toolbar {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) 42px minmax(132px, auto) minmax(132px, auto) minmax(132px, auto);
  margin-bottom: 14px;
}

body[data-current-view="offlineOrders"] .offline-barcode-indicator {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  color: #475569;
  display: inline-flex;
  height: 42px;
  justify-content: center;
}

body[data-current-view="offlineOrders"] .offline-barcode-indicator .order-action-icon {
  background: transparent;
  color: currentColor;
  height: 22px;
  width: 22px;
}

body[data-current-view="offlineOrders"] .offline-catalog-toolbar select {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  color: #0f172a;
  height: 42px;
  min-width: 0;
  padding: 0 11px;
}

body[data-current-view="offlineOrders"] .offline-category-strip {
  display: grid;
  gap: 8px;
  grid-auto-columns: minmax(132px, 1fr);
  grid-auto-flow: column;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 3px;
}

body[data-current-view="offlineOrders"] .offline-category-strip button {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 9px 12px;
  text-align: left;
}

body[data-current-view="offlineOrders"] .offline-category-strip button.active {
  background: #f3f8ff;
  border-color: #0b5cff;
  box-shadow: inset 0 0 0 1px #0b5cff;
}

body[data-current-view="offlineOrders"] .offline-category-strip span {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-category-strip small {
  color: #64748b;
  font-size: 11px;
}

body[data-current-view="offlineOrders"] .offline-catalog-meta {
  align-items: center;
  color: #475569;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: space-between;
  margin-bottom: 14px;
}

body[data-current-view="offlineOrders"] .offline-view-indicator {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
}

body[data-current-view="offlineOrders"] .offline-view-indicator span {
  align-items: center;
  border-radius: 6px;
  color: #64748b;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

body[data-current-view="offlineOrders"] .offline-view-indicator span.active {
  background: #0b5cff;
  color: #ffffff;
}

body[data-current-view="offlineOrders"] .offline-view-indicator .order-action-icon {
  background: transparent;
  color: currentColor;
  height: 18px;
  width: 18px;
}

body[data-current-view="offlineOrders"] .offline-product-results {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-current-view="offlineOrders"] .offline-product-card {
  align-content: start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-height: 270px;
  padding: 12px;
  position: relative;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body[data-current-view="offlineOrders"] .offline-product-card:hover {
  transform: translateY(-1px);
}

body[data-current-view="offlineOrders"] .offline-product-card.active {
  border-color: #0b5cff;
  box-shadow: inset 0 0 0 1px #0b5cff, 0 14px 30px rgba(15, 23, 42, 0.07);
}

body[data-current-view="offlineOrders"] .offline-product-card.is-unavailable {
  background: linear-gradient(180deg, #ffffff, #fffdf8);
  border-color: #f4c989;
}

body[data-current-view="offlineOrders"] .offline-product-select {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #0b5cff;
  font-size: 11px;
  font-weight: 900;
  min-height: 26px;
  padding: 0 10px;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

body[data-current-view="offlineOrders"] .offline-product-media {
  align-items: end;
  display: grid;
  gap: 7px;
  justify-items: center;
}

body[data-current-view="offlineOrders"] .offline-product-thumb {
  background: #f8fafc;
  border: 0;
  border-radius: 8px;
  height: 104px;
  margin: 0;
  width: 100%;
}

body[data-current-view="offlineOrders"] .offline-product-thumb img {
  height: 100%;
  object-fit: contain;
  padding: 8px;
  width: 100%;
}

body[data-current-view="offlineOrders"] .offline-stock {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  width: max-content;
}

body[data-current-view="offlineOrders"] .offline-stock.success {
  background: #dcfce7;
  color: #047857;
}

body[data-current-view="offlineOrders"] .offline-stock.warning {
  background: #fff7ed;
  color: #c2410c;
}

body[data-current-view="offlineOrders"] .offline-stock.danger {
  background: #fee2e2;
  color: #b91c1c;
}

body[data-current-view="offlineOrders"] .offline-product-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-product-main strong {
  color: #0f172a;
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.25;
  min-height: 35px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-current-view="offlineOrders"] .offline-product-main small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-product-main .offline-stock-warning {
  color: #c2410c;
  white-space: normal;
}

body[data-current-view="offlineOrders"] .offline-product-footer {
  align-items: end;
  display: grid;
  gap: 8px;
  margin-top: auto;
}

body[data-current-view="offlineOrders"] .offline-product-footer b {
  color: #0f172a;
  font-size: 17px;
  line-height: 1.1;
}

body[data-current-view="offlineOrders"] .offline-product-footer b span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

body[data-current-view="offlineOrders"] .offline-added-chip {
  background: #eef6ff;
  border-radius: 999px;
  color: #0b5cff;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  width: max-content;
}

body[data-current-view="offlineOrders"] .offline-product-card .primary,
body[data-current-view="offlineOrders"] .offline-cart-compact-rail .primary,
body[data-current-view="offlineOrders"] .offline-submit-actions .primary {
  background: #0b5cff;
  border-color: #0b5cff;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(11, 92, 255, 0.18);
}

body[data-current-view="offlineOrders"] .offline-product-card .primary {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 36px;
  width: 100%;
}

body[data-current-view="offlineOrders"] .offline-product-card .order-action-icon,
body[data-current-view="offlineOrders"] .offline-submit-actions .order-action-icon {
  background: transparent;
  color: currentColor;
  height: 18px;
  width: 18px;
}

body[data-current-view="offlineOrders"] .offline-cart-card {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 16px;
  position: sticky;
  top: 14px;
}

body[data-current-view="offlineOrders"] .offline-cart-head-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

body[data-current-view="offlineOrders"] .offline-cart-panel-close {
  display: none;
}

body[data-current-view="offlineOrders"] .offline-cart-list {
  display: grid;
  gap: 0;
}

body[data-current-view="offlineOrders"] .offline-cart-empty,
body[data-current-view="offlineOrders"] .offline-empty-inline,
body[data-current-view="offlineOrders"] .empty-search {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  padding: 13px;
}

body[data-current-view="offlineOrders"] .offline-cart-row {
  align-items: start;
  border-top: 1px solid #e6ebf2;
  display: grid;
  gap: 8px;
  grid-template-areas:
    "thumb main remove"
    "thumb qty remove"
    "thumb meta total";
  grid-template-columns: 38px minmax(0, 1fr) 78px;
  padding: 11px 0;
  row-gap: 7px;
}

body[data-current-view="offlineOrders"] .offline-cart-line-main {
  display: grid;
  gap: 3px;
  grid-area: main;
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-cart-line-main strong {
  color: #0f172a;
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.22;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-current-view="offlineOrders"] .offline-cart-line-main small,
body[data-current-view="offlineOrders"] .offline-cart-line-main em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-cart-line-main em {
  color: #c2410c;
}

body[data-current-view="offlineOrders"] .offline-cart-thumb {
  background: #f8fafc;
  border-radius: 7px;
  grid-area: thumb;
  height: 36px;
  margin: 0;
  width: 36px;
}

body[data-current-view="offlineOrders"] .offline-cart-thumb img {
  height: 100%;
  object-fit: contain;
  padding: 3px;
  width: 100%;
}

body[data-current-view="offlineOrders"] .offline-cart-qty-control {
  align-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: grid;
  grid-area: qty;
  grid-template-columns: 24px 1fr 24px;
  height: 34px;
  overflow: hidden;
  width: 90px;
}

body[data-current-view="offlineOrders"] .offline-cart-qty-control button {
  background: #ffffff;
  border: 0;
  color: #0b5cff;
  font-size: 17px;
  font-weight: 900;
  height: 100%;
}

body[data-current-view="offlineOrders"] .offline-cart-qty-control input {
  border: 0;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  height: 100%;
  min-width: 0;
  text-align: center;
  width: 100%;
}

body[data-current-view="offlineOrders"] .offline-cart-unit,
body[data-current-view="offlineOrders"] .offline-cart-price,
body[data-current-view="offlineOrders"] .offline-cart-row > b {
  color: #0f172a;
  font-size: 12px;
  text-align: right;
}

body[data-current-view="offlineOrders"] .offline-cart-price-meta {
  align-items: center;
  display: flex;
  gap: 8px;
  grid-area: meta;
  justify-content: space-between;
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-cart-unit {
  color: #64748b;
  text-align: left;
}

body[data-current-view="offlineOrders"] .offline-cart-remove {
  color: #64748b;
  grid-area: remove;
  justify-self: end;
  min-width: 0;
  padding: 0;
}

body[data-current-view="offlineOrders"] .offline-cart-row > b {
  grid-area: total;
  justify-self: end;
  line-height: 1.25;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-cart-total {
  background: #f7fbff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.55fr;
  overflow: hidden;
}

body[data-current-view="offlineOrders"] .offline-cart-total span,
body[data-current-view="offlineOrders"] .offline-cart-total strong {
  display: grid;
  gap: 3px;
  padding: 12px;
}

body[data-current-view="offlineOrders"] .offline-cart-total span + span,
body[data-current-view="offlineOrders"] .offline-cart-total strong {
  border-left: 1px solid #dbeafe;
}

body[data-current-view="offlineOrders"] .offline-cart-total small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

body[data-current-view="offlineOrders"] .offline-cart-total b {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.1;
}

body[data-current-view="offlineOrders"] .offline-cart-total strong b {
  color: #0b5cff;
  font-size: 21px;
}

body[data-current-view="offlineOrders"] .offline-payment-methods {
  border-top: 1px solid #e6ebf2;
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

body[data-current-view="offlineOrders"] .offline-payment-methods small {
  color: #64748b;
  font-size: 11px;
}

body[data-current-view="offlineOrders"] .offline-payment-methods > div,
body[data-current-view="offlineOrders"] .offline-print-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-current-view="offlineOrders"] .offline-print-actions {
  grid-template-columns: 1fr 1fr;
}

body[data-current-view="offlineOrders"] .offline-payment-methods button,
body[data-current-view="offlineOrders"] .offline-print-actions button,
body[data-current-view="offlineOrders"] .offline-submit-actions button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 12px;
  gap: 7px;
  justify-content: center;
  min-height: 38px;
}

body[data-current-view="offlineOrders"] .offline-payment-methods button {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  color: #0f172a;
}

body[data-current-view="offlineOrders"] .offline-payment-methods button.active {
  background: #eff6ff;
  border-color: #0b5cff;
  color: #0b5cff;
}

body[data-current-view="offlineOrders"] .offline-print-actions button:disabled {
  background: #f3f6fa;
  border-color: #e2e8f0;
  color: #94a3b8;
}

body[data-current-view="offlineOrders"] .offline-submit-actions {
  display: grid;
  gap: 8px;
}

body[data-current-view="offlineOrders"] .offline-submit-actions .primary {
  font-size: 15px;
  min-height: 46px;
}

body[data-current-view="offlineOrders"] .offline-no-ttn-note {
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

body[data-current-view="offlineOrders"] .offline-cart-compact-rail {
  display: none;
}

body[data-current-view="offlineOrders"] .offline-recent-orders {
  padding: 16px;
}

body[data-current-view="offlineOrders"] .offline-recent-orders .eyebrow {
  color: #64748b;
  font-size: 11px;
}

body[data-current-view="offlineOrders"] .offline-recent-orders h3 {
  margin: 2px 0 0;
}

body[data-current-view="offlineOrders"] .offline-recent-table-wrap {
  overflow-x: auto;
}

body[data-current-view="offlineOrders"] .offline-recent-orders table {
  min-width: 980px;
}

@media (max-width: 1360px) {
  body[data-current-view="offlineOrders"] .offline-modern-head {
    grid-template-columns: minmax(140px, 0.45fr) minmax(220px, 1fr) minmax(210px, 0.8fr) minmax(150px, auto);
  }

  body[data-current-view="offlineOrders"] .offline-history-action {
    grid-column: auto;
  }

  body[data-current-view="offlineOrders"] .offline-top-invoice-summary {
    display: none;
  }

  body[data-current-view="offlineOrders"] .offline-product-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body[data-current-view="offlineOrders"] .offline-modern-page {
    padding-bottom: 78px;
  }

  body[data-current-view="offlineOrders"] .offline-modern-head {
    grid-template-columns: minmax(132px, 0.5fr) minmax(220px, 1fr) minmax(198px, 0.9fr);
  }

  body[data-current-view="offlineOrders"] .offline-history-action {
    display: none;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace,
  body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-modern-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="offlineOrders"] .offline-catalog-toolbar {
    grid-template-columns: minmax(260px, 1fr) 42px minmax(128px, auto) minmax(128px, auto);
  }

  body[data-current-view="offlineOrders"] .offline-catalog-toolbar select[aria-label="Сортування"] {
    display: none;
  }

  body[data-current-view="offlineOrders"] .offline-product-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail {
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbeafe;
    border-radius: 8px;
    bottom: 16px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    left: max(16px, env(safe-area-inset-left));
    padding: 10px 12px;
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    z-index: 60;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail > div {
    display: grid;
    gap: 2px;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail strong {
    color: #0f172a;
    font-size: 13px;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail b {
    color: #0b5cff;
    font-size: 16px;
  }

  body[data-current-view="offlineOrders"] .offline-cart-card {
    bottom: 16px;
    box-shadow: 0 26px 64px rgba(15, 23, 42, 0.26);
    max-height: calc(100vh - 102px);
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 16px;
    top: 72px;
    transform: translateX(calc(100% + 28px));
    transition: transform 0.2s ease, opacity 0.2s ease;
    width: min(410px, calc(100vw - 64px));
    z-index: 70;
  }

  body[data-current-view="offlineOrders"] .offline-modern-page.is-cart-panel-open .offline-cart-card {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  body[data-current-view="offlineOrders"] .offline-cart-panel-close {
    display: inline-flex;
  }
}

@media (max-width: 1040px) {
  body[data-current-view="offlineOrders"] .offline-modern-head {
    grid-template-columns: 1fr;
  }

  body[data-current-view="offlineOrders"] .offline-modern-title {
    padding: 0;
  }

  body[data-current-view="offlineOrders"] .offline-context-card {
    min-height: 48px;
  }

  body[data-current-view="offlineOrders"] .offline-catalog-toolbar {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  body[data-current-view="offlineOrders"] .offline-catalog-toolbar select {
    grid-column: span 1;
  }

  body[data-current-view="offlineOrders"] .offline-product-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.finance-center-filter {
  align-items: end;
}

.finance-center-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.finance-center-panel {
  min-width: 0;
}

.finance-center-panel:last-child {
  grid-column: 1 / -1;
}

.finance-center-metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.finance-center-metric-row span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
}

.finance-center-metric-row strong {
  color: #0f172a;
  font-size: 15px;
}

.finance-center-categories {
  margin-top: 16px;
}

.finance-center-category-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 110px auto;
  gap: 8px;
  margin: 12px 0;
}

.finance-center-category-form input,
.finance-center-category-form select {
  min-height: 36px;
}

.finance-center-kpi-button {
  width: 100%;
  min-height: 0;
  text-align: left;
  cursor: pointer;
}

.finance-center-kpi-button:hover {
  border-color: #0b5cff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

.finance-center-breakdown-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  padding: 18px;
}

.finance-center-breakdown-dialog header,
.finance-center-breakdown-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.finance-center-breakdown-dialog h2 {
  margin: 0;
}

.finance-center-breakdown-dialog p {
  margin: 6px 0 0;
  color: #64748b;
}

.finance-center-breakdown-summary {
  margin: 14px 0;
  justify-content: flex-start;
}

.finance-center-breakdown-summary span {
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
}

.finance-center-breakdown-summary strong {
  color: #0f172a;
}

.bank-allocation-v2,
.bank-candidate-list,
.bank-secondary-actions {
  display: grid;
  gap: 10px;
}

body[data-current-view="bankPayments"] .bank-exact-match,
body[data-current-view="bankPayments"] .bank-primary-link,
body[data-current-view="bankPayments"] .bank-other-candidates {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

body[data-current-view="bankPayments"] .bank-exact-match.has-match {
  background: #f0fdf4;
  border-color: #a7e3be;
}

body[data-current-view="bankPayments"] .bank-exact-match.no-match {
  background: #fffaf0;
  border-color: #f2cf8d;
}

body[data-current-view="bankPayments"] .bank-exact-match > p,
body[data-current-view="bankPayments"] .bank-allocation-guidance,
body[data-current-view="bankPayments"] .bank-candidate-empty {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

body[data-current-view="bankPayments"] .bank-match-badge {
  background: #ffffff;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #167647;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

body[data-current-view="bankPayments"] .bank-exact-match.no-match .bank-match-badge {
  color: #9a6700;
}

body[data-current-view="bankPayments"] .bank-exact-match-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b7d9c4;
  border-radius: 8px;
  color: #0f172a;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 11px 12px;
  text-align: left;
  width: 100%;
}

body[data-current-view="bankPayments"] .bank-exact-match-button:hover,
body[data-current-view="bankPayments"] .bank-exact-match-button.is-selected {
  background: #e7f8ed;
  border-color: #198754;
}

body[data-current-view="bankPayments"] .bank-exact-match-button > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-current-view="bankPayments"] .bank-exact-match-button strong,
body[data-current-view="bankPayments"] .bank-exact-match-button small {
  overflow-wrap: anywhere;
}

body[data-current-view="bankPayments"] .bank-exact-match-button small {
  color: #64748b;
}

body[data-current-view="bankPayments"] .bank-exact-match-button b {
  color: #167647;
  font-size: 13px;
}

body[data-current-view="bankPayments"] .bank-settlement-control {
  background: #f8fafc;
  border-bottom: 1px solid #dbe3ef;
  border-top: 1px solid #dbe3ef;
  display: grid;
  gap: 10px;
  margin: 2px 0;
  padding: 12px 0;
}

body[data-current-view="bankPayments"] .bank-settlement-control.is-posted {
  background: #f3faf6;
  border-color: #b7ddc7;
  padding: 12px;
}

body[data-current-view="bankPayments"] .bank-settlement-control.is-compact {
  background: transparent;
  border-bottom: 0;
  margin-bottom: -2px;
  padding-bottom: 0;
}

body[data-current-view="bankPayments"] .bank-settlement-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

body[data-current-view="bankPayments"] .bank-settlement-head > div {
  display: grid;
  gap: 2px;
}

body[data-current-view="bankPayments"] .bank-settlement-head span,
body[data-current-view="bankPayments"] .bank-settlement-metrics span {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

body[data-current-view="bankPayments"] .bank-settlement-status {
  background: #eef4ff;
  border: 1px solid #b2ccff;
  border-radius: 999px;
  color: #1849a9;
  font-size: 12px;
  padding: 5px 9px;
  white-space: nowrap;
}

body[data-current-view="bankPayments"] .bank-settlement-control[data-outcome="closed"] .bank-settlement-status,
body[data-current-view="bankPayments"] .bank-settlement-control[data-outcome="allocated"] .bank-settlement-status {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

body[data-current-view="bankPayments"] .bank-settlement-control[data-outcome="advance"] .bank-settlement-status,
body[data-current-view="bankPayments"] .bank-settlement-control[data-outcome="mixed"] .bank-settlement-status,
body[data-current-view="bankPayments"] .bank-settlement-control[data-outcome="partial"] .bank-settlement-status {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}

body[data-current-view="bankPayments"] .bank-settlement-control[data-outcome="error"] .bank-settlement-status {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}

body[data-current-view="bankPayments"] .bank-settlement-metrics {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

body[data-current-view="bankPayments"] .bank-settlement-metrics > div {
  background: #ffffff;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
}

body[data-current-view="bankPayments"] .bank-settlement-metrics strong {
  color: #101828;
  font-size: 13px;
  overflow-wrap: anywhere;
}

body[data-current-view="bankPayments"] .bank-settlement-control > p,
body[data-current-view="bankPayments"] .bank-settlement-existing,
body[data-current-view="bankPayments"] .bank-settlement-legacy {
  color: #475467;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

body[data-current-view="bankPayments"] .bank-settlement-existing strong {
  color: #101828;
}

body[data-current-view="bankPayments"] .bank-settlement-legacy {
  border-left: 3px solid #fdb022;
  padding-left: 8px;
}

body[data-current-view="bankPayments"] .bank-posted-allocation-orders {
  border-top: 1px solid #e4e7ec;
  display: grid;
  gap: 7px;
  padding-top: 9px;
}

body[data-current-view="bankPayments"] .bank-posted-allocation-orders > div {
  align-items: start;
  display: grid;
  gap: 2px;
  grid-template-columns: minmax(80px, auto) minmax(0, 1fr);
}

body[data-current-view="bankPayments"] .bank-posted-allocation-orders small {
  color: #667085;
  text-align: right;
}

body[data-current-view="bankPayments"] .bank-primary-link {
  background: #f8fbff;
}

body[data-current-view="bankPayments"] .bank-document-search-field > span {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

body[data-current-view="bankPayments"] .bank-other-candidates {
  background: #ffffff;
}

body[data-current-view="bankPayments"] .bank-other-candidates > summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 2px;
  grid-template-columns: minmax(0, 1fr) auto;
  list-style: none;
}

body[data-current-view="bankPayments"] .bank-other-candidates > summary::-webkit-details-marker {
  display: none;
}

body[data-current-view="bankPayments"] .bank-other-candidates > summary span {
  color: #344054;
  font-weight: 800;
}

body[data-current-view="bankPayments"] .bank-other-candidates > summary small {
  color: #667085;
  font-size: 12px;
}

body[data-current-view="bankPayments"] .bank-other-candidates > summary::after {
  color: #667085;
  content: "+";
  font-size: 18px;
  grid-column: 2;
  grid-row: 1 / span 2;
}

body[data-current-view="bankPayments"] .bank-other-candidates[open] > summary::after {
  content: "−";
}

.bank-allocation-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bank-candidate-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  text-align: left;
}

.bank-candidate-card.active,
.bank-candidate-card:hover {
  border-color: #0b5cff;
  background: #eff6ff;
}

.bank-candidate-card span,
.bank-candidate-card small {
  color: #64748b;
}

.bank-allocation-orders {
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
}

.bank-allocation-orders table {
  table-layout: fixed;
  width: 100%;
}

.bank-allocation-amount-input {
  width: 100%;
  min-width: 88px;
}

.bank-allocation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bank-allocation-summary span {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
}

.bank-allocation-summary strong {
  color: #0f172a;
}

.bank-legacy-link {
  margin-top: 12px;
}

@media (max-width: 1500px) {
  .site-journal-kpi-grid,
  .offline-quick-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .offline-quick-workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .offline-cart-card {
    grid-column: 1 / -1;
    position: static;
  }
}

@media (max-width: 1180px) {
  .site-journal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .site-journal-head-tools {
    justify-content: space-between;
  }

  .site-journal-layout,
  .site-journal-filterbar,
  .finance-center-layout,
  .offline-quick-workspace {
    grid-template-columns: 1fr;
  }

  .finance-center-metric-row,
  .finance-center-category-form {
    grid-template-columns: 1fr;
  }

  .finance-center-breakdown-dialog header,
  .finance-center-breakdown-summary {
    display: grid;
  }

  .bank-allocation-summary {
    grid-template-columns: 1fr;
  }

  .site-journal-side-card {
    position: static;
  }

  .site-journal-advanced-grid {
    grid-template-columns: 1fr;
  }

  .offline-product-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-journal-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .site-journal-kpi-card {
    padding: 13px;
  }

  .site-journal-head-tools,
  .site-journal-actions {
    width: 100%;
  }

  .site-request-period-control {
    width: 100%;
    flex-wrap: wrap;
  }

  .site-request-period-current {
    width: auto;
    flex: 1 1 0;
  }

  .site-request-period-calendar {
    width: 100%;
    justify-content: center;
    border-top: 1px solid #dbe3ef;
    border-left: 0;
  }

  .site-journal-actions > button {
    flex: 1 1 0;
  }

  .site-request-carryover {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .site-request-carryover > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  body[data-current-view="bankPayments"] .bank-fop-card-grid,
  body[data-current-view="bankPayments"] .bank-kpi-grid,
  body[data-current-view="bankPayments"] .bank-fop-tabs,
  body[data-current-view="bankPayments"] .bank-channel-filter,
  body[data-current-view="bankPayments"] .bank-status-filter,
  body[data-current-view="bankPayments"] .bank-table-footer {
    grid-template-columns: 1fr;
  }

  body[data-current-view="bankPayments"] .bank-fop-workspace,
  body[data-current-view="bankPayments"] .bank-allocation-panel,
  body[data-current-view="bankPayments"] .bank-payments-table-card {
    padding: 10px;
  }

  body[data-current-view="bankPayments"] .bank-allocation-facts div {
    grid-template-columns: 1fr;
  }

  body[data-current-view="bankPayments"] .bank-exact-match-button {
    align-items: start;
    grid-template-columns: 1fr;
  }

  body[data-current-view="bankPayments"] .bank-allocation-subhead {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  body[data-current-view="bankPayments"] .bank-workspace-actions > button {
    line-height: 1.3;
    white-space: normal;
  }

  body[data-current-view="bankPayments"] .bank-settlement-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-current-view="bankPayments"] .bank-settlement-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-current-view="bankPayments"] .bank-posted-allocation-orders > div {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="bankPayments"] .bank-posted-allocation-orders small {
    text-align: left;
  }
}

/* Uman modern catalog compatibility: keep the new scoped workspace above legacy breakpoints. */
@media (max-width: 1500px) {
  body[data-current-view="offlineOrders"] .offline-modern-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(372px, 404px);
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace > .offline-cart-card {
    grid-column: auto;
    max-height: calc(100vh - 28px);
    position: sticky;
    top: 14px;
  }
}

@media (max-width: 1180px) {
  body[data-current-view="offlineOrders"] .offline-modern-workspace,
  body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-modern-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace > .offline-cart-card {
    bottom: 16px;
    grid-column: auto;
    max-height: calc(100vh - 102px);
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 16px;
    top: 72px;
    transform: translateX(calc(100% + 28px));
    width: min(410px, calc(100vw - 64px));
    z-index: 70;
  }

  body[data-current-view="offlineOrders"] .offline-cart-row {
    grid-template-columns: 38px minmax(0, 1fr) 88px;
  }
}

/* ERP UI Recovery v2C: restored workspaces on the safe accordion shell. */
.nav-subitems[hidden] {
  display: none !important;
}

.shell,
#view,
.catalog-page,
.pricing-workspace,
.warehouse-suite-page {
  max-width: 100%;
  min-width: 0;
}

.main-nav {
  display: grid;
  gap: 6px;
}

.product-workspace-tabs,
.module-tabs-scroll,
.warehouse-suite-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.product-workspace-tabs button,
.module-tabs-scroll button {
  flex: 0 0 auto;
  max-width: 240px;
  white-space: nowrap;
}

.product-workspace-tabs button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 42px;
  padding: 8px 12px;
}

.product-workspace-tabs button.active {
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 800;
}

.warehouse-suite-nav {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.warehouse-suite-secondary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warehouse-suite-secondary-links button {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 6px 10px;
}

.warehouse-suite-secondary-links button.active,
.warehouse-suite-secondary-links button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.warehouse-suite-grid,
.pricing-products-layout,
.pricing-price-list-layout,
.pricing-repricing-grid,
.pricing-channel-layout,
.catalog-workspace {
  min-width: 0;
}

.warehouse-suite-left,
.warehouse-suite-main,
.warehouse-suite-right,
.pricing-panel,
.pricing-side,
.catalog-products-panel {
  min-width: 0;
}

.warehouse-stock-table-shell,
.pricing-table-shell,
.price-list-table-shell,
.erp-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cost-control-workspace .summary-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 12px;
}

.cost-control-workspace .summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 10px 12px;
}

.cost-control-workspace .summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.cost-control-workspace .summary-card strong {
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

.warehouse-suite-head,
.warehouse-table-head,
.detail-head,
.pricing-workspace-head,
.catalog-hero {
  min-width: 0;
}

.warehouse-suite-head-actions,
.warehouse-head-actions,
.warehouse-table-actions,
.pricing-head-actions,
.pricing-export-actions,
.catalog-action-row,
.warehouse-side-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.overflow-menu {
  position: relative;
}

.overflow-menu > summary {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  padding: 8px 12px;
}

.overflow-menu > summary::-webkit-details-marker {
  display: none;
}

.overflow-menu[open] > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 6px;
  min-width: 210px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
}

.overflow-menu[open] > div button {
  justify-content: flex-start;
  width: 100%;
}

.warehouse-movements-table {
  min-width: 980px;
}

.price-list-builder-v2 {
  align-content: start;
  max-height: calc(100vh - 160px);
  min-width: 0;
  overflow: auto;
}

.receipt-supplier-selector,
.price-list-editor-section,
.product-brand-manager {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.receipt-supplier-selector,
.price-list-editor-section {
  background: #f8fafc;
}

.price-list-editor-section-head {
  align-items: start;
  display: grid;
  gap: 2px;
}

.price-list-editor-section-head h4 {
  font-size: 16px;
  margin: 0;
}

.price-list-editor-section-head span {
  color: var(--muted);
  font-size: 13px;
}

.price-list-editor-actions {
  background: #eef6ff;
  border-color: #bfdbfe;
}

.secondary-primary {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.field-helper-action {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}

.product-brand-manager .pricing-table-shell {
  max-height: min(460px, 58vh);
  overflow: auto;
}

.product-brand-toolbar {
  margin: 0;
}

.product-brand-table {
  min-width: 760px;
}

.price-list-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  min-width: 0;
}

.price-list-switches-v2 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
}

.price-list-scope-box,
.price-list-selected-products,
.price-list-applied-filters {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.price-list-scope-box p,
.price-list-selected-products p {
  margin: 0;
}

.price-list-scope-box .segmented-control {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.price-list-scope-box .segmented-control label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  justify-content: flex-start;
  line-height: 1.2;
  min-height: 32px;
  min-width: 0;
  padding: 5px 10px;
  white-space: normal;
}

.price-list-scope-box .segmented-control input {
  appearance: auto;
  display: inline-block;
  flex: 0 0 auto;
  height: 16px !important;
  margin: 0;
  min-height: 16px;
  min-width: 16px;
  width: 16px;
}

.price-list-scope-box .segmented-control span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.price-list-scope-box .segmented-control label.active {
  background: #e0f2fe;
  border-color: #38bdf8;
}

.chip-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.filter-chip {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px;
}

.filter-chip .link-button {
  font-size: 16px;
  line-height: 1;
  min-height: 0;
  padding: 0 2px;
}

.applied-filter-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.applied-filter-grid span {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 8px;
}

.applied-filter-grid span b {
  color: var(--muted);
  font-size: 11px;
}

.applied-filter-grid span em {
  color: var(--ink);
  font-style: normal;
  font-weight: 700;
}

.applied-filter-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-list-applied-extra {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.price-list-applied-extra summary {
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.price-list-column-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  max-height: 280px;
  min-width: 0;
  overflow: auto;
  padding: 10px;
}

.price-list-column-picker > div:first-child {
  display: grid;
  gap: 2px;
}

.price-list-column-row {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 6px 8px;
}

.price-list-column-row.active {
  background: #f8fafc;
  border-color: var(--line);
  cursor: grab;
}

.price-list-column-row.active:active {
  cursor: grabbing;
}

.price-list-column-row.dragging {
  opacity: 0.58;
}

.price-list-column-row.drag-over {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 92, 255, 0.12);
}

.price-list-column-row > div {
  display: inline-flex;
  gap: 4px;
}

.price-list-column-order {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.price-list-column-row:not(.active) .price-list-column-order {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--muted);
}

.price-list-column-row .check-line {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.price-list-column-row .check-line span {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-column-actions {
  justify-content: flex-end;
}

.price-list-column-drag {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  letter-spacing: -2px;
  line-height: 1;
  padding: 0 8px;
  user-select: none;
}

.price-list-column-row.active .price-list-column-drag {
  color: var(--primary);
  cursor: grab;
}

.price-list-action-row,
.pricing-export-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.price-list-action-row {
  max-width: 380px;
}

.price-list-action-hierarchy {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 0.8fr) minmax(240px, 1.2fr);
  min-width: 0;
}

.price-list-action-hierarchy > div {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  padding: 8px;
}

.price-list-action-hierarchy > div > strong {
  color: var(--muted);
  flex: 1 1 100%;
  font-size: 11px;
  text-transform: uppercase;
}

.price-list-action-hierarchy > div:nth-child(2) {
  background: #f8fbff;
  border-color: rgba(11, 92, 255, 0.22);
}

.price-list-action-hierarchy > .muted {
  grid-column: 1 / -1;
}

.price-list-quick-downloads {
  align-items: end;
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: min(100%, 260px);
  text-align: right;
}

.price-list-quick-downloads > span {
  font-size: 12px;
  font-weight: 800;
}

.price-list-quick-downloads small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  max-width: 260px;
}

.pricing-price-list-layout .pricing-table-shell {
  max-width: 100%;
  overflow: auto;
}

.pricing-price-list-layout .pricing-table {
  min-width: 860px;
}

.price-lists-workspace-v1 {
  background: #ffffff;
  display: grid;
  gap: 12px;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.price-lists-hero {
  align-items: center;
  background: #ffffff;
  display: grid;
  gap: 8px 12px;
  grid-template-areas:
    "crumb actions"
    "body actions";
  grid-template-columns: minmax(0, 1fr) max-content;
  margin: 0;
  min-width: 0;
  overflow: visible;
}

.price-lists-hero > .eyebrow {
  grid-area: crumb;
  min-width: 0;
  overflow-wrap: anywhere;
}

.price-lists-hero > div:not(.price-list-hero-actions) {
  grid-area: body;
  min-width: 0;
}

.price-lists-hero h2,
.price-lists-hero p {
  overflow-wrap: anywhere;
}

.price-lists-workspace-v1 .primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.price-list-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  grid-area: actions;
  gap: 8px;
  justify-content: flex-end;
  min-width: min(100%, 260px);
}

.price-list-workbench {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  min-width: 0;
}

.price-list-template-rail {
  align-content: start;
  background: #ffffff;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 128px);
  min-width: 0;
  overflow: hidden;
  position: sticky;
  top: 12px;
}

.price-list-template-search {
  display: grid;
  gap: 5px;
}

.price-list-template-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.price-list-template-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.price-list-template-card.active {
  border-color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}

.price-list-template-pick {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.price-list-template-pick span {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.price-list-template-pick small,
.price-list-template-pick em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.price-list-template-card-foot {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.price-list-card-menu summary {
  min-width: 36px;
  padding: 5px 9px;
  text-align: center;
}

.price-list-main-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.price-list-builder-v2 {
  background: #ffffff;
}

.price-lists-workspace-v1 .price-list-editor-section,
.price-lists-workspace-v1 .price-list-scope-box,
.price-lists-workspace-v1 .price-list-selected-products,
.price-lists-workspace-v1 .price-list-column-picker,
.price-lists-workspace-v1 .price-list-applied-filters {
  background: #ffffff;
}

.price-list-builder-head {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.price-list-builder-head h3 {
  margin-bottom: 3px;
}

.price-list-save-state {
  align-items: flex-end;
  display: grid;
  gap: 5px;
  justify-items: end;
  white-space: nowrap;
}

.price-list-work-summary {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 8px;
  position: relative;
  z-index: 1;
}

.price-list-work-summary span {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
}

.price-list-work-summary small {
  color: var(--muted);
  font-size: 11px;
}

.price-list-work-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-stepper {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  overflow-x: auto;
  padding: 5px;
  position: sticky;
  top: 0;
  z-index: 6;
}

.price-list-stepper button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  min-height: 34px;
  padding: 7px 12px;
  text-decoration: none;
}

.price-list-stepper button:hover,
.price-list-stepper button.active {
  background: rgba(11, 92, 255, 0.08);
  border-color: var(--primary);
  color: var(--primary);
}

.price-list-stepper button:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 92, 255, 0.18);
  color: var(--primary);
  outline: 0;
}

.price-list-filter-summary,
.price-list-option-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.price-list-column-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  min-width: 0;
}

.price-list-option-card {
  align-content: start;
}

.price-list-advanced-section {
  padding: 0;
}

.price-list-advanced-section summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 12px;
}

.price-list-advanced-section summary::-webkit-details-marker {
  display: none;
}

.price-list-advanced-section summary span {
  display: grid;
  gap: 2px;
}

.price-list-advanced-section summary small {
  color: var(--muted);
  font-weight: 500;
}

.price-list-advanced-section summary::after {
  color: var(--muted);
  content: "Розкрити";
  font-size: 12px;
  font-weight: 800;
}

.price-list-advanced-section[open] summary::after {
  content: "Згорнути";
}

.price-list-advanced-section > .price-list-form-grid {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.price-list-footer-field {
  grid-column: 1 / -1;
}

.price-list-preview-panel {
  background: #ffffff;
}

.price-lists-workspace-v1 .price-list-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  isolation: isolate;
  max-height: min(520px, 62vh);
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-x: contain;
  position: relative;
  scrollbar-gutter: stable both-edges;
}

.price-lists-workspace-v1 .price-list-table-shell::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #ffffff 72%);
  bottom: 0;
  content: "";
  pointer-events: none;
  position: sticky;
  right: 0;
  top: 0;
  width: 28px;
  z-index: 4;
}

.price-list-table-scroll-hint {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  left: 0;
  padding: 6px 8px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.price-lists-workspace-v1 .price-list-table-shell .pricing-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: max-content;
  table-layout: auto;
  width: max-content;
}

.price-lists-workspace-v1 .price-list-links-table-shell .pricing-table {
  min-width: 980px;
}

.price-lists-workspace-v1 .price-list-table-shell th,
.price-lists-workspace-v1 .price-list-table-shell td {
  max-width: 260px;
  min-width: 112px;
  overflow-wrap: anywhere;
  vertical-align: top;
  white-space: normal;
}

.price-lists-workspace-v1 .price-list-table-shell th {
  background: #ffffff;
  box-shadow: 0 1px 0 var(--line);
  position: sticky;
  top: 28px;
  z-index: 2;
}

.price-lists-workspace-v1 .price-list-table-shell th:first-child,
.price-lists-workspace-v1 .price-list-table-shell td:first-child {
  background: #ffffff;
  background-clip: padding-box;
  box-shadow: 1px 0 0 var(--line);
  left: 0;
  max-width: 220px;
  min-width: 220px;
  overflow: hidden;
  position: sticky;
  width: 220px;
  z-index: 8;
}

.price-lists-workspace-v1 .price-list-table-shell th:first-child {
  z-index: 12;
}

.price-lists-workspace-v1 .price-list-table-shell.is-scrolled-x th:first-child,
.price-lists-workspace-v1 .price-list-table-shell.is-scrolled-x td:first-child {
  box-shadow:
    72px 0 0 #ffffff,
    73px 0 0 var(--line),
    84px 0 24px rgba(15, 23, 42, 0.08);
  overflow: visible;
}

.price-lists-workspace-v1 .price-list-table-shell.is-scrolled-x th:first-child::after,
.price-lists-workspace-v1 .price-list-table-shell.is-scrolled-x td:first-child::after {
  background: #ffffff;
  bottom: 0;
  content: "";
  pointer-events: none;
  position: absolute;
  right: -72px;
  top: 0;
  width: 72px;
  z-index: 1;
}

.price-lists-workspace-v1 .price-list-table-shell th:nth-child(2),
.price-lists-workspace-v1 .price-list-table-shell td:nth-child(2) {
  min-width: 170px;
}

.price-lists-workspace-v1 .price-list-preview-table-shell th:first-child,
.price-lists-workspace-v1 .price-list-preview-table-shell td:first-child {
  max-width: 232px;
  min-width: 232px;
  width: 232px;
}

.price-lists-workspace-v1 .price-list-preview-table-shell th:nth-child(2),
.price-lists-workspace-v1 .price-list-preview-table-shell td:nth-child(2) {
  max-width: 380px;
  min-width: 340px;
  width: 340px;
}

.price-lists-workspace-v1 .price-list-history-table-shell .pricing-table {
  min-width: 1320px;
}

.price-lists-workspace-v1 .price-list-history-table-shell th:first-child,
.price-lists-workspace-v1 .price-list-history-table-shell td:first-child {
  max-width: 260px;
  min-width: 250px;
  width: 250px;
}

.price-lists-workspace-v1 .price-list-history-table-shell th:nth-child(2),
.price-lists-workspace-v1 .price-list-history-table-shell td:nth-child(2) {
  max-width: 240px;
  min-width: 220px;
  width: 220px;
}

.price-lists-workspace-v1 .price-list-links-table-shell th:first-child,
.price-lists-workspace-v1 .price-list-links-table-shell td:first-child {
  max-width: 150px;
  min-width: 140px;
  width: 140px;
}

.price-lists-workspace-v1 .price-list-links-table-shell th:nth-child(2),
.price-lists-workspace-v1 .price-list-links-table-shell td:nth-child(2) {
  min-width: 190px;
  width: 190px;
}

.selected-row {
  background: #f8fafc;
}

/* Price Lists UX Redesign Phase 1 */
.price-lists-phase1 {
  background: #f6f8fb;
  color: var(--ink);
  overflow-x: clip;
}

.price-list-home,
.price-list-builder-workspace {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.price-list-page-head,
.price-list-builder-page-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.price-list-page-head > div,
.price-list-builder-page-head > div {
  min-width: 0;
}

.price-list-page-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.price-list-page-head h2,
.price-list-builder-page-head h2 {
  font-size: 28px;
  letter-spacing: 0;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.price-lists-phase1 .icon-button .order-action-icon {
  height: 20px;
  width: 20px;
}

.price-lists-phase1 button .order-action-icon {
  margin-right: 7px;
  vertical-align: middle;
}

.price-list-zone {
  min-width: 0;
}

.price-list-zone-head {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
  min-width: 0;
}

.price-list-zone-head > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.price-list-zone h3 {
  font-size: 18px;
  letter-spacing: 0;
  margin: 0;
}

.price-list-zone-head span {
  color: var(--muted);
  font-size: 13px;
}

.price-list-quick-template-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.price-list-quick-template-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(42px, 1fr);
  min-height: 170px;
  min-width: 0;
  padding: 14px;
}

.price-list-quick-template-card:hover {
  border-color: #94a3b8;
}

.price-list-quick-template-head,
.price-list-quick-template-foot {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.price-list-quick-template-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.price-list-quick-template-head h3 {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.price-list-quick-template-head span,
.price-list-quick-template-foot > span {
  color: var(--muted);
  font-size: 12px;
}

.price-list-template-compact-meta {
  align-items: center;
  border-top: 1px solid #e8edf3;
  color: #334155;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 6px;
  margin: 0;
  min-width: 0;
  padding-top: 9px;
}

.price-list-quick-template-foot {
  align-items: center;
  align-self: end;
}

.price-list-quick-template-foot > span {
  align-items: flex-end;
  display: flex;
  line-height: 1.35;
  min-height: 32px;
}

.price-list-quick-template-foot .primary {
  flex: 0 0 auto;
  min-height: 38px;
}

.price-list-template-management {
  position: relative;
}

.price-list-template-management > summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
}

.price-list-template-management > summary,
.price-list-history-details > summary,
.price-list-additional-fields > summary,
.price-list-preview-detail > summary {
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.price-list-template-management > summary::-webkit-details-marker,
.price-list-history-details > summary::-webkit-details-marker,
.price-list-additional-fields > summary::-webkit-details-marker,
.price-list-preview-detail > summary::-webkit-details-marker {
  display: none;
}

.price-list-template-management[open] > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  display: grid;
  gap: 10px;
  min-width: 280px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 40;
}

.price-list-disabled-templates {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  padding-top: 8px;
}

.price-list-disabled-templates > span {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.price-list-history-head-actions,
.price-list-history-actions,
.price-list-history-detail-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.price-list-history-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.price-list-recent-zone {
  border-top: 1px solid #cbd5e1;
  padding-top: 22px;
}

.price-list-history-item {
  min-width: 0;
  padding: 12px 14px;
}

.price-list-history-item + .price-list-history-item {
  border-top: 1px solid var(--line);
}

.price-list-history-item.active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.price-list-history-main {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(300px, 2fr) minmax(250px, auto);
  min-width: 0;
}

.price-list-history-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.price-list-history-title strong {
  overflow-wrap: anywhere;
}

.price-list-history-title span,
.price-list-history-facts span:not(.status) {
  color: var(--muted);
  font-size: 12px;
}

.price-list-history-facts {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 0;
}

.price-list-history-actions {
  justify-content: flex-end;
}

.price-list-download-menu > summary {
  background: #fff;
  color: var(--primary);
  font-size: 13px;
  min-height: 36px;
}

.price-list-download-menu[open] > div {
  min-width: 150px;
}

.price-list-history-details {
  position: relative;
}

.price-list-history-details[open] > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  display: grid;
  gap: 10px;
  min-width: min(420px, calc(100vw - 48px));
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 40;
}

.price-list-history-details dl,
.price-list-live-summary dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.price-list-history-details dl > div,
.price-list-live-summary dl > div {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr);
}

.price-list-history-details dt,
.price-list-live-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.price-list-history-details dd,
.price-list-live-summary dd {
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.price-list-public-links-compact {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  padding-top: 9px;
}

.price-list-public-links-compact > div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.price-list-empty-state {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  min-height: 86px;
  padding: 16px;
}

.price-list-builder-page-head {
  justify-content: flex-start;
}

.price-list-focus-workspace {
  gap: 0;
}

body.price-list-focus-mode .topbar {
  display: none;
}

.price-list-builder-menu {
  margin-left: auto;
}

.price-list-builder-menu > summary {
  align-items: center;
  display: inline-flex;
  font-size: 20px;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.price-list-wizard-shell {
  display: grid;
  gap: 12px;
  max-height: none;
  min-width: 0;
  overflow: visible;
}

.price-list-wizard-shell .price-list-stepper {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  padding: 0;
  position: static;
}

.price-list-wizard-shell .price-list-stepper button {
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: 0;
  border-right: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 52px;
  min-width: 0;
  position: relative;
  white-space: normal;
}

.price-list-wizard-shell .price-list-stepper button:last-child {
  border-right: 0;
}

.price-list-wizard-shell .price-list-stepper button.active {
  box-shadow: inset 0 -3px 0 var(--primary);
}

.price-list-wizard-shell .price-list-stepper button.complete {
  color: #15803d;
}

.price-list-wizard-shell .price-list-stepper button > span {
  align-items: center;
  background: #eef2f7;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 24px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.price-list-wizard-shell .price-list-stepper button.complete > span {
  background: #dcfce7;
  color: #15803d;
}

.price-list-wizard-layout {
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-width: 0;
}

.price-list-wizard-main {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 14px;
  grid-column: span 8;
  min-width: 0;
  padding: 18px;
}

.price-list-wizard-step {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.price-list-wizard-step-head {
  display: grid;
  gap: 2px;
}

.price-list-wizard-step-head > span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.price-list-wizard-step-head h3 {
  font-size: 21px;
  letter-spacing: 0;
  margin: 0;
}

.price-list-wizard-step .price-list-scope-box {
  border: 0;
  padding: 0;
}

.price-list-routine-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.price-list-source-note {
  background: #f8fafc;
  border-left: 3px solid #64748b;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.price-list-source-note.inherited { border-left-color: #2563eb; }
.price-list-source-note.channel { border-left-color: #7c3aed; }
.price-list-source-note.customer { border-left-color: #059669; }

.price-list-source-note span {
  color: var(--muted);
  font-size: 12px;
}

.price-list-product-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.price-list-product-options {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 320px;
  min-width: 0;
  overflow: auto;
}

.price-list-product-options > label {
  align-items: start;
  border-bottom: 1px solid #edf1f5;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 20px minmax(0, 1fr);
  min-width: 0;
  padding: 9px;
}

.price-list-product-options > label:nth-child(odd) {
  border-right: 1px solid #edf1f5;
}

.price-list-product-options input {
  height: 18px;
  margin: 1px 0 0;
  min-height: 18px;
  width: 18px;
}

.price-list-product-options label > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.price-list-product-options small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.price-list-routine-columns {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.price-list-routine-columns label {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  min-height: 46px;
  min-width: 0;
  padding: 9px 10px;
}

.price-list-routine-columns label.active {
  background: #eff6ff;
  border-color: #60a5fa;
}

.price-list-routine-columns input {
  flex: 0 0 auto;
  height: 18px;
  min-height: 18px;
  width: 18px;
}

.price-list-routine-columns span {
  overflow-wrap: anywhere;
}

.price-list-additional-fields {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.price-list-additional-fields > .price-list-column-picker {
  margin-top: 10px;
  max-height: 390px;
}

.price-list-advanced-section {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0;
}

.price-list-advanced-section > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  min-height: 64px;
  padding: 11px 14px;
}

.price-list-advanced-section > summary::-webkit-details-marker {
  display: none;
}

.price-list-advanced-label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.price-list-advanced-label small,
.price-list-advanced-count {
  color: var(--muted);
  font-size: 12px;
}

.price-list-advanced-count {
  flex: 0 0 auto;
}

.price-list-advanced-section > summary::after {
  color: #64748b;
  content: "Розкрити";
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
}

.price-list-advanced-section[open] > summary::after {
  content: "Згорнути";
}

.price-list-advanced-content {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  padding: 14px;
}

.price-list-advanced-content > section {
  display: grid;
  gap: 10px;
}

.price-list-advanced-content h4 {
  font-size: 14px;
  margin: 0;
}

.price-list-advanced-content .price-list-quick-downloads {
  align-items: start;
  border-top: 1px solid var(--line);
  justify-items: start;
  max-width: none;
  min-width: 0;
  padding-top: 12px;
  text-align: left;
}

.price-list-live-summary {
  align-self: stretch;
  background: #f8fafc;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  gap: 12px;
  grid-column: span 4;
  min-width: 0;
  padding: 18px;
  position: sticky;
  top: 12px;
}

.price-list-live-summary-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.price-list-live-summary-head h3 {
  font-size: 17px;
  margin: 0;
}

.price-list-summary-primary {
  background: #f8fafc;
  border-left: 3px solid var(--primary);
  display: grid;
  gap: 4px;
  padding: 12px;
}

.price-list-summary-primary strong {
  font-size: 24px;
  letter-spacing: 0;
}

.price-list-summary-primary span {
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}

.price-list-summary-override {
  justify-self: start;
}

.price-list-summary-action {
  align-self: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 14px;
}

.price-list-summary-action .primary {
  justify-content: center;
  width: 100%;
}

.price-list-summary-action > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.price-list-column-summary,
.price-list-override-list {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.price-list-override-list {
  color: #9a3412;
}

.price-list-format-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.price-list-format-options label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 54px;
  min-width: 0;
  padding: 10px;
}

.price-list-format-options label.active {
  background: #eff6ff;
  border-color: #60a5fa;
}

.price-list-format-options input {
  height: 18px;
  min-height: 18px;
  width: 18px;
}

.price-list-final-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.price-list-final-actions > span {
  color: var(--muted);
  flex: 1 1 100%;
  font-size: 12px;
}

.price-list-preview-detail {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.price-list-preview-detail > summary {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  min-height: 40px;
  padding: 8px 12px;
}

.price-list-preview-detail > summary:hover {
  border-color: #94a3b8;
}

.price-list-preview-detail > .price-list-applied-filters,
.price-list-preview-detail > .price-list-table-shell {
  margin-top: 10px;
}

.price-list-wizard-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding-top: 14px;
}

.price-list-wizard-footer .primary {
  margin-left: auto;
}

@media (max-width: 1180px) {
  .price-list-quick-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-list-history-main {
    grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.2fr);
  }

  .price-list-history-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .price-list-page-head,
  .price-list-zone-head {
    align-items: stretch;
  }

  .price-list-quick-template-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-list-history-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-list-history-actions {
    grid-column: auto;
  }

  .price-list-download-menu[open] > div {
    left: 0;
    right: auto;
  }

  .price-list-wizard-shell .price-list-stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-list-wizard-shell .price-list-stepper button:nth-child(2) {
    border-right: 0;
  }

  .price-list-wizard-shell .price-list-stepper button:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .price-list-wizard-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-list-wizard-main,
  .price-list-live-summary {
    grid-column: 1 / -1;
  }

  .price-list-live-summary {
    border-left: 0;
    border-top: 1px solid var(--line);
    position: static;
  }

  .price-list-routine-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-list-product-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-list-product-options > label:nth-child(odd) {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .price-list-home,
  .price-list-builder-workspace {
    gap: 16px;
  }

  .price-list-page-head h2,
  .price-list-builder-page-head h2 {
    font-size: 24px;
  }

  .price-list-routine-fields,
  .price-list-live-summary dl,
  .price-list-format-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-list-quick-template-foot,
  .price-list-zone-head {
    align-items: stretch;
    flex-direction: column;
  }

  .price-list-quick-template-foot .primary,
  .price-list-page-actions .primary {
    width: 100%;
  }

  .price-list-page-head,
  .price-list-page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .price-list-page-actions .icon-button {
    align-self: flex-end;
  }

  .price-list-history-details[open] > div,
  .price-list-template-management[open] > div {
    left: 0;
    min-width: min(100%, calc(100vw - 40px));
    right: auto;
  }

  .price-list-builder-menu[open] > div {
    left: auto;
    right: 0;
  }

  .price-list-advanced-section > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .price-list-advanced-count {
    margin-left: auto;
  }

  .price-list-wizard-main {
    padding: 12px;
  }

  .price-list-wizard-shell .price-list-stepper button {
    justify-content: flex-start;
  }
}

@media (max-width: 1366px) {
  .pricing-tabs {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
  }

  .pricing-tabs button {
    flex: 0 0 auto;
  }

  .warehouse-suite-grid {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }

  .warehouse-suite-right {
    grid-column: 1 / -1;
  }

  .warehouse-suite-head {
    align-items: flex-start;
  }

  .price-list-form-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .applied-filter-grid {
    grid-template-columns: 1fr;
  }

  .price-list-work-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .price-list-column-layout {
    grid-template-columns: 1fr;
  }

  .price-list-action-hierarchy {
    grid-template-columns: 1fr;
  }

  .price-list-quick-downloads {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 1280px) {
  .warehouse-suite-grid,
  .pricing-products-layout,
  .pricing-price-list-layout,
  .pricing-repricing-grid,
  .pricing-channel-layout,
  .catalog-workspace {
    grid-template-columns: 1fr;
  }

  .warehouse-suite-left,
  .warehouse-suite-right,
  .pricing-side,
  .catalog-sidebar {
    position: static;
  }

  .warehouse-suite-head,
  .pricing-workspace-head,
  .catalog-hero {
    align-items: stretch;
    display: grid;
  }

  .warehouse-suite-head-actions,
  .pricing-head-actions,
  .catalog-action-row {
    justify-content: flex-start;
  }

  .price-list-workbench {
    grid-template-columns: 1fr;
  }

  .price-list-template-rail {
    max-height: none;
    position: static;
  }

  .price-lists-hero {
    grid-template-areas:
      "crumb"
      "body"
      "actions";
    grid-template-columns: minmax(0, 1fr);
  }

  .price-list-hero-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .price-list-template-list {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    max-height: 320px;
  }
}

@media (max-width: 1280px) and (min-width: 721px) {
  .price-lists-workspace-v1 .price-list-workbench {
    grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
  }

  .price-lists-workspace-v1 .price-list-template-rail {
    max-height: calc(100vh - 128px);
    position: sticky;
    top: 12px;
  }

  .price-lists-workspace-v1 .price-list-template-list {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

@media (max-width: 1100px) and (min-width: 721px) {
  .price-lists-workspace-v1 .price-list-workbench {
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .product-workspace-tabs button,
  .warehouse-suite-tabs button,
  .pricing-tabs button {
    max-width: 190px;
  }

  .overflow-menu[open] > div {
    left: 0;
    right: auto;
  }

  .warehouse-suite-metrics,
  .channel-publish-summary,
  .receipt-workspace-kpis {
    grid-template-columns: 1fr;
  }

  .price-list-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-list-column-picker {
    max-height: 240px;
  }
}

/* Product UI Cleanup Phase 1: catalog presentation only. */
body[data-view="catalog"] {
  overflow-x: hidden;
}

.catalog-page {
  display: grid;
  gap: 12px;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.sr-only {
  clip: rect(0 0 0 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.catalog-page .catalog-hero {
  align-items: flex-end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
  padding: 0;
}

.catalog-title-block {
  min-width: 0;
}

.catalog-title-block h1 {
  font-size: 28px;
  line-height: 1.12;
  margin: 0;
}

.catalog-title-block p {
  color: var(--muted);
  margin: 4px 0 0;
}

.catalog-summary-bar {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  max-width: 100%;
  min-width: 0;
}

.catalog-summary-chip {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 9px;
  justify-content: flex-start;
  min-height: 52px;
  min-width: 0;
  padding: 8px 10px;
  text-align: left;
}

.catalog-summary-chip:hover,
.catalog-summary-chip:focus-visible,
.catalog-summary-chip.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.catalog-summary-chip > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.catalog-summary-chip span:not(.catalog-kpi-icon) {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-summary-chip strong {
  font-size: 18px;
  line-height: 1.1;
}

.catalog-kpi-icon {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 32px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.catalog-kpi-icon svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.catalog-summary-chip.tone-blue .catalog-kpi-icon { background: #dbeafe; color: #1d4ed8; }
.catalog-summary-chip.tone-green .catalog-kpi-icon { background: #dcfce7; color: #15803d; }
.catalog-summary-chip.tone-red .catalog-kpi-icon { background: #fee2e2; color: #b91c1c; }
.catalog-summary-chip.tone-orange .catalog-kpi-icon { background: #ffedd5; color: #c2410c; }
.catalog-summary-chip.tone-violet .catalog-kpi-icon { background: #ede9fe; color: #6d28d9; }

.catalog-page .catalog-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  min-width: 0;
  position: relative;
}

.catalog-action-button {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  min-height: 40px;
}

.catalog-action-button svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.catalog-more-menu {
  position: relative;
}

.catalog-more-menu > summary {
  list-style: none;
}

.catalog-more-menu > summary::-webkit-details-marker {
  display: none;
}

.catalog-more-menu-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .18);
  display: grid;
  gap: 4px;
  min-width: min(320px, calc(100vw - 32px));
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
}

.catalog-more-menu-panel button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 44px;
  padding: 8px;
  text-align: left;
}

.catalog-more-menu-panel button:hover,
.catalog-more-menu-panel button:focus-visible {
  background: #f8fafc;
}

.catalog-more-menu-panel button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.catalog-more-menu-panel svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 20px;
}

.catalog-more-menu-panel span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.catalog-more-menu-panel small {
  color: var(--muted);
  line-height: 1.25;
}

.catalog-page .catalog-filter-panel {
  align-items: end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 2fr) repeat(5, minmax(130px, 1fr)) auto;
  min-width: 0;
  padding: 10px;
}

.catalog-page .catalog-filter-panel label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.catalog-page .catalog-filter-panel label > span {
  color: var(--muted);
  font-size: 12px;
}

.catalog-page .catalog-filter-panel input,
.catalog-page .catalog-filter-panel select {
  min-height: 38px;
  min-width: 0;
}

.catalog-search-box input {
  font-size: 15px;
}

.catalog-filter-close {
  min-height: 38px;
}

.catalog-mobile-filter-actions {
  display: none;
  gap: 8px;
  min-width: 0;
}

.catalog-mobile-filter-actions button {
  align-items: center;
  display: inline-flex;
  flex: 1 1 0;
  gap: 7px;
  justify-content: center;
  min-height: 42px;
}

.catalog-mobile-filter-actions svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.catalog-mobile-filter-actions strong {
  align-items: center;
  background: #2563eb;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
}

.catalog-drawer-overlay {
  display: none;
}

.catalog-page .catalog-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.catalog-page .catalog-filter-chips button {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #312e81;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  min-height: 30px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 4px 9px;
}

.catalog-workspace {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  min-width: 0;
}

.catalog-sidebar {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 88px);
  min-width: 0;
  overflow: hidden;
  position: sticky;
  top: 12px;
}

.catalog-sidebar-mobile-head {
  display: none;
}

.catalog-sidebar-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
}

.catalog-sidebar-panel[hidden] {
  display: none !important;
}

.catalog-sidebar-tabs {
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
}

.catalog-sidebar-tabs button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  min-height: 34px;
  padding: 6px 8px;
}

.catalog-sidebar-tabs button.active,
.catalog-sidebar-tabs button:focus-visible,
.catalog-sidebar-tabs button:hover {
  background: #fff;
  color: var(--text);
  outline: none;
}

.catalog-sidebar-title {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.catalog-sidebar-title h3 {
  font-size: 14px;
  margin: 0;
}

.catalog-sidebar-collapse {
  min-height: 32px;
}

.catalog-sidebar-collapse-row {
  display: flex;
  justify-content: flex-end;
}

.catalog-sidebar.collapsed .catalog-sidebar-collapse-row {
  justify-content: stretch;
}

.catalog-sidebar.collapsed .catalog-sidebar-collapse {
  width: 100%;
}

.catalog-sidebar.collapsed .catalog-sidebar-collapsible,
.catalog-sidebar.collapsed .catalog-product-groups-panel {
  display: none;
}

.catalog-side-search {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: 18px minmax(0, 1fr);
  min-width: 0;
  padding: 0 8px;
}

.catalog-side-search svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.catalog-side-search input {
  border: 0;
  min-height: 36px;
  padding: 0;
}

.catalog-category-list,
.catalog-product-group-list {
  display: grid;
  gap: 4px;
  max-height: min(52vh, 520px);
  min-width: 0;
  overflow: auto;
  padding-right: 2px;
}

.category-tree-row {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: 24px minmax(0, 1fr);
  padding-left: calc(var(--category-level, 0) * 12px);
}

.category-tree-toggle,
.category-tree-select,
.catalog-product-group-list button,
.catalog-category-list > button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 36px;
  min-width: 0;
  padding: 6px 8px;
  text-align: left;
}

.category-tree-toggle {
  justify-content: center;
  padding: 0;
}

.category-tree-toggle.empty {
  visibility: hidden;
}

.category-tree-select span,
.catalog-product-group-list span,
.catalog-category-list > button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.category-tree-select.active,
.catalog-product-group-list button.active,
.catalog-category-list > button.active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.catalog-create-group-button {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  min-height: 36px;
}

.catalog-products-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
}

.catalog-products-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.catalog-products-head h2 {
  font-size: 18px;
  margin: 0;
}

.catalog-products-head p {
  color: var(--muted);
  margin: 3px 0 0;
}

.catalog-view-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}

.catalog-view-tools svg {
  fill: none;
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 15px;
}

.catalog-view-tools .active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.catalog-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow: auto;
}

.catalog-list-head,
.catalog-list-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 2fr) minmax(104px, .8fr) minmax(72px, .55fr) minmax(72px, .55fr) minmax(82px, .6fr) minmax(92px, .7fr) minmax(140px, .8fr);
  min-width: 980px;
}

.catalog-list-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 10px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.catalog-list-row {
  background: #fff;
  border-top: 1px solid var(--line);
  cursor: pointer;
  padding: 9px 10px;
}

.catalog-list-row:hover,
.catalog-list-row:focus-visible,
.catalog-list-row.active {
  background: #f8fafc;
  outline: none;
}

.catalog-list-product {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-width: 0;
}

.catalog-list-thumb {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #1d4ed8;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  overflow: hidden;
  width: 42px;
}

.catalog-list-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.catalog-list-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.catalog-list-main strong,
.catalog-list-main span,
.catalog-list-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-list-main span,
.catalog-list-main small {
  color: var(--muted);
}

.catalog-stock-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-height: 28px;
  padding: 4px 8px;
  white-space: nowrap;
}

.catalog-stock-badge.success { background: #dcfce7; color: #166534; }
.catalog-stock-badge.warning { background: #fef3c7; color: #92400e; }
.catalog-stock-badge.danger { background: #fee2e2; color: #991b1b; }
.catalog-stock-badge.info { background: #e0f2fe; color: #075985; }
.catalog-stock-badge.kind { background: #f1f5f9; color: #334155; }

.catalog-list-number,
.catalog-list-price {
  white-space: nowrap;
}

.catalog-list-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}

.catalog-row-menu {
  justify-self: end;
  position: relative;
}

.catalog-row-menu > summary {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 4px;
  justify-content: center;
  list-style: none;
  min-width: 40px;
}

.catalog-row-menu > summary::-webkit-details-marker {
  display: none;
}

.catalog-row-menu svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 16px;
}

.catalog-row-menu-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
  display: grid;
  gap: 3px;
  min-width: 180px;
  padding: 5px;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 55;
}

.catalog-row-menu-panel button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  min-height: 36px;
  padding: 7px 8px;
  text-align: left;
}

.catalog-row-menu-panel button:hover,
.catalog-row-menu-panel button:focus-visible {
  background: #f8fafc;
  outline: none;
}

.catalog-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  min-width: 0;
}

.catalog-card {
  border-radius: 8px;
  cursor: pointer;
  min-width: 0;
}

.catalog-card-body h3 {
  overflow-wrap: anywhere;
}

.catalog-empty {
  min-height: 220px;
}

.catalog-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.catalog-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.catalog-pagination > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

@media (max-width: 1366px) {
  .catalog-summary-bar {
    grid-template-columns: repeat(5, minmax(116px, 1fr));
  }

  .catalog-page .catalog-filter-panel {
    grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(128px, 1fr));
  }

  .catalog-filter-close {
    display: none;
  }
}

@media (max-width: 1100px) {
  .catalog-summary-bar {
    grid-template-columns: repeat(3, minmax(128px, 1fr));
  }

  .catalog-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-sidebar {
    position: static;
  }
}

@media (max-width: 780px) {
  body.catalog-drawer-open {
    overflow: hidden;
  }

  .catalog-page .catalog-hero,
  .catalog-products-head {
    align-items: stretch;
    display: grid;
  }

  .catalog-title-block h1 {
    font-size: 24px;
  }

  .catalog-summary-bar {
    display: flex;
    max-height: 64px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  .catalog-summary-chip {
    flex: 0 0 148px;
    max-height: 58px;
    min-height: 52px;
    padding: 6px 8px;
    scroll-snap-align: start;
  }

  .catalog-summary-chip strong {
    font-size: 16px;
  }

  .catalog-kpi-icon {
    flex-basis: 28px;
    height: 28px;
    width: 28px;
  }

  .catalog-page .catalog-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .catalog-action-button {
    justify-content: center;
  }

  .catalog-more-menu-panel {
    left: auto;
    right: 0;
  }

  .catalog-drawer-overlay {
    background: rgba(15, 23, 42, .36);
    border: 0;
    display: block;
    inset: 0;
    padding: 0;
    position: fixed;
    z-index: 78;
  }

  .catalog-mobile-filter-actions {
    display: flex;
  }

  .catalog-page .catalog-filter-panel {
    border-radius: 8px;
    bottom: auto;
    box-shadow: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    left: 0;
    max-height: none;
    overflow: visible;
    padding: 10px;
    position: static;
    right: 0;
    z-index: auto;
  }

  .catalog-page .catalog-filter-panel label:not(.catalog-search-box),
  .catalog-page .catalog-filter-panel .catalog-filter-close {
    display: none;
  }

  .catalog-page .catalog-filter-panel.open {
    border-radius: 14px 14px 0 0;
    bottom: 0;
    box-shadow: 0 -16px 42px rgba(15, 23, 42, .2);
    display: grid;
    left: 0;
    max-height: 82vh;
    overflow: auto;
    padding: 14px;
    position: fixed;
    right: 0;
    z-index: 80;
  }

  .catalog-page .catalog-filter-panel.open label {
    display: grid;
  }

  .catalog-page .catalog-filter-panel.open .catalog-filter-close {
    display: inline-flex;
    justify-content: center;
  }

  .catalog-page .catalog-sidebar {
    background: #fff;
    border-radius: 14px 14px 0 0;
    bottom: 0;
    box-shadow: 0 -16px 42px rgba(15, 23, 42, .2);
    display: none;
    left: 0;
    max-height: 82vh;
    overflow: auto;
    padding: 12px;
    position: fixed;
    right: 0;
    z-index: 79;
  }

  .catalog-page .catalog-sidebar.open {
    display: grid;
  }

  .catalog-sidebar-mobile-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  .catalog-sidebar.collapsed .catalog-sidebar-collapsible,
  .catalog-sidebar.collapsed .catalog-product-groups-panel {
    display: grid;
  }

  .catalog-sidebar-collapse {
    display: none;
  }

  .catalog-products-panel {
    padding: 8px;
  }

  .catalog-list {
    max-width: calc(100vw - 32px);
  }
}

@media (max-width: 520px) {
  .catalog-page .catalog-action-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .catalog-page .catalog-action-row > .primary {
    grid-column: 1 / -1;
  }

  .catalog-page .catalog-action-row > .ghost.catalog-action-button {
    min-width: 0;
  }

  .catalog-more-menu-panel {
    left: auto;
    right: 0;
  }

  .catalog-list-head {
    display: none;
  }

  .catalog-list {
    border: 0;
    display: grid;
    gap: 8px;
    overflow: visible;
  }

  .catalog-list-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .catalog-list-actions {
    justify-content: flex-end;
  }

  .catalog-row-menu {
    justify-self: stretch;
    width: 100%;
  }

  .catalog-row-menu > summary {
    width: 100%;
  }

  .catalog-row-menu-panel {
    left: 0;
    right: 0;
  }

  .catalog-list-main strong,
  .catalog-list-main span,
  .catalog-list-main small {
    white-space: normal;
  }

  .catalog-pagination,
  .catalog-pagination > div {
    display: grid;
    justify-content: stretch;
    width: 100%;
  }

  .catalog-pagination button,
  .catalog-pagination select {
    width: 100%;
  }
}

/* Uman modern catalog v1 final polish: dense desktop order entry. */
body[data-current-view="offlineOrders"] .offline-modern-page {
  gap: 10px;
}

body[data-current-view="offlineOrders"] .offline-modern-workspace {
  gap: 10px;
}

body[data-current-view="offlineOrders"] .offline-catalog-card,
body[data-current-view="offlineOrders"] .offline-cart-card,
body[data-current-view="offlineOrders"] .offline-customer-stage {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.04);
}

body[data-current-view="offlineOrders"] .offline-catalog-card {
  padding: 12px;
}

body[data-current-view="offlineOrders"] .offline-catalog-card .offline-card-head {
  margin-bottom: 8px;
}

body[data-current-view="offlineOrders"] .offline-modern-head {
  gap: 10px;
}

body[data-current-view="offlineOrders"] .offline-modern-title {
  gap: 2px;
  padding: 1px 0;
}

body[data-current-view="offlineOrders"] .offline-modern-title h2 {
  font-size: 22px;
}

body[data-current-view="offlineOrders"] .offline-context-card,
body[data-current-view="offlineOrders"] .offline-history-action,
body[data-current-view="offlineOrders"] .offline-top-invoice-summary {
  min-height: 46px;
  padding: 7px 10px;
}

body[data-current-view="offlineOrders"] .offline-context-card .order-action-icon,
body[data-current-view="offlineOrders"] .offline-history-action .order-action-icon,
body[data-current-view="offlineOrders"] .offline-top-invoice-summary .order-action-icon {
  flex-basis: 26px;
  height: 26px;
  width: 26px;
}

body[data-current-view="offlineOrders"] .offline-catalog-toolbar {
  gap: 8px;
  grid-template-columns: minmax(280px, 1fr) 40px minmax(128px, auto) minmax(128px, auto) minmax(128px, auto);
  margin-bottom: 8px;
}

body[data-current-view="offlineOrders"] .offline-search-field input,
body[data-current-view="offlineOrders"] .offline-catalog-toolbar select,
body[data-current-view="offlineOrders"] .offline-barcode-indicator {
  height: 36px;
}

body[data-current-view="offlineOrders"] .offline-category-strip {
  display: flex;
  gap: 7px;
  margin-bottom: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

body[data-current-view="offlineOrders"] .offline-category-strip button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
}

body[data-current-view="offlineOrders"] .offline-category-strip small {
  background: #f1f5f9;
  border-radius: 999px;
  color: #64748b;
  font-size: 10px;
  padding: 2px 6px;
}

body[data-current-view="offlineOrders"] .offline-catalog-meta {
  margin-bottom: 7px;
}

body[data-current-view="offlineOrders"] .offline-view-indicator button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

body[data-current-view="offlineOrders"] .offline-view-indicator button.active {
  background: #0b5cff;
  color: #ffffff;
}

body[data-current-view="offlineOrders"] .offline-view-indicator button:focus-visible {
  outline: 3px solid rgba(11, 92, 255, 0.22);
  outline-offset: 2px;
}

body[data-current-view="offlineOrders"] .offline-product-results.is-list {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
}

body[data-current-view="offlineOrders"] .offline-product-results.is-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-current-view="offlineOrders"] .offline-product-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 52px minmax(0, 1fr) max-content minmax(160px, auto);
  min-height: 72px;
  padding: 6px 9px;
}

body[data-current-view="offlineOrders"] .offline-product-row:hover {
  transform: none;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-media {
  align-items: center;
  display: flex;
  justify-content: center;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-thumb {
  height: 48px;
  width: 48px;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-thumb img {
  padding: 4px;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-main {
  gap: 2px;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-main strong {
  font-size: 12.5px;
  line-height: 1.22;
  min-height: 0;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-main small {
  font-size: 10.5px;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-stock {
  justify-self: end;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(92px, auto) minmax(92px, auto);
  justify-content: end;
  margin: 0;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer b {
  font-size: 14px;
  grid-column: 1;
  text-align: right;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-added-chip {
  grid-column: 1;
  justify-self: end;
  max-width: 142px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer .primary {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 32px;
  min-width: 106px;
  padding: 0 10px;
}

body[data-current-view="offlineOrders"] .offline-product-grid-card {
  min-height: 238px;
}

body[data-current-view="offlineOrders"] .offline-product-grid-card .offline-product-thumb {
  height: 82px;
}

body[data-current-view="offlineOrders"] .offline-product-select {
  display: none;
}

body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-modern-workspace {
  grid-template-columns: minmax(0, 1fr);
}

body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-customer-stage {
  justify-self: center;
  max-width: 640px;
  width: min(640px, 100%);
}

body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-catalog-card {
  max-height: 430px;
  opacity: 0.68;
  overflow: hidden;
}

body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-product-results.is-list {
  grid-template-columns: 1fr;
}

body[data-current-view="offlineOrders"] .offline-recent-orders.offline-history-panel {
  bottom: 18px;
  display: grid;
  max-height: calc(100vh - 36px);
  overflow: hidden;
  padding: 16px;
  position: fixed;
  right: 18px;
  top: 18px;
  width: min(720px, calc(100vw - 72px));
  z-index: 92;
}

body[data-current-view="offlineOrders"] .offline-history-backdrop {
  background: rgba(15, 23, 42, 0.24);
  border: 0;
  bottom: 0;
  cursor: default;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 91;
}

body[data-current-view="offlineOrders"] .offline-history-panel .offline-card-head {
  flex: 0 0 auto;
  margin-bottom: 10px;
}

body[data-current-view="offlineOrders"] .offline-history-panel .offline-recent-table-wrap {
  overflow: auto;
}

body[data-current-view="offlineOrders"] .offline-payment-backdrop {
  background: rgba(15, 23, 42, 0.22);
  border: 0;
  bottom: 0;
  cursor: default;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 93;
}

body[data-current-view="offlineOrders"] .offline-payment-panel {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  left: 50%;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  padding: 0;
  position: fixed;
  top: 20px;
  transform: translateX(-50%);
  width: min(1040px, calc(100vw - 56px));
  z-index: 94;
}

body[data-current-view="offlineOrders"] .offline-payment-panel > .offline-card-head {
  align-items: center;
  border-bottom: 1px solid #e6ebf2;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 14px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

body[data-current-view="offlineOrders"] .offline-payment-panel > .offline-card-head p {
  color: #64748b;
  font-size: 12px;
  margin: 4px 0 0;
}

body[data-current-view="offlineOrders"] .offline-payment-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 18px;
}

body[data-current-view="offlineOrders"] .offline-payment-panel #customer-payment-form {
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

body[data-current-view="offlineOrders"] .offline-payment-panel #customer-payment-form .form-head {
  display: none;
}

body[data-current-view="offlineOrders"] .offline-payment-panel #customer-payment-form .payment-summary {
  align-items: stretch;
  grid-template-columns: minmax(220px, 1.4fr) minmax(116px, 0.72fr) minmax(116px, 0.72fr) minmax(150px, 0.85fr) minmax(130px, 0.78fr) minmax(132px, auto);
}

body[data-current-view="offlineOrders"] .offline-payment-panel #customer-payment-form .payment-summary label,
body[data-current-view="offlineOrders"] .offline-payment-panel #customer-payment-form .payment-summary .stat,
body[data-current-view="offlineOrders"] .offline-payment-panel #customer-payment-form .payment-summary button {
  min-height: 58px;
}

body[data-current-view="offlineOrders"] .offline-payment-methods > div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-current-view="offlineOrders"] .offline-payment-methods button {
  min-width: 0;
  padding: 0 10px;
}

body[data-current-view="offlineOrders"] .offline-payment-methods button.offline-debit-action {
  border-style: dashed;
}

body[data-current-view="offlineOrders"] [data-draft-line-qty] {
  appearance: textfield;
  -moz-appearance: textfield;
}

body[data-current-view="offlineOrders"] [data-draft-line-qty]::-webkit-inner-spin-button,
body[data-current-view="offlineOrders"] [data-draft-line-qty]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.main-nav .nav-icon .order-action-icon {
  height: 20px;
  width: 20px;
}

@media (min-width: 901px) and (max-width: 1100px) {
  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed) {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  body[data-current-view="offlineOrders"].uman-sidebar-expanded:not(.sidebar-collapsed) {
    grid-template-columns: 228px minmax(0, 1fr);
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed) .sidebar {
    overflow: visible;
    padding: 10px 8px;
  }

  body[data-current-view="offlineOrders"].uman-sidebar-expanded:not(.sidebar-collapsed) .sidebar {
    padding: 12px;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed) .sidebar-head {
    display: grid;
    gap: 8px;
    justify-items: center;
    margin-bottom: 12px;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed) .brand {
    justify-content: center;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed):not(.uman-sidebar-expanded) .brand span,
  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed):not(.uman-sidebar-expanded) .nav-label {
    display: none;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed) .brand-logo {
    height: 34px;
    width: 34px;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed) .main-nav {
    display: grid;
    gap: 7px;
    justify-items: center;
  }

  body[data-current-view="offlineOrders"].uman-sidebar-expanded:not(.sidebar-collapsed) .main-nav {
    justify-items: stretch;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed) .nav-group {
    border: 0;
    padding: 0;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed) .nav-subitems {
    display: grid;
    gap: 6px;
    margin: 0;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed):not(.uman-sidebar-expanded) .nav-subitems[hidden] {
    display: none !important;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed):not(.uman-sidebar-expanded) .nav-subitems button,
  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed):not(.uman-sidebar-expanded) .nav-group-toggle,
  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed):not(.uman-sidebar-expanded) .nav-home {
    align-items: center;
    border-radius: 12px;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    padding: 0;
    position: relative;
    width: 42px;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed):not(.uman-sidebar-expanded) .nav-icon {
    align-items: center;
    color: currentColor;
    display: inline-flex;
    justify-content: center;
    line-height: 0;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed):not(.uman-sidebar-expanded) .nav-group-toggle::after {
    content: none;
  }

  body[data-current-view="offlineOrders"]:not(.sidebar-collapsed):not(.uman-sidebar-expanded) .nav-subitems button.active {
    background: #0b5cff;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(11, 92, 255, 0.28);
  }

  body[data-current-view="offlineOrders"].uman-sidebar-expanded:not(.sidebar-collapsed) .nav-icon {
    display: none;
  }

  body[data-current-view="offlineOrders"].uman-sidebar-expanded:not(.sidebar-collapsed) .nav-label {
    display: inline;
  }

  body[data-current-view="offlineOrders"].uman-sidebar-expanded:not(.sidebar-collapsed) .nav-subitems button,
  body[data-current-view="offlineOrders"].uman-sidebar-expanded:not(.sidebar-collapsed) .nav-group-toggle,
  body[data-current-view="offlineOrders"].uman-sidebar-expanded:not(.sidebar-collapsed) .nav-home {
    width: 100%;
  }

  body[data-current-view="offlineOrders"] .shell {
    padding: 10px;
  }

  body[data-current-view="offlineOrders"].sidebar-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  body[data-current-view="offlineOrders"].sidebar-collapsed .main-nav {
    display: none;
  }
}

@media (max-width: 1180px) {
  body[data-current-view="offlineOrders"] .offline-modern-page::after {
    background: rgba(15, 23, 42, 0.20);
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.18s ease;
    z-index: 68;
  }

  body[data-current-view="offlineOrders"] .offline-modern-page.is-cart-panel-open::after {
    opacity: 1;
    pointer-events: auto;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace > .offline-cart-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.30);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    overflow: hidden;
  }

  body[data-current-view="offlineOrders"] .offline-cart-card .offline-card-head {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e6ebf2;
    margin: -16px -16px 0;
    padding: 14px 16px 10px;
    position: sticky;
    top: -16px;
    z-index: 2;
  }

  body[data-current-view="offlineOrders"] .offline-cart-list {
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
  }

  body[data-current-view="offlineOrders"] .offline-cart-total,
  body[data-current-view="offlineOrders"] .offline-payment-methods,
  body[data-current-view="offlineOrders"] .offline-print-actions,
  body[data-current-view="offlineOrders"] .offline-submit-actions {
    background: #ffffff;
    position: sticky;
    z-index: 1;
  }

  body[data-current-view="offlineOrders"] .offline-submit-actions {
    bottom: -16px;
    border-top: 1px solid #e6ebf2;
    margin: 0 -16px -16px;
    padding: 12px 16px 14px;
  }
}

@media (max-width: 1040px) {
  body[data-current-view="offlineOrders"] .offline-catalog-toolbar {
    grid-template-columns: minmax(0, 1fr) 40px minmax(124px, auto);
  }

  body[data-current-view="offlineOrders"] .offline-catalog-toolbar select[aria-label="Група товарів"] {
    display: none;
  }

  body[data-current-view="offlineOrders"] .offline-product-row {
    grid-template-columns: 54px minmax(0, 1fr) minmax(128px, auto);
  }

  body[data-current-view="offlineOrders"] .offline-product-row .offline-stock {
    display: none;
  }

  body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer b,
  body[data-current-view="offlineOrders"] .offline-product-row .offline-added-chip,
  body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer .primary {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
    text-align: right;
  }
}

@media (min-width: 1101px) {
  body[data-current-view="offlineOrders"] .shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(336px, 372px);
  }
}

body[data-current-view="offlineOrders"] .offline-product-results.is-list {
  max-height: none;
  overflow: visible;
}

body[data-current-view="offlineOrders"] .offline-product-row {
  align-content: center;
  min-height: 72px;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-main {
  gap: 1px;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-main strong {
  -webkit-line-clamp: 1;
  font-size: 12.5px;
  min-height: 0;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-main small {
  line-height: 1.18;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-stock-warning,
body[data-current-view="offlineOrders"] .offline-product-row .offline-match {
  display: none;
}

@media (max-width: 1180px) {
  body[data-current-view="offlineOrders"] .offline-modern-workspace > .offline-cart-card {
    left: 50%;
    right: auto;
    transform: translateX(calc(50vw + 32px));
    width: min(420px, calc(100vw - 112px));
  }

body[data-current-view="offlineOrders"] .offline-modern-page.is-cart-panel-open .offline-cart-card {
    transform: translateX(-50%);
  }
}

/* Uman quick sale v2: unified catalog, category rail, always-visible invoice. */
body[data-current-view="offlineOrders"] .offline-modern-workspace {
  align-items: start;
  grid-template-columns: minmax(204px, 232px) minmax(0, 1fr) minmax(292px, 340px);
}

body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-modern-workspace {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-customer-stage {
  max-width: 760px;
  width: 100%;
}

body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-cart-compact-rail,
body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-catalog-card {
  display: none;
}

body[data-current-view="offlineOrders"] .offline-category-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 28px);
  min-width: 0;
  overflow: auto;
  padding: 12px;
  position: sticky;
  top: 14px;
}

body[data-current-view="offlineOrders"] .offline-category-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

body[data-current-view="offlineOrders"] .offline-category-head span,
body[data-current-view="offlineOrders"] .offline-category-section > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body[data-current-view="offlineOrders"] .offline-category-head strong {
  background: #eef6ff;
  border-radius: 999px;
  color: #0b5cff;
  font-size: 11px;
  padding: 3px 8px;
}

body[data-current-view="offlineOrders"] .offline-category-tree,
body[data-current-view="offlineOrders"] .offline-category-section,
body[data-current-view="offlineOrders"] .offline-quick-tags {
  display: grid;
  gap: 6px;
}

body[data-current-view="offlineOrders"] .offline-category-row {
  display: grid;
  gap: 4px;
  grid-template-columns: 22px minmax(0, 1fr);
  padding-left: calc(var(--category-level, 0) * 12px);
}

body[data-current-view="offlineOrders"] .offline-category-toggle,
body[data-current-view="offlineOrders"] .offline-category-select,
body[data-current-view="offlineOrders"] .offline-quick-tags button {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-category-toggle {
  align-items: center;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  padding: 0;
}

body[data-current-view="offlineOrders"] .offline-category-toggle.empty {
  opacity: 0;
  pointer-events: none;
}

body[data-current-view="offlineOrders"] .offline-category-select,
body[data-current-view="offlineOrders"] .offline-quick-tags button {
  align-items: center;
  background: #ffffff;
  color: #0f172a;
  display: grid;
  font-size: 12px;
  font-weight: 850;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 32px;
  padding: 0 9px;
  text-align: left;
}

body[data-current-view="offlineOrders"] .offline-category-select:first-child {
  grid-template-columns: minmax(0, 1fr) auto;
}

body[data-current-view="offlineOrders"] .offline-category-select span,
body[data-current-view="offlineOrders"] .offline-quick-tags span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="offlineOrders"] .offline-category-select strong,
body[data-current-view="offlineOrders"] .offline-quick-tags strong {
  color: #64748b;
  font-size: 11px;
}

body[data-current-view="offlineOrders"] .offline-category-select.active,
body[data-current-view="offlineOrders"] .offline-quick-tags button.active {
  background: #f3f8ff;
  border-color: #0b5cff;
  box-shadow: inset 0 0 0 1px #0b5cff;
  color: #0b5cff;
}

body[data-current-view="offlineOrders"] .offline-category-section {
  border-top: 1px solid #edf2f7;
  padding-top: 10px;
}

body[data-current-view="offlineOrders"] .offline-category-section .check-line {
  align-items: center;
  color: #475569;
  display: flex;
  font-size: 12px;
  gap: 8px;
}

body[data-current-view="offlineOrders"] .offline-quick-tags em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

body[data-current-view="offlineOrders"] .offline-new-customer {
  border-top: 1px solid #edf2f7;
  padding-top: 10px;
}

body[data-current-view="offlineOrders"] .offline-new-customer summary {
  color: #0b5cff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

body[data-current-view="offlineOrders"] .offline-new-customer-form {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

body[data-current-view="offlineOrders"] .offline-new-customer-form label {
  color: #64748b;
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
}

body[data-current-view="offlineOrders"] .offline-new-customer-form input,
body[data-current-view="offlineOrders"] .offline-new-customer-form select {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  color: #0f172a;
  min-height: 36px;
  min-width: 0;
  padding: 0 10px;
}

body[data-current-view="offlineOrders"] .offline-new-customer-form .primary {
  grid-column: 1 / -1;
  min-height: 38px;
}

body[data-current-view="offlineOrders"] .offline-catalog-toolbar {
  grid-template-columns: minmax(240px, 1fr) 40px minmax(126px, auto) auto;
}

body[data-current-view="offlineOrders"] .offline-catalog-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-current-view="offlineOrders"] .offline-catalog-meta strong {
  color: #64748b;
  font-size: 11px;
}

body[data-current-view="offlineOrders"] .offline-stock.danger {
  background: #fef2f2;
  color: #dc2626;
}

body[data-current-view="offlineOrders"] .offline-product-qty {
  align-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 26px 44px 26px;
  height: 32px;
  overflow: hidden;
}

body[data-current-view="offlineOrders"] .offline-product-qty button {
  background: #ffffff;
  border: 0;
  color: #0b5cff;
  font-size: 16px;
  font-weight: 900;
  height: 100%;
}

body[data-current-view="offlineOrders"] .offline-product-qty button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

body[data-current-view="offlineOrders"] .offline-product-qty input {
  border: 0;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  height: 100%;
  min-width: 0;
  text-align: center;
}

body[data-current-view="offlineOrders"] .offline-product-card .primary.is-added {
  background: #16a34a;
  border-color: #16a34a;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.18);
}

body[data-current-view="offlineOrders"] .offline-product-card .primary:disabled,
body[data-current-view="offlineOrders"] .offline-submit-actions .primary:disabled {
  background: #e2e8f0;
  border-color: #e2e8f0;
  box-shadow: none;
  color: #94a3b8;
  cursor: not-allowed;
}

body[data-current-view="offlineOrders"] .offline-product-row {
  grid-template-columns: 50px minmax(0, 1fr) max-content;
  min-height: 129px;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-main strong {
  display: block;
  min-height: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-line-clamp: unset;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-stock {
  display: inline-flex;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer {
  grid-column: 2 / -1;
  grid-template-columns: minmax(74px, auto) auto minmax(104px, auto);
  justify-content: end;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer b,
body[data-current-view="offlineOrders"] .offline-product-row .offline-product-qty,
body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer .primary {
  grid-column: auto;
  grid-row: 1;
}

body[data-current-view="offlineOrders"] .offline-product-row .offline-added-chip {
  grid-column: 1 / -1;
  grid-row: 2;
}

body[data-current-view="offlineOrders"] .offline-product-row:not(.is-added) .offline-product-footer::after {
  content: "";
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 22px;
}

body[data-current-view="offlineOrders"] .offline-product-grid-card .offline-product-footer {
  grid-template-columns: 1fr;
}

body[data-current-view="offlineOrders"] .offline-product-grid-card .offline-product-qty {
  justify-self: stretch;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
}

body[data-current-view="offlineOrders"] .offline-payment-methods > div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-debit-action {
  border-style: dashed;
  min-height: 36px;
}

body[data-current-view="offlineOrders"] .offline-cart-card {
  grid-template-columns: minmax(0, 1fr);
}

body[data-current-view="offlineOrders"] .offline-cart-card > *,
body[data-current-view="offlineOrders"] .offline-cart-card .offline-card-head > div,
body[data-current-view="offlineOrders"] .offline-cart-head-actions {
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-payment-methods,
body[data-current-view="offlineOrders"] .offline-payment-methods button,
body[data-current-view="offlineOrders"] .offline-submit-actions,
body[data-current-view="offlineOrders"] .offline-submit-actions button {
  min-width: 0;
}

body[data-current-view="offlineOrders"] .offline-payment-methods button,
body[data-current-view="offlineOrders"] .offline-submit-actions button {
  width: 100%;
}

@media (max-width: 1360px) {
  body[data-current-view="offlineOrders"] .offline-modern-workspace {
    grid-template-columns: minmax(190px, 218px) minmax(0, 1fr) minmax(288px, 320px);
  }

  body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer {
    grid-template-columns: minmax(72px, auto) auto minmax(104px, auto);
  }
}

@media (max-width: 1320px) {
  body[data-current-view="offlineOrders"] .offline-modern-page {
    padding-bottom: 10px;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace {
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) !important;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace > .offline-cart-card {
    bottom: auto !important;
    grid-column: 1 / -1 !important;
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    pointer-events: auto !important;
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    z-index: auto !important;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail,
  body[data-current-view="offlineOrders"] .offline-modern-page::after {
    display: none !important;
  }

  body[data-current-view="offlineOrders"] .offline-cart-panel-close {
    display: none !important;
  }

  body[data-current-view="offlineOrders"] .offline-category-card {
    max-height: calc(100vh - 28px);
  }

  body[data-current-view="offlineOrders"] .offline-payment-methods > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  body[data-current-view="offlineOrders"] .offline-catalog-toolbar {
    grid-template-columns: minmax(0, 1fr) 40px auto;
  }

  body[data-current-view="offlineOrders"] .offline-view-indicator {
    grid-column: 1 / -1;
    justify-self: start;
  }

  body[data-current-view="offlineOrders"] .offline-product-row {
    grid-template-columns: 46px minmax(0, 1fr) max-content;
  }

  body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer {
    grid-column: 2 / -1;
    grid-template-columns: minmax(72px, auto) auto minmax(100px, auto);
  }
}

@media (max-width: 820px) {
  body[data-current-view="offlineOrders"] .offline-modern-workspace {
    grid-template-columns: minmax(174px, 210px) minmax(0, 1fr) !important;
  }

  body[data-current-view="offlineOrders"] .offline-category-card,
  body[data-current-view="offlineOrders"] .offline-catalog-card,
  body[data-current-view="offlineOrders"] .offline-cart-card {
    padding: 10px;
  }

  body[data-current-view="offlineOrders"] .offline-product-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="offlineOrders"] .offline-product-row .offline-product-media {
    display: none;
  }

  body[data-current-view="offlineOrders"] .offline-product-row .offline-stock {
    justify-self: start;
  }

  body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer {
    grid-column: auto;
    grid-template-columns: minmax(70px, auto) auto;
    justify-content: stretch;
  }

  body[data-current-view="offlineOrders"] .offline-product-row .offline-product-footer .primary {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body[data-current-view="offlineOrders"] .offline-new-customer-form {
    grid-template-columns: 1fr;
  }
}

/* Uman workspace owns the final responsive geometry after legacy layers. */
body[data-current-view="offlineOrders"] .offline-product-results.is-compact {
  align-content: start !important;
  grid-auto-rows: max-content !important;
}

body[data-current-view="offlineOrders"] .offline-product-compact {
  min-height: 46px !important;
  padding: 5px 10px !important;
}

body[data-current-view="offlineOrders"] .offline-product-compact > button.primary {
  width: 34px;
  min-width: 34px;
  padding-inline: 0;
}

body[data-current-view="offlineOrders"] .offline-product-compact > button.primary span {
  display: none;
}

@media (max-width: 1320px) and (min-width: 1025px) {
  body[data-current-view="offlineOrders"] .offline-modern-workspace {
    grid-template-columns: minmax(168px, 196px) minmax(0, 1fr) minmax(272px, 300px) !important;
    gap: 12px;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace > .offline-cart-card {
    position: sticky !important;
    top: 12px !important;
    bottom: auto !important;
    right: auto !important;
    grid-column: auto !important;
    width: auto !important;
    max-height: calc(100vh - 24px) !important;
    overflow: auto !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 2 !important;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail,
  body[data-current-view="offlineOrders"] .offline-cart-panel-close,
  body[data-current-view="offlineOrders"] .offline-modern-page::after {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  body[data-current-view="offlineOrders"] .offline-modern-page {
    padding-bottom: 84px !important;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace,
  body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-modern-workspace {
    grid-template-columns: minmax(160px, 190px) minmax(0, 1fr) !important;
    gap: 12px;
  }

  body[data-current-view="offlineOrders"] .offline-modern-workspace > .offline-cart-card {
    position: fixed !important;
    inset: 0 0 0 auto !important;
    box-sizing: border-box !important;
    width: min(420px, 94vw) !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    grid-column: auto !important;
    transform: translateX(104%) !important;
    transition: transform 0.22s ease, opacity 0.22s ease !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 70 !important;
    border-radius: 8px 0 0 8px !important;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)) !important;
  }

  body[data-current-view="offlineOrders"] .offline-modern-page.is-cart-panel-open .offline-cart-card {
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body[data-current-view="offlineOrders"] .offline-modern-page::after {
    content: "";
    position: fixed;
    inset: 0;
    display: block !important;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 65;
  }

  body[data-current-view="offlineOrders"] .offline-modern-page.is-cart-panel-open::after {
    opacity: 1;
    pointer-events: auto;
  }

  body[data-current-view="offlineOrders"] .offline-cart-panel-close {
    display: inline-flex !important;
  }

  body[data-current-view="offlineOrders"] .offline-cart-compact-rail {
    position: fixed !important;
    left: 240px !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 60 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #e2e8f0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08);
  }

  body.sidebar-collapsed[data-current-view="offlineOrders"] .offline-cart-compact-rail {
    left: 56px !important;
  }
}

@media (max-width: 900px) {
  body[data-current-view="offlineOrders"] .offline-cart-compact-rail,
  body.sidebar-collapsed[data-current-view="offlineOrders"] .offline-cart-compact-rail {
    left: 0 !important;
  }
}

@media (max-width: 760px) {
  body[data-current-view="offlineOrders"] .offline-modern-workspace,
  body[data-current-view="offlineOrders"] .offline-modern-page.needs-customer .offline-modern-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-current-view="offlineOrders"] .offline-category-card {
    max-height: 180px;
  }

  body[data-current-view="offlineOrders"] .offline-product-compact {
    min-height: 74px !important;
  }
}

/* PrimePartner sidebar v2: final global navigation skin, preserving existing routes and handlers. */
body .sidebar,
body[data-current-view] .sidebar {
  background: linear-gradient(180deg, #081426 0%, #0b1728 54%, #071120 100%);
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.10);
  color: #e5edf7;
}

body .brand {
  color: #ffffff;
}

body .main-nav .nav-home,
body .main-nav .nav-subitems button,
body .main-nav .nav-group-toggle {
  background: transparent;
  border-color: transparent;
  color: #d8e3f1;
}

body .main-nav .nav-home:hover,
body .main-nav .nav-subitems button:hover,
body .main-nav .nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(148, 163, 184, 0.20);
  color: #ffffff;
}

body .main-nav button.active,
body[data-current-view] .main-nav button.active {
  background: linear-gradient(135deg, #1557ff 0%, #0b5cff 100%);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 12px 28px rgba(11, 92, 255, 0.34);
  color: #ffffff;
  font-weight: 850;
}

body .nav-group {
  border-top-color: rgba(148, 163, 184, 0.13);
}

body .nav-group.has-active .nav-group-toggle {
  color: #ffffff;
}

body .nav-group-toggle::after {
  color: #7f8da3;
}

body .main-nav .nav-icon {
  display: inline-flex;
}

body .nav-subitems button::before {
  content: none;
}

body .sidebar-toggle {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: none;
  color: #dbeafe;
}

body .sidebar-toggle:hover {
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(96, 165, 250, 0.45);
  color: #ffffff;
}

body.sidebar-collapsed .sidebar-user-dock {
  display: none;
}

/* Orders journal v4: row color belongs to badges only, never side stripes. */
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row td,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row td {
  background: #ffffff !important;
  box-shadow: none !important;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row:hover td,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row:hover td {
  background: #f8fafc !important;
  box-shadow: none !important;
}

/* Orders journal row rhythm v4 final: keep order rows aligned with site request rows. */
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table th,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table td,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table th,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table td {
  font-size: 13px;
  padding: 12px 10px;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table th,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  height: 44px;
  white-space: nowrap;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table td,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table td {
  border-top: 1px solid #e2e8f0;
  line-height: 1.34;
  min-height: 88px;
  vertical-align: middle;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-work-row {
  height: 88px;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-number-link,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-number-link,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-client-name,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-client-name {
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.22;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-source-main,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-person,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-source-main,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-person {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.24;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-sub,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-row-sub {
  color: #64748b;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 4px;
  max-width: 100%;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-client-phone,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-client-phone {
  color: #94a3b8;
}

body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-payment-marker,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .payment-due-badge,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .order-workflow-badge,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .status,
body[data-current-view="orders"] .orders-smart-page .orders-smart-table.order-work-table .channel-pill,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-payment-marker,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .payment-due-badge,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .order-workflow-badge,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .status,
body[data-current-view="onlineOrders"] .orders-smart-page .orders-smart-table.order-work-table .channel-pill {
  font-size: 11px;
  line-height: 1.18;
  padding: 4px 7px;
}

/* ============================================================================
   ФІНАНСИ: спільне — скрол таблиць усередині картки журналу.
   .table-scroll у розмітці був без жодного CSS (overflow visible) → таблиці
   з min-width вилазили за межі колонки. Використовується Касою, Банківськими
   платежами, журналом списань.
   ========================================================================== */
body[data-current-view="cashDesk"] .table-scroll,
body[data-current-view="bankPayments"] .table-scroll,
body[data-current-view="incomeExpenses"] .table-scroll,
body[data-current-view="expenses"] .table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.cash-table-card .table-scroll {
  padding: 0 14px 14px;
}

/* — Пагінатор фінансових журналів (той самий вигляд, що в Заявках сайту) — */
.finance-journal-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 10px 14px 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  flex-wrap: wrap;
}
.finance-journal-pager label { display: flex; align-items: center; gap: 6px; color: #475467; }
.finance-journal-pager select { padding: 4px 8px; border: 1px solid #d0d5dd; border-radius: 8px; font-size: 13px; }
.finance-journal-pager .site-request-page-arrows { display: flex; align-items: center; gap: 8px; }

/* ============================================================================
   ФІНАНСИ → ВИТРАТИ — «робоче місце бухгалтера» (редизайн 2026-08-20)
   Екран починається з дії і періоду; журнал 7 колонок, групи по днях,
   деталі рядка по кліку; форма inline, сума найбільша; категорії згорнуті.
   ========================================================================== */
.expense-workspace { display: flex; flex-direction: column; gap: 14px; }

.expense-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.expense-head h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.expense-head p { margin: 3px 0 0; color: #667085; font-size: 13px; }
.expense-head-actions { display: flex; align-items: center; gap: 10px; }
.finance-entry-actions { display: flex; align-items: center; gap: 8px; }

.expense-period { display: inline-flex; border: 1px solid #d9dee7; border-radius: 8px; overflow: hidden; background: #fff; }
.expense-period button { border: 0; border-left: 1px solid #d9dee7; background: #fff; color: #667085; font: inherit; font-size: 13px; padding: 9px 12px; cursor: pointer; min-height: 38px; }
.expense-period button:first-child { border-left: 0; }
.expense-period button.active { background: #eef2ff; color: #0f172a; font-weight: 700; }

.expense-new-btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.expense-new-btn .expense-plus { font-size: 18px; line-height: 1; font-weight: 700; }

.expense-custom-period { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #e4e7ec; border-radius: 8px; padding: 10px 14px; }
.expense-custom-period label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #475467; }
.expense-custom-period input { width: auto; min-height: 34px; }

/* KPI: разом + топ-категорії */
.expense-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.expense-kpi { background: #fff; border: 1px solid #e4e7ec; border-radius: 8px; padding: 12px 14px; min-width: 0; }
.expense-kpi-label { font-size: 11px; color: #667085; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-kpi-value { font-size: 19px; font-weight: 700; margin-top: 4px; white-space: nowrap; }
.expense-kpi.is-total .expense-kpi-value { font-size: 21px; color: #b42318; }
.expense-kpi-note { font-size: 12px; color: #667085; margin-top: 2px; }
.expense-kpi-bar { height: 4px; background: #eef2f6; border-radius: 2px; margin-top: 8px; overflow: hidden; }
.expense-kpi-bar > div { height: 4px; background: #0b5cff; border-radius: 2px; }

/* Журнал */
.expense-journal { padding: 0; overflow: hidden; }
.expense-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #e4e7ec; flex-wrap: wrap; }
.expense-search { display: flex; align-items: center; gap: 8px; border: 1px solid #d9dee7; border-radius: 6px; padding: 0 10px; height: 38px; width: 320px; color: #98a2b3; background: #fff; }
.expense-search input { border: 0; min-height: 0; padding: 0; height: 36px; flex: 1; width: auto; font-size: 13px; color: #0f172a; outline: none; }
.expense-quick-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.expense-quick-filters select { width: auto; min-height: 32px; padding: 0 28px 0 10px; border-radius: 999px; font-size: 12px; color: #344054; background-color: #fff; }
.expense-quick-filters .ghost.small { border-radius: 999px; font-size: 12px; }
.expense-voided-toggle { margin-left: auto; font-size: 12px; color: #667085; white-space: nowrap; }
.expense-more-filters { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid #e4e7ec; }
.expense-more-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #475467; font-weight: 700; }
.expense-more-filters input, .expense-more-filters select { min-height: 34px; font-weight: 400; }

.expense-table-head, .expense-row {
  display: grid;
  grid-template-columns: 64px 120px 150px minmax(0, 1.4fr) 140px 120px 130px;
  gap: 0 12px;
  align-items: center;
  padding: 10px 14px;
}
.expense-table-head { font-size: 11px; font-weight: 700; color: #667085; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e4e7ec; }
.expense-day-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 14px; background: #f8fafc; font-size: 12px; color: #475467; border-bottom: 1px solid #eef2f6; }
.expense-day-head span:first-child { font-weight: 700; }
.expense-day-head b { color: #0f172a; }
.expense-row { font-size: 13px; border-bottom: 1px solid #eef2f6; cursor: pointer; }
.expense-row:hover { background: #fbfcfe; }
.expense-row.is-expanded { background: #fbfcfe; border-bottom: 0; }
.expense-row.is-voided { color: #98a2b3; }
.expense-row.is-voided .expense-cp, .expense-row.is-voided .expense-cell-amount { text-decoration: line-through; }
.expense-cell-time { color: #475467; }
.expense-cell-amount { text-align: right; font-weight: 700; white-space: nowrap; }
.expense-cell-main { min-width: 0; }
.expense-cp { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-note { color: #667085; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-cell-muted { color: #475467; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-cell-actions { display: flex; gap: 8px; justify-content: flex-end; white-space: nowrap; }
.expense-cell-actions .link-button { font-size: 12px; }
.expense-status-voided { font-size: 12px; color: #98a2b3; }
.expense-cat-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.expense-row.is-voided .expense-cat-chip { background: #f2f4f7 !important; color: #98a2b3 !important; }

.expense-row-details { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 20px; padding: 4px 14px 14px 90px; background: #fbfcfe; border-bottom: 1px solid #eef2f6; font-size: 12px; }
.expense-row-details > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.expense-row-details span { color: #667085; }
.expense-row-details b { font-weight: 700; color: #0f172a; }
.expense-row-details b.is-posted { color: #027a48; }
.expense-row-details b.is-voided { color: #b42318; }
.expense-detail-note { grid-column: 1 / -1; }
.expense-detail-note b { font-weight: 400; white-space: pre-wrap; }
.expense-empty { padding: 28px 14px; text-align: center; color: #667085; font-size: 13px; }

/* Форма inline */
.expense-form-card { border-color: #12663f; box-shadow: 0 14px 34px rgba(15,23,42,.07); padding: 16px 18px 18px; }
.expense-form { display: flex; flex-direction: column; gap: 12px; }
.expense-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.expense-form-head h3 { margin: 0; font-size: 16px; }
.expense-form-head span { font-size: 12px; color: #667085; }
.expense-form-row { display: grid; grid-template-columns: 180px 220px minmax(0, 1fr) 220px; gap: 12px; align-items: end; }
.expense-form-row label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: #475467; min-width: 0; }
.expense-form-row label small { font-weight: 400; color: #98a2b3; }
.expense-form-row input, .expense-form-row select { font-weight: 400; min-height: 38px; }
.expense-category-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: end; min-width: 0; }
.expense-category-field label { min-width: 0; }
.expense-category-create { min-height: 38px; padding: 0 10px; white-space: nowrap; }
.expense-category-create span { font-size: 16px; font-weight: 800; line-height: 1; }
.finance-counterparty-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; position: relative; }
.finance-counterparty-field > label { color: #475467; font-size: 12px; font-weight: 700; }
.finance-counterparty-results { background: #fff; border: 1px solid #cfd8e3; border-radius: 6px; box-shadow: 0 12px 28px rgba(15, 23, 42, .14); left: 0; max-height: 260px; overflow-y: auto; position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; }
.finance-counterparty-results.is-hidden { display: none; }
.finance-counterparty-results button { background: #fff; border: 0; border-bottom: 1px solid #eef2f6; color: #17202a; cursor: pointer; display: grid; gap: 2px; min-height: 48px; padding: 8px 10px; text-align: left; width: 100%; }
.finance-counterparty-results button:last-child { border-bottom: 0; }
.finance-counterparty-results button:hover,
.finance-counterparty-results button.is-active { background: #eef8f1; box-shadow: inset 3px 0 0 #198754; }
.finance-counterparty-results strong,
.finance-counterparty-results small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-counterparty-results strong { font-size: 13px; }
.finance-counterparty-results small { color: #667085; font-size: 11px; }
.expense-field-amount input { min-height: 44px; border: 2px solid #198754; font-size: 20px; font-weight: 700; }
.expense-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 2px; }
.expense-currency { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #667085; }
.expense-currency select { width: auto; min-height: 30px; padding: 0 26px 0 8px; font-size: 12px; }
.expense-rate { display: flex; align-items: center; gap: 6px; }
.expense-rate input { width: 90px; min-height: 30px; }
.expense-form-actions { display: flex; gap: 10px; }

/* Категорії — згорнутий блок */
.expense-categories { padding: 0; overflow: hidden; }
.expense-categories-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 0; background: #fff; font: inherit; font-size: 13px; color: #1e2329; cursor: pointer; text-align: left; }
.expense-categories-toggle b { font-weight: 700; }
.expense-categories-caret { color: #0b5cff; font-weight: 700; white-space: nowrap; }
.expense-categories-body { padding: 0 14px 14px; border-top: 1px solid #e4e7ec; }
.expense-categories-body .finance-center-category-form { margin: 12px 0; }

/* Адаптив */
@media (max-width: 1320px) {
  .expense-kpi-strip { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .expense-table-head, .expense-row { grid-template-columns: 56px 110px 130px minmax(0, 1.4fr) 120px 100px 120px; gap: 0 10px; }
  .expense-form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-row-details { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-left: 14px; }
}
@media (max-width: 1024px) {
  .expense-head { flex-wrap: wrap; }
  .expense-head-actions { width: 100%; justify-content: space-between; }
  .expense-search { width: 100%; }
  .expense-voided-toggle { margin-left: 0; }
  .expense-table-head { display: none; }
  .expense-row { grid-template-columns: 56px 100px minmax(0, 1fr) 110px; }
  .expense-row > :nth-child(3), .expense-row > :nth-child(5), .expense-row > :nth-child(6) { display: none; }
}
@media (max-width: 760px) {
  .expense-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-form-row { grid-template-columns: minmax(0, 1fr); }
  .expense-form-foot { align-items: stretch; flex-direction: column; }
  .expense-currency { flex-wrap: wrap; width: 100%; }
  .expense-form-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .expense-form-actions button { min-width: 0; }
  .cash-new-category { flex: 1 1 220px; min-width: 0; }
  .cash-new-category input { flex: 1; min-width: 0; width: auto; }
  /* шапка: кнопка на всю ширину під періодом, період — усі 4 кнопки рівні */
  .expense-head-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .finance-entry-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-entry-actions .expense-new-btn { min-width: 0; white-space: normal; }
  .expense-period { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .expense-period button { padding: 9px 4px; font-size: 12px; }
  body[data-current-view="incomeExpenses"] .expense-period button:last-child { grid-column: 1 / -1; }
  .expense-new-btn { justify-content: center; }
  .expense-category-field { grid-template-columns: minmax(0, 1fr); }
  .expense-category-create { width: 100%; }
  /* рядок журналу: 2 рядки — час+сума+дії зверху, контрагент на всю ширину */
  .expense-row { grid-template-columns: 48px minmax(0, 1fr) auto; row-gap: 2px; }
  .expense-row > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .expense-row > :nth-child(2) { grid-column: 2; grid-row: 1; }
  .expense-row > :nth-child(7) { grid-column: 3; grid-row: 1; }
  .expense-row > :nth-child(4) { grid-column: 1 / -1; grid-row: 2; }
  .expense-cell-amount { text-align: left; }
  .expense-row-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-custom-period { flex-wrap: wrap; }
}

/* Витрати: ховаємо дубль заголовка і залишаємо власний заголовок екрана. */
body[data-current-view="expenses"] .topbar #page-title,
body[data-current-view="expenses"] .topbar #page-subtitle {
  display: none;
}
body[data-current-view="expenses"] .topbar {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 0;
}
/* на ≥901px «Меню» і так приховане ERP — topbar схлопується в нуль */
@media (min-width: 901px) {
  body[data-current-view="expenses"] .topbar { display: none; }
}

/* ============================================================================
   ФІНАНСИ → ДОХОДИ / ВИТРАТИ — «звірка руху коштів» (редизайн 2026-08-20)
   Той самий каркас, що «Витрати» (перевикористовує expense-* класи) +
   власні: рядок операції з ± сумою, підсумки дня, швидкі зрізи.
   ========================================================================== */
body[data-current-view="incomeExpenses"] .topbar #page-title,
body[data-current-view="incomeExpenses"] .topbar #page-subtitle { display: none; }
body[data-current-view="incomeExpenses"] .topbar { padding-top: 0; padding-bottom: 0; min-height: 0; }
@media (min-width: 901px) {
  body[data-current-view="incomeExpenses"] .topbar { display: none; }
}

.cash-workspace { display: flex; flex-direction: column; gap: 14px; }

/* KPI: сальдо/надходження/виплати з тоном */
.cash-kpi-strip .expense-kpi.is-balance .expense-kpi-value { color: #175cd3; }
.cash-kpi-strip .expense-kpi.is-balance.is-negative .expense-kpi-value { color: #b42318; }
.cash-kpi-strip .expense-kpi.is-income .expense-kpi-value { color: #027a48; }
.cash-kpi-strip .expense-kpi.is-expense .expense-kpi-value { color: #b42318; }
.cash-kpi-strip .expense-kpi.is-review { border-color: #fec84b; background: #fffcf5; }
.cash-kpi-strip .expense-kpi.is-review .expense-kpi-value { color: #b54708; }

/* Швидкі зрізи */
.cash-quick-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cash-quick-chips button { border: 1px solid #d9dee7; background: #fff; color: #344054; font: inherit; font-size: 12px; padding: 7px 12px; border-radius: 999px; cursor: pointer; min-height: 32px; }
.cash-quick-chips button.active { background: #eef2ff; border-color: #a4bcfd; color: #1e2329; font-weight: 700; }
.cash-quick-chips button.active.income { background: #ecfdf3; border-color: #6ce9a6; color: #027a48; }
.cash-quick-chips button.active.expense { background: #fef3f2; border-color: #fda29b; color: #b42318; }
.cash-quick-chips button.active.review { background: #fffcf5; border-color: #fec84b; color: #b54708; }

/* Таблиця журналу */
.cash-table-head, .cash-row {
  display: grid;
  grid-template-columns: 56px 168px minmax(0, 1.6fr) 120px 150px 140px;
  gap: 0 12px;
  align-items: center;
  padding: 10px 14px;
}
.cash-table-head { font-size: 11px; font-weight: 700; color: #667085; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e4e7ec; }
.cash-day-head .cash-day-totals b.income { color: #027a48; }
.cash-day-head .cash-day-totals b.expense { color: #b42318; }
.cash-row { font-size: 13px; border-bottom: 1px solid #eef2f6; cursor: pointer; }
.cash-row:hover { background: #fbfcfe; }
.cash-row.is-expanded { background: #fbfcfe; border-bottom: 0; }
.cash-row.needs-review { box-shadow: inset 3px 0 0 #fec84b; }
.cash-cell-time { color: #475467; }
.cash-cell-type { min-width: 0; }
.cash-cell-type small { display: block; color: #98a2b3; font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cash-type-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.cash-type-pill.income { background: #ecfdf3; color: #027a48; }
.cash-type-pill.expense { background: #fef3f2; color: #b42318; }
.cash-cell-main { min-width: 0; }
.cash-cp { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cash-note { color: #667085; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cash-cell-muted { color: #475467; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cash-cell-amount { text-align: right; font-weight: 700; white-space: nowrap; }
.cash-cell-amount.income { color: #027a48; }
.cash-cell-amount.expense { color: #b42318; }

.cash-row-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 20px; padding: 4px 14px 14px 82px; background: #fbfcfe; border-bottom: 1px solid #eef2f6; font-size: 12px; }
.cash-row-details > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cash-row-details span { color: #667085; }
.cash-row-details b { font-weight: 700; color: #0f172a; overflow-wrap: anywhere; }
.cash-row-details b.is-review { color: #b54708; }
.cash-detail-note { grid-column: 1 / -1; }
.cash-detail-note b { font-weight: 400; white-space: pre-wrap; }
.cash-row-details .cash-detail-actions { align-items: flex-start; grid-column: 1 / -1; }

/* Перемикач типу у формі */
.cash-type-switch { display: inline-flex; border: 1px solid #d9dee7; border-radius: 8px; overflow: hidden; }
.cash-type-switch button { border: 0; border-left: 1px solid #d9dee7; background: #fff; color: #667085; font: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px; cursor: pointer; min-height: 36px; }
.cash-type-switch button:first-child { border-left: 0; }
.cash-type-switch button.active.income { background: #ecfdf3; color: #027a48; }
.cash-type-switch button.active.expense { background: #fef3f2; color: #b42318; }
.cash-new-category { display: flex; align-items: center; gap: 6px; }
.cash-new-category input { width: 190px; min-height: 30px; font-size: 12px; }
.cash-more-filters { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }

/* Адаптив */
@media (max-width: 1320px) {
  .cash-table-head, .cash-row { grid-template-columns: 52px 150px minmax(0, 1.6fr) 110px 130px 130px; gap: 0 10px; }
  .cash-more-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .cash-table-head { display: none; }
  .cash-row { grid-template-columns: 52px 140px minmax(0, 1fr) 120px; }
  .cash-row > :nth-child(4), .cash-row > :nth-child(5) { display: none; }
  .cash-row-details { padding-left: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cash-row { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 2px; }
  .cash-row > :nth-child(3) { grid-column: 1 / -1; }
  .cash-cell-amount { text-align: right; }
  .cash-row-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-quick-chips { width: 100%; }
  .cash-new-category input { width: 120px; }
}

/* — Каса: рядок пошуку + індикатор сторінок (редизайн-фікс 2026-08-20) — */
.cash-flow-search-line { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px; }
.cash-flow-search-line .expense-search { flex: 1; max-width: 460px; }
.cash-flow-page-indicator { font-size: 13px; color: #475467; padding: 0 4px; white-space: nowrap; }
.cash-flow-filter-button.active { background: #eef2ff; border-color: #a4bcfd; color: #1e2329; }

/* ═══ БЛОК: ФІНАНСОВИЙ ЦЕНТР (окремий пакет fincenter) ═══
   Дубль глобального topbar ховаємо (той самий патерн, що Витрати/Доходи) */
body[data-current-view="financeCenter"] .topbar #page-title,
body[data-current-view="financeCenter"] .topbar #page-subtitle { display: none; }
body[data-current-view="financeCenter"] .topbar { padding-top: 0; padding-bottom: 0; min-height: 0; }
@media (min-width: 901px) {
  body[data-current-view="financeCenter"] .topbar { display: none; }
}

/* ═══ БЛОК: ФІНАНСОВИЙ ЦЕНТР — бойовий візуал (2026-08-20) ═══ */
.fc-workspace { display: flex; flex-direction: column; gap: 14px; }
.fc-refresh { white-space: nowrap; }

/* Герой-KPI: 4 великі картки */
.fc-kpi-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fc-kpi-hero .analytics-kpi-card { padding: 14px 16px; }
.fc-kpi-hero .analytics-kpi-card strong { font-size: 22px; }
.fc-kpi-hero .analytics-kpi-card.green strong { color: #027a48; }
.fc-kpi-hero .analytics-kpi-card.red strong { color: #b42318; }
.fc-kpi-hero .analytics-kpi-card.blue strong { color: #175cd3; }
.fc-kpi-hero .analytics-kpi-card.amber strong { color: #b54708; }

/* Другорядні KPI: 6 компактних */
.fc-kpi-minor { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.fc-kpi-minor .analytics-kpi-card { padding: 10px 12px; }
.fc-kpi-minor .analytics-kpi-card strong { font-size: 16px; }
.fc-kpi-minor .analytics-kpi-card .analytics-kpi-head { font-size: 11px; }
.fc-kpi-minor .analytics-kpi-card small { font-size: 11px; }
.fc-kpi-minor .analytics-kpi-mark { display: none; }

/* Панелі: щільніша шапка, метрики в один візуальний ряд із таблицею */
.finance-center-panel .analytics-card-head h3 { font-size: 15px; }
.finance-center-panel table.compact th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #667085; }

@media (max-width: 1320px) {
  .fc-kpi-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fc-kpi-minor { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .fc-kpi-minor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-center-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .fc-kpi-hero { grid-template-columns: minmax(0, 1fr); }
}

/* ═══ БЛОК: ВЗАЄМОРОЗРАХУНКИ (окремий пакет settlements) ═══ */
body[data-current-view="settlements"] .topbar #page-title,
body[data-current-view="settlements"] .topbar #page-subtitle { display: none; }
body[data-current-view="settlements"] .topbar { padding-top: 0; padding-bottom: 0; min-height: 0; }
@media (min-width: 901px) {
  body[data-current-view="settlements"] .topbar { display: none; }
}

/* Взаєморозрахунки: кнопки дій панелі фільтрів не переносяться */
.settlements-filter-panel .analytics-filter-actions button { white-space: nowrap; }

/* ═══ БЛОК: ВЗАЄМОРОЗРАХУНКИ — бойовий візуал (2026-08-20) ═══ */
.settlement-workspace { display: flex; flex-direction: column; gap: 14px; }
.settlement-head-search { width: 340px; }
.settlement-export-btn { white-space: nowrap; }

/* Канали як великі сегменти-фільтри */
.settlement-channel-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.settlement-channel-card {
  display: grid; gap: 3px; text-align: left;
  background: #fff; border: 1px solid #e4e7ec; border-radius: 8px;
  padding: 12px 14px; cursor: pointer; font: inherit; min-width: 0;
}
.settlement-channel-card span { font-size: 11px; color: #667085; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.settlement-channel-card strong { font-size: 19px; color: #175cd3; }
.settlement-channel-card small { font-size: 12px; color: #667085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settlement-channel-card:hover { border-color: #a4bcfd; }
.settlement-channel-card.active { border-color: #0b5cff; background: #f5f8ff; box-shadow: inset 0 0 0 1px #0b5cff; }

/* KPI-стрічка: кольори змісту */
.settlement-kpi-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.settlement-kpi-strip .expense-kpi-value.is-recv { color: #175cd3; }
.settlement-kpi-strip .expense-kpi-value.is-expected { color: #027a48; }
.settlement-kpi-strip .expense-kpi-value.is-bal { color: #175cd3; }
.settlement-kpi-strip .expense-kpi-value.is-neg { color: #b42318; }
.settlement-kpi-strip .expense-kpi.is-overdue { border-color: #fda29b; background: #fffbfa; }
.settlement-kpi-strip .expense-kpi.is-overdue .expense-kpi-value { color: #b42318; }

/* Тулбар фільтрів у картці таблиці */
.settlement-toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 0 0 12px; }
.settlement-toolbar select { width: auto; min-height: 32px; padding: 0 28px 0 10px; border-radius: 999px; font-size: 12px; color: #344054; background-color: #fff; }
.settlement-toolbar .ghost.small { border-radius: 999px; font-size: 12px; }

/* Права колонка: щільність */
.settlements-side .analytics-card-head h2 { font-size: 14px; }
.settlements-side .analytics-card-head span { display: none; } /* декоративні «Всі» */

@media (max-width: 1320px) {
  .settlement-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .settlement-head-search { width: 100%; }
  .settlement-workspace .expense-head-actions { flex-wrap: wrap; }
  .settlement-channel-breakdown { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .settlement-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settlement-channel-breakdown { grid-template-columns: minmax(0, 1fr); }
}

/* Категорії витрат: пояснення + форма з підписами (Фінцентр і Витрати) */
.category-help {
  margin: 4px 0 12px;
  font-size: 12px;
  color: #667085;
  line-height: 1.5;
  max-width: 720px;
}
.category-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin: 0 0 14px;
}
.category-add-form label:first-child { flex: 1 1 220px; }
.category-add-form label { flex: 0 1 200px; min-width: 170px; }
.category-add-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #475467;
}
.category-add-form input,
.category-add-form select { min-height: 38px; font-weight: 400; }
.category-add-form button { white-space: nowrap; }
@media (max-width: 760px) {
  .category-add-form { grid-template-columns: minmax(0, 1fr); }
}

/* ═══ БЛОК: ФІНЦЕНТР — «панель дня» (2026-08-20, редизайн за макетом) ═══ */
.fc-row-label { font-size: 11px; font-weight: 700; color: #667085; text-transform: uppercase; letter-spacing: .05em; margin: 2px 0 -6px; }

.fc-net-assets {
  display: grid;
  grid-template-columns: minmax(210px, .8fr) minmax(0, 2.2fr);
  gap: 20px;
  align-items: center;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid #101828;
  border-radius: 8px;
  background: #101828;
  color: #ffffff;
}
.fc-net-assets-total { display: grid; gap: 3px; min-width: 0; }
.fc-net-assets-total span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; color: #d0d5dd; }
.fc-net-assets-total strong { font-size: 30px; line-height: 1.15; overflow-wrap: anywhere; }
.fc-net-assets-total strong.is-pos { color: #75e0a7; }
.fc-net-assets-total strong.is-neg { color: #fda29b; }
.fc-net-assets-total small { font-size: 12px; color: #98a2b3; }
.fc-net-assets-components {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
  min-width: 0;
}
.fc-net-assets-components div { display: grid; gap: 2px; min-width: 0; padding-left: 12px; border-left: 1px solid #344054; }
.fc-net-assets-components span { font-size: 11px; line-height: 1.25; color: #98a2b3; }
.fc-net-assets-components b { font-size: 15px; line-height: 1.25; color: #f2f4f7; overflow-wrap: anywhere; }
.fc-net-assets-components .is-minus b { color: #fda29b; }

/* Гроші зараз */
.fc-now-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 10px; }
.fc-now-total, .fc-now-card {
  display: grid; gap: 4px; text-align: left; font: inherit; cursor: pointer;
  border-radius: 10px; padding: 15px 17px; min-width: 0; border: 1px solid #e4e7ec; background: #fff;
}
.fc-now-total { background: #0b1728; border-color: #0b1728; color: #fff; }
.fc-now-total span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .72; }
.fc-now-total strong { font-size: 27px; }
.fc-now-total small { font-size: 12px; opacity: .72; }
.fc-now-card span { font-size: 11px; font-weight: 700; color: #667085; text-transform: uppercase; letter-spacing: .04em; }
.fc-now-card strong { font-size: 20px; color: #0f172a; }
.fc-now-card strong.is-pos { color: #175cd3; }
.fc-now-card strong.is-neg { color: #b42318; }
.fc-now-card small { font-size: 12px; color: #667085; white-space: normal; }
.fc-now-card:hover, .fc-action-card:hover { border-color: #a4bcfd; }
.fc-now-card.is-static { cursor: default; }
.fc-now-card.is-static:hover { border-color: #e4e7ec; }

/* Потребує дії */
.fc-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fc-action-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left; font: inherit; cursor: pointer; min-width: 0;
  background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; padding: 13px 15px;
}
.fc-action-card.warn { background: #fffcf5; border-color: #fec84b; }
.fc-action-card.danger { background: #fffbfa; border-color: #fda29b; }
.fc-action-card strong { display: block; font-size: 14px; }
.fc-action-card em { display: block; font-style: normal; font-size: 18px; font-weight: 700; margin-top: 3px; }
.fc-action-card.warn em { color: #b54708; }
.fc-action-card.danger em { color: #b42318; }
.fc-action-card em small { font-size: 12px; font-weight: 400; color: #667085; }
.fc-action-card > span { background: #fff; border: 1px solid #d9dee7; border-radius: 6px; padding: 8px 12px; font-size: 13px; font-weight: 700; color: #475467; white-space: nowrap; }
.fc-action-card.warn > span { color: #b54708; }
.fc-action-card.danger > span { color: #b42318; }

/* Низ: графік + боржники */
.fc-bottom-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; align-items: start; }
.fc-flow-controls { display: flex; align-items: center; gap: 10px; }
.fc-flow-controls select { width: auto; min-height: 32px; padding: 0 26px 0 10px; font-size: 12px; }
.fc-flow-bars { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding: 6px 4px 0; }
.fc-flow-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; min-width: 0; }
.fc-flow-in { background: #6ce9a6; border-radius: 3px 3px 0 0; }
.fc-flow-out { background: #fda29b; border-radius: 0 0 3px 3px; }
.fc-flow-dates { display: flex; justify-content: space-between; font-size: 11px; color: #98a2b3; padding: 6px 4px 0; }
.fc-flow-legend { display: flex; gap: 14px; font-size: 12px; color: #667085; padding: 8px 4px 2px; }
.fc-flow-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.fc-flow-legend i.in { background: #6ce9a6; }
.fc-flow-legend i.out { background: #fda29b; }
.fc-flow-empty { padding: 20px 0; }
.fc-debtors-list { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.fc-debtor-row { display: flex; justify-content: space-between; gap: 10px; }
.fc-debtor-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-debtor-row b.is-overdue { color: #b42318; }

@media (max-width: 1320px) {
  .fc-net-assets { grid-template-columns: minmax(190px, .7fr) minmax(0, 2.3fr); }
  .fc-now-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fc-action-grid { grid-template-columns: minmax(0, 1fr); }
  .fc-bottom-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .fc-net-assets { grid-template-columns: minmax(0, 1fr); }
  .fc-net-assets-components { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fc-now-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .fc-net-assets { padding: 16px; }
  .fc-net-assets-components { gap: 10px; }
}

/* ═══ БЛОК: ВЗАЄМОРОЗРАХУНКИ — «контроль боргів» (2026-08-20, за макетом) ═══ */
.settlement-barometer { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.settlement-barometer .expense-kpi-value { font-size: 21px; }
.settlement-barometer .expense-kpi.is-balance-card { background: #f5f8ff; border-color: #a4bcfd; }

/* Тулбар ядра */
.settlements-table-card { padding: 0; overflow: hidden; }
.settlement-toolbar { padding: 12px 14px; border-bottom: 1px solid #e4e7ec; }
.settlement-toolbar-title { margin: 0 auto 0 0; font-size: 15px; }
.settlement-toolbar-count { font-size: 12px; color: #667085; margin-left: 6px; white-space: nowrap; }
.settlement-debt-chip { border: 1px solid #d9dee7; background: #fff; color: #344054; font: inherit; font-size: 12px; padding: 0 12px; min-height: 32px; border-radius: 999px; cursor: pointer; }
.settlement-debt-chip.active { background: #fef3f2; border-color: #fda29b; color: #b42318; font-weight: 700; }

/* Грід-рядки таблиці */
.settlement-grid-head, .settlement-grid-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 110px 130px 120px 120px 150px 110px;
  gap: 0 12px;
  align-items: center;
  padding: 10px 14px;
}
.settlement-grid-head { font-size: 11px; font-weight: 700; color: #667085; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e4e7ec; }
.settlement-grid-row { font-size: 13px; border-bottom: 1px solid #eef2f6; cursor: pointer; }
.settlement-grid-row:hover { background: #fbfcfe; }
.settlement-grid-row.is-expanded { background: #fbfcfe; border-bottom: 0; }
.settlement-grid-head .num, .settlement-grid-row .num { text-align: right; white-space: nowrap; }
.settlement-grid-row .num.is-strong { font-weight: 700; }
.settlement-grid-row .num.is-debt { font-weight: 700; color: #b42318; }
.settlement-grid-row .num.is-zero { color: #98a2b3; }
.settlement-debt-cell strong { display: block; font: inherit; }
.settlement-debt-cell small { color: #067647; display: block; font-size: 11px; font-weight: 700; margin-top: 2px; }
.settlement-cp-cell { min-width: 0; }
.settlement-cp-cell b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settlement-cp-cell small { color: #667085; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.settlement-cell-muted { color: #475467; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Розгорнутий рядок: неоплачені документи */
.settlement-row-details { background: #fbfcfe; border-bottom: 1px solid #eef2f6; padding: 2px 14px 14px 30px; }
.settlement-details-head { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 700; color: #667085; text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 8px; }
.settlement-details-meta { text-transform: none; font-weight: 400; letter-spacing: 0; }
.settlement-doc-head, .settlement-doc-row {
  display: grid;
  grid-template-columns: 140px 110px minmax(0, 1fr) 120px 110px;
  gap: 0 12px;
  padding: 6px 0;
  font-size: 13px;
  align-items: center;
}
.settlement-doc-head { font-size: 12px; color: #667085; border-bottom: 1px solid #eef2f6; }
.settlement-doc-row { border-bottom: 1px solid #f5f7fa; }
.settlement-doc-row:last-of-type { border-bottom: 0; }
.settlement-doc-head .num, .settlement-doc-row .num { text-align: right; white-space: nowrap; }
.settlement-doc-row .num.is-debt { color: #b42318; font-weight: 700; }
.settlement-doc-num { color: #0b5cff; font-weight: 700; }
.settlement-doc-note { color: #667085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settlement-details-actions { margin-top: 10px; display: flex; gap: 10px; }

/* Низ: аналітика + дії */
.settlement-bottom-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: stretch; }
.settlement-aging-card h3, .settlement-balance-card h3 { margin: 0 0 10px; font-size: 14px; }
.settlement-aging-line { margin-bottom: 10px; }
.settlement-aging-meta { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.settlement-aging-line.red .settlement-aging-meta b { color: #b42318; }
.settlement-aging-track { height: 6px; background: #eef2f6; border-radius: 3px; overflow: hidden; }
.settlement-aging-track i { display: block; height: 6px; border-radius: 3px; }
.settlement-aging-line.green .settlement-aging-track i { background: #12b76a; }
.settlement-aging-line.amber .settlement-aging-track i { background: #f79009; }
.settlement-aging-line.red .settlement-aging-track i { background: #f04438; }
.settlement-balance-card { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.settlement-balance-bar { height: 14px; border-radius: 7px; overflow: hidden; display: flex; }
.settlement-balance-bar i.recv { background: #12b76a; }
.settlement-balance-bar i.pay { background: #7a5af8; }
.settlement-balance-legend { display: flex; justify-content: space-between; font-size: 12px; color: #667085; }
.settlement-balance-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }
.settlement-balance-legend i.recv { background: #12b76a; }
.settlement-balance-legend i.pay { background: #7a5af8; }
.settlement-actions-list { display: flex; flex-direction: column; gap: 8px; }
.settlement-action-row { flex: 1; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; padding: 10px 14px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.settlement-action-row:hover { border-color: #a4bcfd; }
.settlement-action-row span { font-size: 16px; }
.settlement-action-row em { font-style: normal; color: #98a2b3; margin-left: auto; }

@media (max-width: 1320px) {
  .settlement-barometer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settlement-grid-head, .settlement-grid-row { grid-template-columns: minmax(0, 1.5fr) 100px 120px 110px 110px 140px 100px; gap: 0 10px; }
  .settlement-bottom-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .settlement-grid-head { display: none; }
  .settlement-grid-row { grid-template-columns: minmax(0, 1.4fr) 110px 110px 100px; }
  .settlement-grid-row > :nth-child(2), .settlement-grid-row > :nth-child(3), .settlement-grid-row > :nth-child(6) { display: none; }
  .settlement-doc-head, .settlement-doc-row { grid-template-columns: 110px 90px minmax(0, 1fr) 100px; }
  .settlement-doc-head > :nth-child(4), .settlement-doc-row > :nth-child(4) { display: none; }
  .settlement-row-details { padding-left: 14px; }
}
@media (max-width: 760px) {
  .settlement-barometer { grid-template-columns: minmax(0, 1fr); }
  .settlement-grid-row { grid-template-columns: minmax(0, 1fr) 100px; row-gap: 2px; }
  .settlement-grid-row > :nth-child(5), .settlement-grid-row > :nth-child(7) { display: none; }
}

/* ═══ БЛОК: КАСА — «живий журнал грошей» (2026-08-20, за макетом) ═══ */
.cashflow-workspace { display: flex; flex-direction: column; gap: 14px; padding: 0; }

/* Помітний пошук журналу: однакова позиція в Касі та Банківських платежах. */
.finance-journal-search-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
}
.finance-journal-search-row .finance-journal-search {
  border-color: #b9c3d3;
  flex: 1 1 420px;
  height: 42px;
  max-width: 720px;
  width: 100%;
}
.finance-journal-search-row .finance-journal-search:focus-within {
  border-color: #0b5cff;
  box-shadow: 0 0 0 3px rgba(11, 92, 255, .12);
}
.cashflow-search-row {
  border-left: 0;
  border-radius: 0;
  border-right: 0;
  border-top: 0;
}

/* Контури з балансами */
.cashflow-scopes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cashflow-scope-card {
  display: grid; gap: 3px; text-align: left; font: inherit; cursor: pointer; min-width: 0;
  background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; padding: 13px 16px;
}
.cashflow-scope-card span { font-size: 11px; font-weight: 700; color: #667085; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cashflow-scope-card strong { font-size: 20px; color: #0f172a; white-space: nowrap; }
.cashflow-scope-card small { font-size: 11px; color: #667085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cashflow-scope-card:hover { border-color: #a4bcfd; }
.cashflow-scope-card.active { border-color: #0b5cff; background: #f5f8ff; box-shadow: inset 0 0 0 1px #0b5cff; }
.cashflow-scope-card.is-total { background: #0b1728; border-color: #0b1728; }
.cashflow-scope-card.is-total span, .cashflow-scope-card.is-total small { color: rgba(229, 237, 247, .72); }
.cashflow-scope-card.is-total strong { color: #fff; font-size: 22px; }
.cashflow-scope-card.is-total.active { box-shadow: inset 0 0 0 2px #4d7fff; }

/* День одним рядком */
.cashflow-day-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cashflow-day-strip .expense-kpi-value.is-in { color: #027a48; }
.cashflow-day-strip .expense-kpi-value.is-out { color: #b42318; }
.cashflow-day-strip .expense-kpi-value.is-net { color: #175cd3; }
.cashflow-unallocated { font: inherit; text-align: left; cursor: pointer; }
.cashflow-unallocated.warn { background: #fffcf5; border-color: #fec84b; }
.cashflow-unallocated.warn .expense-kpi-value { color: #b54708; }
.cashflow-unallocated .expense-kpi-note { color: #0b5cff; font-weight: 700; }

/* Пілюлі статусів у картці журналу */
.cashflow-pills { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid #e4e7ec; }
.cashflow-pills button { border: 1px solid #d9dee7; background: #fff; color: #344054; font: inherit; font-size: 12px; padding: 0 12px; min-height: 32px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.cashflow-pills button.active { background: #eef2ff; border-color: #a4bcfd; color: #1e2329; font-weight: 700; }
.cashflow-pills button.active.income { background: #ecfdf3; border-color: #6ce9a6; color: #027a48; }
.cashflow-pills button.active.expense { background: #fef3f2; border-color: #fda29b; color: #b42318; }
.cashflow-pills button.active.unallocated { background: #fffcf5; border-color: #fec84b; color: #b54708; }

/* Журнал */
.cashflow-table-head, .cashflow-row {
  display: grid;
  grid-template-columns: 52px 160px minmax(0, 1.5fr) 130px 130px 120px 110px;
  gap: 0 12px;
  align-items: center;
  padding: 10px 14px;
}
.cashflow-table-head { font-size: 11px; font-weight: 700; color: #667085; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e4e7ec; }
.cashflow-row { font-size: 13px; border-bottom: 1px solid #eef2f6; cursor: pointer; }
.cashflow-row:hover { background: #fbfcfe; }
.cashflow-row.is-expanded { background: #fbfcfe; border-bottom: 0; }
.cashflow-row.needs-review { box-shadow: inset 3px 0 0 #fec84b; }
.cashflow-balance { text-align: right; color: #475467; white-space: nowrap; font-size: 12px; }
.cash-type-pill.transfer { background: #eef2ff; color: #3538cd; }

.cashflow-row-details { background: #fbfcfe; border-bottom: 1px solid #eef2f6; padding: 2px 14px 14px 78px; }
.cashflow-details-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 20px; font-size: 12px; }
.cashflow-details-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cashflow-details-grid span { color: #667085; }
.cashflow-details-grid b { font-weight: 700; color: #0f172a; overflow-wrap: anywhere; }
.cashflow-detail-note { grid-column: 1 / -1; }
.cashflow-detail-note b { font-weight: 400; white-space: pre-wrap; }
.cashflow-details-actions { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 1320px) {
  .cashflow-day-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cashflow-table-head, .cashflow-row { grid-template-columns: 48px 140px minmax(0, 1.5fr) 110px 120px 110px 100px; gap: 0 10px; }
}
@media (max-width: 1024px) {
  .cashflow-table-head { display: none; }
  .cashflow-row { grid-template-columns: 48px 130px minmax(0, 1fr) 110px; }
  .cashflow-row > :nth-child(4), .cashflow-row > :nth-child(6), .cashflow-row > :nth-child(7) { display: none; }
  .cashflow-row-details { padding-left: 14px; }
  .cashflow-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cashflow-day-strip { grid-template-columns: minmax(0, 1fr); }
  .cashflow-row { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 2px; }
  .cashflow-row > :nth-child(3) { grid-column: 1 / -1; }
}

/* Каса: дубль глобального topbar ховаємо (той самий патерн) */
body[data-current-view="cashDesk"] .topbar #page-title,
body[data-current-view="cashDesk"] .topbar #page-subtitle { display: none; }
body[data-current-view="cashDesk"] .topbar { padding-top: 0; padding-bottom: 0; min-height: 0; }
@media (min-width: 901px) {
  body[data-current-view="cashDesk"] .topbar { display: none; }
}

/* Фінцентр: рядок детальних розшифровок (повернені breakdown-кліки) */
.fc-breakdown-links { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; font-size: 12px; color: #667085; margin-top: -6px; }
.fc-breakdown-links .link-button { font-size: 12px; }

/* Банк: компактний конвеєр рознесення. Усі правила локальні для bankPayments. */
body[data-current-view="bankPayments"] .topbar #page-title,
body[data-current-view="bankPayments"] .topbar #page-subtitle { display: none; }
body[data-current-view="bankPayments"] .topbar { min-height: 0; padding-bottom: 0; padding-top: 0; }
@media (min-width: 901px) {
  body[data-current-view="bankPayments"] .topbar { display: none; }
}

body[data-current-view="bankPayments"] .bank-cashier-page { display: flex; flex-direction: column; gap: 14px; }
body[data-current-view="bankPayments"] .bank-head-actions { flex-wrap: wrap; justify-content: flex-end; }
body[data-current-view="bankPayments"] .bank-sync-caption { color: #667085; flex: 1 0 100%; font-size: 12px; font-weight: 700; text-align: right; }
body[data-current-view="bankPayments"] .bank-sync-date { align-items: center; color: #475467; display: flex; font-size: 12px; gap: 6px; }
body[data-current-view="bankPayments"] .bank-sync-date input { min-height: 36px; width: 130px; }
body[data-current-view="bankPayments"] .bank-settings-btn,
body[data-current-view="bankPayments"] .bank-sync-all,
body[data-current-view="bankPayments"] .bank-sync-one { white-space: nowrap; }

body[data-current-view="bankPayments"] .bank-fop-row {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
body[data-current-view="bankPayments"] .bank-fop-tab {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 2px;
  min-width: 0;
  padding: 11px 14px;
  text-align: left;
}
body[data-current-view="bankPayments"] .bank-fop-tab > span {
  align-items: center;
  color: #667085;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
body[data-current-view="bankPayments"] .bank-fop-tab span i,
body[data-current-view="bankPayments"] .bank-fop-picker-row > i {
  border-radius: 50%;
  flex: 0 0 8px;
  height: 8px;
  width: 8px;
}
body[data-current-view="bankPayments"] .tone-green { background: #12b76a; }
body[data-current-view="bankPayments"] .tone-orange { background: #f79009; }
body[data-current-view="bankPayments"] .tone-red { background: #f04438; }
body[data-current-view="bankPayments"] .tone-blue { background: #0b5cff; }
body[data-current-view="bankPayments"] .bank-fop-tab > strong { color: #0f172a; font-size: 19px; }
body[data-current-view="bankPayments"] .bank-fop-tab > strong small { color: #667085; font-size: 12px; font-weight: 400; }
body[data-current-view="bankPayments"] .bank-fop-tab > small { color: #98a2b3; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-current-view="bankPayments"] .bank-fop-tab > small.warn { color: #b54708; }
body[data-current-view="bankPayments"] .bank-fop-tab:hover { border-color: #a4bcfd; }
body[data-current-view="bankPayments"] .bank-fop-tab:focus-visible { outline: 2px solid #0b5cff; outline-offset: 2px; }
body[data-current-view="bankPayments"] .bank-fop-tab.active { background: #f5f8ff; border-color: #0b5cff; box-shadow: inset 0 0 0 1px #0b5cff; }
body[data-current-view="bankPayments"] .bank-fop-more-wrap { min-width: 0; position: relative; }
body[data-current-view="bankPayments"] .bank-fop-more { height: 100%; position: relative; width: 100%; }
body[data-current-view="bankPayments"] .bank-fop-more em { color: #0b5cff; font-style: normal; font-weight: 700; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
body[data-current-view="bankPayments"] .bank-fop-more.open { background: #f5f8ff; border-color: #a4bcfd; }

body[data-current-view="bankPayments"] .bank-fop-picker {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(480px, 90vw);
  z-index: 60;
}
body[data-current-view="bankPayments"] .bank-fop-picker-head { align-items: center; display: flex; gap: 10px; justify-content: space-between; padding: 6px 8px 10px; }
body[data-current-view="bankPayments"] .bank-fop-picker-head b { font-size: 13px; white-space: nowrap; }
body[data-current-view="bankPayments"] .bank-fop-picker-head input { font-size: 12px; min-height: 30px; width: 190px; }
body[data-current-view="bankPayments"] .bank-fop-picker-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
body[data-current-view="bankPayments"] .bank-fop-picker-row { align-items: center; border: 1px solid transparent; border-radius: 8px; display: flex; gap: 10px; padding: 8px 10px; }
body[data-current-view="bankPayments"] .bank-fop-picker-row:hover { background: #f8fafc; }
body[data-current-view="bankPayments"] .bank-fop-picker-row.active { background: #f5f8ff; border-color: #a4bcfd; }
body[data-current-view="bankPayments"] .bank-fop-picker-row.problem { background: #fffcf5; }
body[data-current-view="bankPayments"] .bank-fop-picker-main { background: none; border: 0; cursor: pointer; display: grid; flex: 1; font: inherit; gap: 1px; min-width: 0; padding: 0; text-align: left; }
body[data-current-view="bankPayments"] .bank-fop-picker-main b,
body[data-current-view="bankPayments"] .bank-fop-picker-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-current-view="bankPayments"] .bank-fop-picker-main b { font-size: 13px; }
body[data-current-view="bankPayments"] .bank-fop-picker-main small { color: #98a2b3; font-size: 11px; }
body[data-current-view="bankPayments"] .bank-fop-picker-row.problem .bank-fop-picker-main small { color: #b54708; }
body[data-current-view="bankPayments"] .bank-fop-picker-count { flex-shrink: 0; font-size: 13px; }
body[data-current-view="bankPayments"] .bank-fop-picker-row .link-button { flex-shrink: 0; font-size: 12px; white-space: nowrap; }
body[data-current-view="bankPayments"] .bank-fop-picker-foot { align-items: center; border-top: 1px solid #eef2f6; display: flex; gap: 10px; justify-content: space-between; margin-top: 6px; padding: 9px 8px 4px; }
body[data-current-view="bankPayments"] .bank-fop-picker-foot span { color: #667085; font-size: 11px; }
body[data-current-view="bankPayments"] .bank-fop-picker-foot .link-button { font-size: 12px; white-space: nowrap; }

body[data-current-view="bankPayments"] .bank-payment-period-filter {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(320px, 1fr) auto;
  padding: 10px 12px;
}
body[data-current-view="bankPayments"] .bank-payment-period-copy { display: grid; gap: 1px; min-width: 150px; }
body[data-current-view="bankPayments"] .bank-payment-period-copy strong { color: #101828; font-size: 13px; }
body[data-current-view="bankPayments"] .bank-payment-period-copy small { color: #667085; font-size: 11px; }
body[data-current-view="bankPayments"] .bank-payment-period-presets {
  background: #eaecf0;
  border-radius: 8px;
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 3px;
}
body[data-current-view="bankPayments"] .bank-payment-period-presets button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #475467;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}
body[data-current-view="bankPayments"] .bank-payment-period-presets button:hover { background: rgba(255, 255, 255, .72); }
body[data-current-view="bankPayments"] .bank-payment-period-presets button.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
  color: #0b5cff;
}
body[data-current-view="bankPayments"] .bank-payment-period-presets button:focus-visible { outline: 2px solid #0b5cff; outline-offset: 1px; }
body[data-current-view="bankPayments"] .bank-payment-period-custom { align-items: center; display: flex; gap: 8px; }
body[data-current-view="bankPayments"] .bank-payment-period-custom label { align-items: center; color: #475467; display: flex; font-size: 11px; gap: 5px; white-space: nowrap; }
body[data-current-view="bankPayments"] .bank-payment-period-custom input { background: #fff; min-height: 34px; width: 128px; }

body[data-current-view="bankPayments"] .bank-barometer { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body[data-current-view="bankPayments"] .bank-barometer .expense-kpi-value.is-in { color: #027a48; }
body[data-current-view="bankPayments"] .bank-barometer .expense-kpi-value small { color: #667085; font-size: 12px; font-weight: 400; }
body[data-current-view="bankPayments"] .bank-barometer .expense-kpi.is-unresolved.warn { background: #fffcf5; border-color: #fec84b; }
body[data-current-view="bankPayments"] .bank-barometer .expense-kpi.is-unresolved.warn .expense-kpi-value { color: #b54708; }
body[data-current-view="bankPayments"] .bank-minor-line { color: #667085; font-size: 12px; margin-top: -6px; }
body[data-current-view="bankPayments"] .bank-minor-line b { color: #0f172a; }
body[data-current-view="bankPayments"] .bank-pill-bar { display: flex; flex-direction: column; gap: 8px; }
body[data-current-view="bankPayments"] .bank-search-line { border-color: #d9dee7; }
body[data-current-view="bankPayments"] .bank-active-filters {
  align-items: center;
  background: #fffcf5;
  border: 1px solid #fec84b;
  border-radius: 8px;
  color: #934b0c;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 12px;
}
body[data-current-view="bankPayments"] .bank-active-filters .ghost.small { white-space: nowrap; }

/* Рознесення: номер, дата і борг мають стабільні колонки без налізання. */
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact { table-layout: fixed; width: 100%; }
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact th:nth-child(1) { width: 34%; }
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact th:nth-child(2) { text-align: right; width: 20%; }
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact th:nth-child(3) { width: 26%; }
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact th:nth-child(4) { text-align: right; width: 20%; }
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact th,
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact td { padding: 8px 6px; }
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact td { vertical-align: top; }
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact td:nth-child(2),
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact td:nth-child(4) { font-size: 12px; text-align: right; white-space: nowrap; }
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact td strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-current-view="bankPayments"] .bank-allocation-orders table.compact td small { color: #98a2b3; display: block; font-size: 11px; }

body[data-current-view="bankPayments"] .bank-purpose-cell > span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-current-view="bankPayments"] .bank-candidate-line { color: #0b5cff; display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-current-view="bankPayments"] .bank-candidate-line .link-button { font-size: 12px; padding: 0; }
body[data-current-view="bankPayments"] .bank-payer-cell small { color: #98a2b3; display: block; font-size: 11px; }
body[data-current-view="bankPayments"] .bank-cashier-table { min-width: 720px; table-layout: fixed; width: 100%; }
body[data-current-view="bankPayments"] .bank-cashier-table th:nth-child(1),
body[data-current-view="bankPayments"] .bank-cashier-table td:nth-child(1) { text-align: left; width: 104px; }
body[data-current-view="bankPayments"] .bank-cashier-table th:nth-child(2),
body[data-current-view="bankPayments"] .bank-cashier-table td:nth-child(2) { width: 25%; }
body[data-current-view="bankPayments"] .bank-cashier-table th:nth-child(3),
body[data-current-view="bankPayments"] .bank-cashier-table td:nth-child(3) { width: auto; }
body[data-current-view="bankPayments"] .bank-cashier-table th:nth-child(4),
body[data-current-view="bankPayments"] .bank-cashier-table td:nth-child(4) { width: 112px; }
body[data-current-view="bankPayments"] .bank-cashier-table th:nth-child(5),
body[data-current-view="bankPayments"] .bank-cashier-table td:nth-child(5) { width: 126px; }
body[data-current-view="bankPayments"] .bank-cashier-table tr[data-bank-select-payment]:focus-visible { outline: 2px solid #0b5cff; outline-offset: -2px; }
body[data-current-view="bankPayments"] .bank-date-cell { color: #475467; font-size: 12px; overflow-wrap: normal; }
body[data-current-view="bankPayments"] .bank-payer-cell strong,
body[data-current-view="bankPayments"] .bank-payer-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 1361px) {
  body[data-current-view="bankPayments"] .bank-cashier-workspace { grid-template-columns: minmax(0, 1fr) minmax(380px, .52fr); }
  body[data-current-view="bankPayments"] .bank-allocation-panel { max-height: calc(100vh - 24px); overflow-y: auto; position: sticky; top: 12px; }
}
@media (max-width: 1360px) {
  body[data-current-view="bankPayments"] .bank-cashier-workspace { grid-template-columns: minmax(0, 1fr); }
  body[data-current-view="bankPayments"] .bank-allocation-panel { position: static; }
}
@media (max-width: 1320px) {
  body[data-current-view="bankPayments"] .bank-barometer,
  body[data-current-view="bankPayments"] .bank-fop-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  body[data-current-view="bankPayments"] .bank-head-actions { justify-content: flex-start; }
  body[data-current-view="bankPayments"] .bank-sync-caption { text-align: left; }
  body[data-current-view="bankPayments"] .bank-payment-period-filter { grid-template-columns: auto minmax(0, 1fr); }
  body[data-current-view="bankPayments"] .bank-payment-period-custom { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 900px) {
  body[data-current-view="bankPayments"] .bank-fop-picker { left: 0; right: auto; width: min(480px, calc(100vw - 32px)); }
}
@media (max-width: 760px) {
  .finance-journal-search-row .finance-journal-search { flex-basis: 100%; max-width: none; }
  body[data-current-view="bankPayments"] .bank-barometer,
  body[data-current-view="bankPayments"] .bank-fop-row { grid-template-columns: minmax(0, 1fr); }
  body[data-current-view="bankPayments"] .bank-fop-picker-head,
  body[data-current-view="bankPayments"] .bank-fop-picker-foot { align-items: stretch; flex-direction: column; }
  body[data-current-view="bankPayments"] .bank-fop-picker-head input { width: 100%; }
  body[data-current-view="bankPayments"] .bank-fop-picker-row { align-items: flex-start; flex-wrap: wrap; }
  body[data-current-view="bankPayments"] .bank-fop-picker-row .link-button { margin-left: 18px; }
  body[data-current-view="bankPayments"] .bank-payment-period-filter { align-items: stretch; grid-template-columns: minmax(0, 1fr); }
  body[data-current-view="bankPayments"] .bank-payment-period-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-current-view="bankPayments"] .bank-payment-period-custom { display: grid; grid-column: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-current-view="bankPayments"] .bank-payment-period-custom label { align-items: stretch; display: grid; gap: 4px; }
  body[data-current-view="bankPayments"] .bank-payment-period-custom input { width: 100%; }
  body[data-current-view="bankPayments"] .expense-period { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-current-view="bankPayments"] .bank-sync-date { justify-content: space-between; }
  body[data-current-view="bankPayments"] .bank-sync-date input { flex: 1; width: auto; }
  body[data-current-view="bankPayments"] .bank-settings-btn,
  body[data-current-view="bankPayments"] .bank-sync-all,
  body[data-current-view="bankPayments"] .bank-sync-one { justify-content: center; width: 100%; }
}
@media (max-width: 480px) {
  .finance-journal-search-row { align-items: stretch; }
  .finance-journal-search-row > .ghost.small { width: 100%; }
  body[data-current-view="bankPayments"] .bank-payment-period-custom { grid-template-columns: minmax(0, 1fr); }
  body[data-current-view="bankPayments"] .bank-fop-picker { bottom: calc(100% + 8px); top: auto; }
  body[data-current-view="bankPayments"] .bank-allocation-orders table,
  body[data-current-view="bankPayments"] .bank-allocation-orders tbody,
  body[data-current-view="bankPayments"] .bank-allocation-orders tr,
  body[data-current-view="bankPayments"] .bank-allocation-orders td { display: block; width: 100%; }
  body[data-current-view="bankPayments"] .bank-allocation-orders thead { display: none; }
  body[data-current-view="bankPayments"] .bank-allocation-orders tbody { display: grid; gap: 8px; }
  body[data-current-view="bankPayments"] .bank-allocation-orders tr {
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }
  body[data-current-view="bankPayments"] .bank-allocation-orders td { border: 0; min-width: 0; padding: 0; }
  body[data-current-view="bankPayments"] .bank-allocation-orders td::before {
    color: #667085;
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 3px;
  }
  body[data-current-view="bankPayments"] .bank-allocation-orders td:nth-child(1)::before { content: "Накладна"; }
  body[data-current-view="bankPayments"] .bank-allocation-orders td:nth-child(2)::before { content: "Борг до"; }
  body[data-current-view="bankPayments"] .bank-allocation-orders td:nth-child(3)::before { content: "Зарахувати"; }
  body[data-current-view="bankPayments"] .bank-allocation-orders td:nth-child(4)::before { content: "Залишиться"; }
  body[data-current-view="bankPayments"] .bank-allocation-orders td > strong,
  body[data-current-view="bankPayments"] .bank-allocation-orders td > small { display: block; }
}

/* Rozetka Pay uses the same bank mutation contour in a focused reconciliation workspace. */
body[data-current-view="bankPayments"] .bank-cashier-workspace.bank-payout-focus {
  display: block;
}

body[data-current-view="bankPayments"] .bank-payout-page-focus > .bank-head,
body[data-current-view="bankPayments"] .bank-payout-page-focus > .bank-fop-row,
body[data-current-view="bankPayments"] .bank-payout-page-focus > .bank-barometer,
body[data-current-view="bankPayments"] .bank-payout-page-focus > .bank-minor-line,
body[data-current-view="bankPayments"] .bank-payout-page-focus > .bank-pill-bar,
body[data-current-view="bankPayments"] .bank-payout-page-focus > .bank-active-filters {
  display: none;
}

body[data-current-view="bankPayments"] .bank-payout-focus > .bank-payments-table-card {
  display: none;
}

body[data-current-view="bankPayments"] .bank-payout-focus > .bank-allocation-panel {
  max-height: none;
  overflow: visible;
  position: static;
  width: 100%;
}

body[data-current-view="bankPayments"] .bank-payout-builder {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(288px, 332px);
  margin-top: 16px;
  min-width: 0;
}

body[data-current-view="bankPayments"] .bank-payout-main,
body[data-current-view="bankPayments"] .bank-payout-client-list,
body[data-current-view="bankPayments"] .bank-payout-client,
body[data-current-view="bankPayments"] .bank-payout-invoices {
  display: grid;
  gap: 12px;
  min-width: 0;
}

body[data-current-view="bankPayments"] .bank-payout-focus-head,
body[data-current-view="bankPayments"] .bank-payout-client-head,
body[data-current-view="bankPayments"] .bank-payout-invoices-head,
body[data-current-view="bankPayments"] .bank-payout-posted-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

body[data-current-view="bankPayments"] .bank-payout-focus-head h2,
body[data-current-view="bankPayments"] .bank-payout-posted-head h3 {
  margin: 6px 0 0;
}

body[data-current-view="bankPayments"] .bank-payout-focus-head p {
  color: #667085;
  margin: 6px 0 0;
}

body[data-current-view="bankPayments"] .bank-payout-client {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  padding: 14px;
}

body[data-current-view="bankPayments"] .bank-payout-client-head > div {
  display: grid;
  gap: 3px;
}

body[data-current-view="bankPayments"] .bank-payout-client-head {
  position: relative;
}

body[data-current-view="bankPayments"] .bank-payout-client-head span,
body[data-current-view="bankPayments"] .bank-payout-client-fields label > span,
body[data-current-view="bankPayments"] .bank-payout-reason > span,
body[data-current-view="bankPayments"] .bank-payout-commission > span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

body[data-current-view="bankPayments"] .bank-payout-client-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px);
}

body[data-current-view="bankPayments"] .bank-payout-client-fields label,
body[data-current-view="bankPayments"] .bank-payout-reason,
body[data-current-view="bankPayments"] .bank-payout-commission {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body[data-current-view="bankPayments"] .bank-payout-client-fields select,
body[data-current-view="bankPayments"] .bank-payout-client-fields input,
body[data-current-view="bankPayments"] .bank-payout-reason textarea,
body[data-current-view="bankPayments"] .bank-payout-commission input {
  min-width: 0;
  width: 100%;
}

body[data-current-view="bankPayments"] .bank-payout-customer-meta,
body[data-current-view="bankPayments"] .bank-payout-client-empty {
  color: #667085;
  font-size: 13px;
  margin: 0;
}

body[data-current-view="bankPayments"] .bank-payout-invoices {
  border-top: 1px solid #eaecf0;
  padding-top: 10px;
}

body[data-current-view="bankPayments"] .bank-payout-invoice-row {
  align-items: center;
  border-bottom: 1px solid #f0f2f5;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 132px;
  padding: 8px 0;
}

body[data-current-view="bankPayments"] .bank-payout-invoice-row:last-child {
  border-bottom: 0;
}

body[data-current-view="bankPayments"] .bank-payout-invoice-row > span,
body[data-current-view="bankPayments"] .bank-payout-invoice-row strong,
body[data-current-view="bankPayments"] .bank-payout-invoice-row small {
  display: block;
  min-width: 0;
}

body[data-current-view="bankPayments"] .bank-payout-invoice-row small {
  color: #667085;
  font-size: 12px;
  margin-top: 2px;
}

body[data-current-view="bankPayments"] .bank-payout-invoice-row input {
  min-width: 0;
  width: 100%;
}

body[data-current-view="bankPayments"] .bank-payout-row-summary {
  align-items: center;
  background: #f8fafc;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 9px 10px;
}

body[data-current-view="bankPayments"] .bank-payout-row-summary.is-error {
  background: #fff4f2;
}

body[data-current-view="bankPayments"] .bank-payout-add-client {
  justify-self: start;
}

body[data-current-view="bankPayments"] .bank-payout-reconcile {
  background: #f8fafc;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
  position: sticky;
  top: 12px;
}

body[data-current-view="bankPayments"] .bank-payout-reconcile-line {
  align-items: center;
  border-bottom: 1px solid #e4e7ec;
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
}

body[data-current-view="bankPayments"] .bank-payout-reconcile-difference {
  background: #fff4f2;
  border: 1px solid #fda29b;
  border-radius: 7px;
  display: grid;
  gap: 5px;
  padding: 12px;
}

body[data-current-view="bankPayments"] .bank-payout-reconcile-difference.is-ready {
  background: #ecfdf3;
  border-color: #6ce9a6;
}

body[data-current-view="bankPayments"] .bank-payout-reconcile-difference small,
body[data-current-view="bankPayments"] .bank-payout-reconcile > small {
  color: #667085;
  line-height: 1.4;
}

body[data-current-view="bankPayments"] .bank-payout-submit,
body[data-current-view="bankPayments"] .bank-payout-launch {
  width: 100%;
}

body[data-current-view="bankPayments"] .bank-payout-loading {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #475467;
  padding: 16px;
}

body[data-current-view="bankPayments"] .bank-payout-posted {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

body[data-current-view="bankPayments"] .bank-payout-posted-totals {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-current-view="bankPayments"] .bank-payout-posted-totals > div {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

body[data-current-view="bankPayments"] .bank-payout-posted-totals span,
body[data-current-view="bankPayments"] .bank-payout-posted-items small,
body[data-current-view="bankPayments"] .bank-payout-posted-meta dt {
  color: #667085;
  font-size: 12px;
}

body[data-current-view="bankPayments"] .bank-payout-posted-items {
  border: 1px solid #e4e7ec;
  border-radius: 7px;
}

body[data-current-view="bankPayments"] .bank-payout-posted-items > div {
  align-items: center;
  border-bottom: 1px solid #e4e7ec;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px;
}

body[data-current-view="bankPayments"] .bank-payout-posted-items > div:last-child {
  border-bottom: 0;
}

body[data-current-view="bankPayments"] .bank-payout-posted-items span,
body[data-current-view="bankPayments"] .bank-payout-posted-items small {
  display: block;
}

body[data-current-view="bankPayments"] .bank-payout-posted-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

body[data-current-view="bankPayments"] .bank-payout-posted-meta > div {
  display: grid;
  gap: 3px;
  grid-template-columns: 90px minmax(0, 1fr);
}

body[data-current-view="bankPayments"] .bank-payout-posted-meta dd {
  margin: 0;
}

@media (max-width: 1024px) {
  body[data-current-view="bankPayments"] .bank-payout-builder {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="bankPayments"] .bank-payout-reconcile {
    position: static;
  }
}

@media (max-width: 600px) {
  body[data-current-view="bankPayments"] .bank-payout-focus > .bank-allocation-panel {
    border-radius: 0;
    margin-inline: -10px;
    width: calc(100% + 20px);
  }

  body[data-current-view="bankPayments"] .bank-payout-focus-head,
  body[data-current-view="bankPayments"] .bank-payout-client-head,
  body[data-current-view="bankPayments"] .bank-payout-invoices-head {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-current-view="bankPayments"] .bank-payout-client-head .icon-button {
    align-self: flex-end;
    position: absolute;
  }

  body[data-current-view="bankPayments"] .bank-payout-client-fields,
  body[data-current-view="bankPayments"] .bank-payout-invoice-row,
  body[data-current-view="bankPayments"] .bank-payout-posted-totals {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="bankPayments"] .bank-payout-invoice-row input {
    width: 100%;
  }

  body[data-current-view="bankPayments"] .bank-payout-posted-meta > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Keep the supplier payment contour reachable inside the legacy purchases workspace. */
body[data-current-view="purchases"] .supplier-payment-form {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

body[data-current-view="purchases"] .supplier-finance-card {
  max-width: 100%;
  width: 100%;
}

body[data-current-view="purchases"] .purchase-stage {
  grid-template-columns: minmax(0, 1fr);
}

body[data-current-view="purchases"] .supplier-payment-form > * {
  max-width: 100%;
  min-width: 0;
}

body[data-current-view="purchases"] .supplier-payment-form input,
body[data-current-view="purchases"] .supplier-payment-form select {
  width: 100%;
}

@media (max-width: 1320px) and (min-width: 801px) {
  body[data-current-view="purchases"] .supplier-payment-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body[data-current-view="purchases"] .purchase-history.has-selection {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  body[data-current-view="purchases"] .purchase-history.has-selection,
  body[data-current-view="purchases"] .supplier-payment-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 721px) and (max-width: 960px) {
  .channel-price-batch-table-shell {
    overflow: visible;
  }

  .channel-price-batch-table,
  .channel-price-batch-table tbody,
  .channel-price-batch-table tr,
  .channel-price-batch-table td {
    display: block;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .channel-price-batch-table {
    table-layout: auto;
  }

  .channel-price-batch-table thead {
    display: none;
  }

  .channel-price-batch-table tbody {
    display: grid;
    gap: 10px;
  }

  .channel-price-batch-table tr {
    border: 1px solid var(--line);
    border-radius: 7px;
    overflow: hidden;
  }

  .channel-price-batch-table td,
  .channel-price-batch-table td:nth-child(1) {
    display: grid;
    grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1.3fr);
    gap: 10px;
    align-items: start;
    width: auto;
    padding: 9px 11px;
    text-align: left;
    white-space: normal;
  }

  .channel-price-batch-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
  }

  .channel-price-batch-table td > small,
  .channel-price-batch-table td > strong,
  .channel-price-batch-table td > span,
  .channel-price-batch-table td:nth-child(1) .channel-price-batch-check {
    grid-column: 2;
  }
}

/* Purchase Center: warehouse-scoped procurement flow. */
body[data-current-view="purchaseCenter"] .pc-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

body[data-current-view="purchaseCenter"] .pc-toolbar {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0;
}

body[data-current-view="purchaseCenter"] .pc-toolbar h2,
body[data-current-view="purchaseCenter"] .pc-toolbar p {
  margin: 0;
}

body[data-current-view="purchaseCenter"] .pc-toolbar p {
  color: var(--muted);
  margin-top: 4px;
}

body[data-current-view="purchaseCenter"] .pc-toolbar label {
  flex: 0 1 300px;
  margin: 0;
}

body[data-current-view="purchaseCenter"] .pc-columns {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

body[data-current-view="purchaseCenter"] .pc-column {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

body[data-current-view="purchaseCenter"] .pc-column-need { border-top: 3px solid #d92d20; }
body[data-current-view="purchaseCenter"] .pc-column-transit { border-top: 3px solid #dc6803; }
body[data-current-view="purchaseCenter"] .pc-column-accept { border-top: 3px solid #067647; }
body[data-current-view="purchaseCenter"] .pc-column-settle { border-top: 3px solid #175cd3; }

body[data-current-view="purchaseCenter"] .pc-column-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
}

body[data-current-view="purchaseCenter"] .pc-column-head > div {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

body[data-current-view="purchaseCenter"] .pc-column-head strong {
  font-size: 14px;
}

body[data-current-view="purchaseCenter"] .pc-stage-dot {
  background: currentColor;
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  width: 8px;
}

body[data-current-view="purchaseCenter"] .pc-column-need .pc-stage-dot { color: #d92d20; }
body[data-current-view="purchaseCenter"] .pc-column-transit .pc-stage-dot { color: #dc6803; }
body[data-current-view="purchaseCenter"] .pc-column-accept .pc-stage-dot { color: #067647; }
body[data-current-view="purchaseCenter"] .pc-column-settle .pc-stage-dot { color: #175cd3; }

body[data-current-view="purchaseCenter"] .pc-column-badge {
  background: var(--soft);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
}

body[data-current-view="purchaseCenter"] .pc-column-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 560px;
  overflow-y: auto;
  padding: 8px;
}

body[data-current-view="purchaseCenter"] .pc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 0;
  padding: 10px;
}

body[data-current-view="purchaseCenter"] .pc-card-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

body[data-current-view="purchaseCenter"] .pc-card-sub,
body[data-current-view="purchaseCenter"] .pc-card-foot {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

body[data-current-view="purchaseCenter"] .pc-card-foot {
  font-size: 11px;
  margin-top: 7px;
}

body[data-current-view="purchaseCenter"] .pc-card-title {
  display: -webkit-box;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-current-view="purchaseCenter"] .pc-card-note {
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

body[data-current-view="purchaseCenter"] .pc-negative {
  color: #b42318;
}

body[data-current-view="purchaseCenter"] .pc-document {
  color: #175cd3;
}

body[data-current-view="purchaseCenter"] .pc-need-card {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

body[data-current-view="purchaseCenter"] .pc-need-card.is-drafted {
  background: #f5f8ff;
  border-color: #a4bcfd;
}

body[data-current-view="purchaseCenter"] .pc-thumb {
  align-items: center;
  background: var(--soft);
  border-radius: 6px;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  overflow: hidden;
  width: 42px;
}

body[data-current-view="purchaseCenter"] .pc-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

body[data-current-view="purchaseCenter"] .pc-need-info {
  min-width: 0;
}

body[data-current-view="purchaseCenter"] .pc-row-action,
body[data-current-view="purchaseCenter"] .pc-text-action,
body[data-current-view="purchaseCenter"] .pc-more {
  background: transparent;
  border: 0;
  color: #175cd3;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 5px;
}

body[data-current-view="purchaseCenter"] .pc-row-action:disabled {
  color: #067647;
  cursor: default;
}

body[data-current-view="purchaseCenter"] .pc-transit-card {
  cursor: pointer;
}

body[data-current-view="purchaseCenter"] .pc-transit-card:hover {
  border-color: #84adff;
}

body[data-current-view="purchaseCenter"] .pc-transit-card.is-overdue {
  background: #fffbfa;
  border-color: #fda29b;
}

body[data-current-view="purchaseCenter"] .pc-progress {
  background: var(--soft);
  border-radius: 3px;
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
}

body[data-current-view="purchaseCenter"] .pc-progress i {
  display: block;
  height: 100%;
}

body[data-current-view="purchaseCenter"] .pc-progress .active { background: #dc6803; }
body[data-current-view="purchaseCenter"] .pc-progress .danger { background: #d92d20; }
body[data-current-view="purchaseCenter"] .pc-progress .success { background: #067647; }

body[data-current-view="purchaseCenter"] .pc-accept-card.is-due {
  background: #f6fef9;
  border-color: #75e0a7;
}

body[data-current-view="purchaseCenter"] .pc-card-actions {
  display: flex;
  gap: 7px;
  margin-top: 9px;
}

body[data-current-view="purchaseCenter"] .pc-card-actions button {
  flex: 1 1 0;
}

body[data-current-view="purchaseCenter"] .pc-empty {
  background: var(--soft);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 12px;
  text-align: center;
}

body[data-current-view="purchaseCenter"] .pc-more {
  border: 1px dashed var(--line);
  border-radius: 7px;
  padding: 8px;
  width: 100%;
}

body[data-current-view="purchaseCenter"] .pc-column-action {
  margin: 0 8px 8px;
  width: calc(100% - 16px);
}

body[data-current-view="purchaseCenter"] .pc-journals {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-current-view="purchaseCenter"] .pc-journals button {
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 11px 13px;
  text-align: left;
}

body[data-current-view="purchaseCenter"] .pc-journals button:hover {
  background: #f5f8ff;
  border-color: #84adff;
}

body[data-current-view="purchaseCenter"] .pc-journals span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1280px) {
  body[data-current-view="purchaseCenter"] .pc-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-current-view="purchaseCenter"] .pc-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  body[data-current-view="purchaseCenter"] .pc-toolbar label {
    flex-basis: auto;
  }

  body[data-current-view="purchaseCenter"] .pc-columns,
  body[data-current-view="purchaseCenter"] .pc-journals {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="purchaseCenter"] .pc-column-body {
    max-height: none;
  }
}

@media (max-width: 480px) {
  body[data-current-view="purchaseCenter"] .pc-need-card {
    align-items: start;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  body[data-current-view="purchaseCenter"] .pc-thumb {
    height: 38px;
    width: 38px;
  }

  body[data-current-view="purchaseCenter"] .pc-row-action {
    grid-column: 2;
    justify-self: start;
    padding-left: 0;
  }
}

/* Purchases: supplier-order catalog and review form. */
.order-catalog-dialog.is-supplier-order {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.order-catalog-dialog.is-supplier-order .order-catalog-cart-panel {
  display: none;
}

@media (min-width: 1100px) {
  .order-catalog-dialog.is-supplier-order .order-catalog-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

.order-catalog-dialog.is-supplier-order .order-catalog-grid {
  grid-auto-rows: max-content;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.order-catalog-dialog.is-supplier-order .order-catalog-card.is-supplier-order-tile {
  height: auto;
}

.order-catalog-purchase-bar {
  align-items: center;
  background: #101828;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 0;
  padding: 10px 12px;
}

.order-catalog-purchase-totals {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.order-catalog-purchase-totals strong {
  color: #ffffff;
  font-size: 14px;
}

.order-catalog-purchase-totals span {
  color: #b9c2d0;
  font-size: 12px;
}

.order-catalog-purchase-bar-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.order-catalog-purchase-clear {
  background: transparent;
  border: 1px solid #475467;
  border-radius: 6px;
  color: #d0d5dd;
  cursor: pointer;
  font-weight: 700;
  min-height: 38px;
  padding: 0 12px;
}

.order-catalog-purchase-clear:disabled,
.order-catalog-purchase-commit:disabled {
  cursor: default;
  opacity: 0.45;
}

.order-catalog-purchase-commit {
  min-height: 40px;
  white-space: nowrap;
}

.order-catalog-card.is-supplier-order-tile .order-catalog-card-media {
  position: relative;
}

.order-catalog-stock-chip {
  background: rgba(16, 24, 40, 0.82);
  border-radius: 999px;
  bottom: 6px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  left: 6px;
  padding: 3px 7px;
  position: absolute;
}

.order-catalog-stock-chip.negative {
  background: #b42318;
}

.order-catalog-card.is-supplier-order-tile.in-order {
  background: #f5f8ff;
  border-color: #2970ff;
  box-shadow: inset 0 0 0 1px #2970ff;
}

.order-catalog-in-order-badge {
  background: #eef4ff;
  border: 1px solid #b2ccff;
  border-radius: 999px;
  color: #175cd3;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  justify-self: start;
  padding: 3px 7px;
}

.order-catalog-no-price {
  color: #b54708 !important;
}

.order-catalog-card-actions.is-supplier-order {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-catalog-card-actions.is-supplier-order .order-catalog-stepper {
  flex: 1 1 94px;
}

.order-catalog-card-actions.is-supplier-order .primary.small {
  flex: 1 1 88px;
  width: auto;
}

.order-catalog-box-add,
.order-catalog-min-hint {
  min-height: 32px;
  white-space: nowrap;
}

.order-catalog-min-hint {
  background: #fffcf5;
  border: 1px dashed #fdb022;
  border-radius: 6px;
  color: #b54708;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
}

.order-catalog-tile-remove {
  background: transparent;
  border: 0;
  color: #667085;
  cursor: pointer;
  font-size: 17px;
  min-height: 32px;
  padding: 4px 7px;
}

.order-catalog-tile-remove:hover {
  color: #b42318;
}

.supplier-order-focus-page {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.supplier-order-focus-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.supplier-order-focus-toolbar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.supplier-order-focus-page .so-blank {
  background: #ffffff;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  overflow: hidden;
  padding: 14px;
}

.so-heading {
  align-items: center;
  border-bottom: 1px solid #e6edf5;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: -14px -14px 0;
  padding: 14px;
}

.so-heading h2,
.so-heading p {
  margin: 0;
}

.so-heading h2 {
  font-size: 22px;
  margin-top: 3px;
}

.so-heading p {
  color: var(--muted);
  margin-top: 4px;
}

.so-fields-primary {
  align-items: end;
  grid-template-columns: minmax(145px, 0.7fr) minmax(220px, 1.15fr) minmax(210px, 1fr) minmax(180px, 0.9fr) minmax(190px, 1fr) auto;
}

.so-fields-secondary {
  display: none;
}

.so-fields-secondary.is-open {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.so-more-toggle {
  background: #f8fafc;
  border: 1px dashed #b8c2d1;
  border-radius: 8px;
  color: #175cd3;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  min-height: 42px;
  padding: 0 12px;
  white-space: nowrap;
}

.so-field-warning small {
  color: #b54708;
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
}

.so-field-warning input {
  border-color: #fdb022;
}

.so-catalog-bar {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.so-catalog-bar span {
  color: var(--muted);
  font-size: 12px;
}

.supplier-order-lines.so-lines {
  border-color: #dfe7f2;
  padding: 0;
}

.so-table-shell {
  min-width: 0;
  overflow: hidden;
}

.so-line-table {
  border: 0;
  margin: 0;
  width: 100%;
}

.so-line-table th {
  white-space: nowrap;
}

.so-line-table td {
  vertical-align: middle;
}

.so-cell-product {
  min-width: 240px;
}

.so-line-thumb {
  height: 40px;
  margin-right: 8px;
  vertical-align: middle;
  width: 40px;
}

.so-line-name {
  display: inline-flex;
  flex-direction: column;
  max-width: 360px;
  min-width: 0;
  vertical-align: middle;
}

.so-line-name strong {
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.so-line-name small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.so-cell-stock,
.so-cell-sum {
  white-space: nowrap;
}

.so-cell-stock.negative {
  color: #b42318;
  font-weight: 800;
}

.so-stepper {
  align-items: center;
  border: 1px solid #d9dee7;
  border-radius: 7px;
  display: inline-grid;
  grid-template-columns: 30px 68px 30px;
  overflow: hidden;
  vertical-align: middle;
}

.so-stepper button {
  background: #f8fafc;
  border: 0;
  color: #344054;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  height: 32px;
}

.so-stepper input.table-input {
  border: 0;
  border-left: 1px solid #eef2f6;
  border-radius: 0;
  border-right: 1px solid #eef2f6;
  height: 32px;
  padding: 0 4px;
  text-align: center;
  width: 68px;
}

.so-box-button {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 6px;
  color: #175cd3;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  margin-left: 5px;
  min-height: 32px;
  padding: 0 8px;
  white-space: nowrap;
}

.so-row-box-warning td {
  background: #fffcf5;
}

.so-box-hint {
  color: #b54708;
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
  white-space: nowrap;
}

.so-price-input {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px dashed #98a2b3 !important;
  border-radius: 0 !important;
  font-weight: 800;
  max-width: 105px;
}

.so-price-input.is-zero {
  background: #fffcf5 !important;
  border-bottom-color: #fdb022 !important;
}

.so-actions {
  align-items: center;
  border-top: 1px solid #e6edf5;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 0;
  padding: 12px;
}

.so-zero-price-hint {
  color: #b54708;
  font-size: 12px;
  font-weight: 800;
  margin-right: auto;
}

.so-submit {
  min-height: 44px;
  padding-inline: 18px;
}

.so-empty {
  padding: 18px;
}

@media (max-width: 1200px) {
  .so-fields-primary,
  .so-fields-secondary.is-open {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }
}

@media (max-width: 800px) {
  .order-catalog-dialog.is-supplier-order {
    grid-template-rows: auto auto auto auto;
  }

  .order-catalog-purchase-bar,
  .so-heading,
  .so-catalog-bar,
  .so-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .order-catalog-purchase-bar-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .order-catalog-purchase-commit {
    white-space: normal;
  }

  .so-heading .supplier-order-summary-cards {
    width: 100%;
  }

  .so-fields-primary,
  .so-fields-secondary.is-open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .so-more-toggle {
    width: 100%;
  }

  .so-table-shell {
    overflow: visible;
  }

  .so-line-table,
  .so-line-table tbody,
  .so-line-table tr,
  .so-line-table td {
    display: block;
    width: 100%;
  }

  .so-line-table thead {
    display: none;
  }

  .so-line-table tbody {
    display: grid;
    gap: 8px;
    padding: 8px;
  }

  .so-line-table tr {
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    padding: 10px;
    position: relative;
  }

  .so-line-table td {
    border: 0;
    min-width: 0;
    padding: 6px 0;
  }

  .so-line-table td:not(.so-cell-product):not(.so-cell-remove)::before {
    color: var(--muted);
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
  }

  .so-cell-product {
    padding-right: 34px !important;
  }

  .so-cell-remove {
    position: absolute;
    right: 8px;
    top: 8px;
    width: auto !important;
  }
}

@media (max-width: 520px) {
  .order-catalog-dialog.is-supplier-order .order-catalog-grid,
  .so-fields-primary,
  .so-fields-secondary.is-open,
  .order-catalog-purchase-bar-actions,
  .supplier-order-summary-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .supplier-order-focus-toolbar {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .supplier-order-focus-toolbar span {
    text-align: left;
  }

  .so-stepper {
    grid-template-columns: 30px minmax(54px, 68px) 30px;
  }

  .so-box-hint {
    white-space: normal;
  }
}

/* Purchases: supplier directory workspace. */
body[data-current-view="suppliers"] .topbar #page-title,
body[data-current-view="suppliers"] .topbar #page-subtitle {
  display: none;
}

body[data-current-view="suppliers"] .sup-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-current-view="suppliers"] .sup-kpi {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 12px 14px;
}

body[data-current-view="suppliers"] .sup-kpi span {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

body[data-current-view="suppliers"] .sup-kpi strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}

body[data-current-view="suppliers"] .sup-kpi.attention-red {
  border-top: 3px solid #f04438;
  padding-top: 10px;
}

body[data-current-view="suppliers"] .sup-kpi.attention-red strong,
body[data-current-view="suppliers"] .sup-debt {
  color: #b42318;
}

body[data-current-view="suppliers"] .sup-toolbar {
  grid-template-columns: minmax(0, 1fr);
}

body[data-current-view="suppliers"] .sup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 2px;
}

body[data-current-view="suppliers"] .so-chip {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
}

body[data-current-view="suppliers"] .so-chip:hover {
  border-color: #a4bcfd;
}

body[data-current-view="suppliers"] .so-chip.active {
  background: #eef2ff;
  border-color: #a4bcfd;
  color: #1d2939;
}

body[data-current-view="suppliers"] .so-chip.ok {
  color: #027a48;
}

body[data-current-view="suppliers"] .so-chip.ok.active {
  background: #f6fef9;
  border-color: #a6f4c5;
}

body[data-current-view="suppliers"] .so-chip.danger {
  color: #b42318;
}

body[data-current-view="suppliers"] .so-chip.danger.active {
  background: #fffbfa;
  border-color: #fda29b;
}

body[data-current-view="suppliers"] .sup-table th.sup-num,
body[data-current-view="suppliers"] .sup-table td.sup-num {
  text-align: right;
  white-space: nowrap;
}

body[data-current-view="suppliers"] .supplier-row {
  cursor: pointer;
}

body[data-current-view="suppliers"] .sup-table td {
  padding-bottom: 10px;
  padding-top: 10px;
  vertical-align: middle;
}

body[data-current-view="suppliers"] .sup-name-cell {
  align-items: center;
  display: flex;
  gap: 10px;
}

body[data-current-view="suppliers"] .sup-name-info {
  min-width: 0;
}

body[data-current-view="suppliers"] .sup-name-info > strong,
body[data-current-view="suppliers"] .sup-name-info > .muted {
  display: block;
}

body[data-current-view="suppliers"] .sup-name-info > .status {
  margin-left: 6px;
}

body[data-current-view="suppliers"] .sup-avatar {
  align-items: center;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 36px;
  font-size: 13px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  width: 36px;
}

body[data-current-view="suppliers"] .sup-avatar-lg {
  flex-basis: 46px;
  font-size: 16px;
  height: 46px;
  width: 46px;
}

body[data-current-view="suppliers"] .pc-reliability {
  align-items: center;
  color: #475467;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  white-space: nowrap;
}

body[data-current-view="suppliers"] .pc-dots {
  font-size: 10px;
  letter-spacing: 1px;
}

body[data-current-view="suppliers"] .pc-dots i {
  color: #e4e7ec;
  font-style: normal;
}

body[data-current-view="suppliers"] .pc-reliability.good .pc-dots {
  color: #12b76a;
}

body[data-current-view="suppliers"] .pc-reliability.mid .pc-dots {
  color: #f79009;
}

body[data-current-view="suppliers"] .pc-reliability.bad .pc-dots {
  color: #f04438;
}

body[data-current-view="suppliers"] .pc-reliability.muted {
  font-weight: 400;
  white-space: normal;
}

body[data-current-view="suppliers"] .sup-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
}

body[data-current-view="suppliers"] .sup-card-title {
  flex: 1;
  min-width: 0;
}

body[data-current-view="suppliers"] .sup-card-sums {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

body[data-current-view="suppliers"] .sup-sum {
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
}

body[data-current-view="suppliers"] .sup-sum span {
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

body[data-current-view="suppliers"] .sup-sum strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

body[data-current-view="suppliers"] .sup-sum .sup-paid {
  color: #027a48;
}

body[data-current-view="suppliers"] .sup-sum.is-debt {
  background: #fffbfa;
  border-color: #fda29b;
}

body[data-current-view="suppliers"] .sup-sum.is-debt strong {
  color: #b42318;
}

body[data-current-view="suppliers"] .sup-advance {
  background: #f6fef9;
  border: 1px solid #a6f4c5;
  border-radius: 8px;
  color: #027a48;
  font-size: 12px;
  padding: 7px 10px;
}

body[data-current-view="suppliers"] .sup-reliability-row {
  align-items: center;
  background: #f8fafc;
  border-radius: 8px;
  color: #667085;
  display: flex;
  font-size: 12px;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 12px;
}

body[data-current-view="suppliers"] .sup-actions {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-current-view="suppliers"] .sup-new-order {
  width: 100%;
}

body[data-current-view="suppliers"] .sup-actions-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-current-view="suppliers"] .sup-actions-row .ghost {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="suppliers"] .sup-pay {
  border-color: #d9d6fe;
  color: #5925dc;
}

@media (max-width: 760px) {
  body[data-current-view="suppliers"] .sup-table,
  body[data-current-view="suppliers"] .sup-table tbody,
  body[data-current-view="suppliers"] .sup-table tr,
  body[data-current-view="suppliers"] .sup-table td {
    display: block;
    width: 100%;
  }

  body[data-current-view="suppliers"] .sup-table thead {
    display: none;
  }

  body[data-current-view="suppliers"] .sup-table tbody {
    display: grid;
    gap: 8px;
    padding: 8px;
  }

  body[data-current-view="suppliers"] .sup-table tr {
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    padding: 10px;
  }

  body[data-current-view="suppliers"] .sup-table tr.selected-row {
    border-color: #84adff;
  }

  body[data-current-view="suppliers"] .sup-table td {
    border: 0;
    min-width: 0;
    padding: 6px 0;
    text-align: left;
    white-space: normal;
  }

  body[data-current-view="suppliers"] .sup-table td:not(.sup-name-cell):not([colspan]) {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
  }

  body[data-current-view="suppliers"] .sup-table td:not(.sup-name-cell):not([colspan])::before {
    color: #667085;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
  }

  body[data-current-view="suppliers"] .sup-table td.sup-num {
    text-align: left;
  }

  body[data-current-view="suppliers"] .supplier-card-receipts,
  body[data-current-view="suppliers"] .supplier-card-receipts tbody,
  body[data-current-view="suppliers"] .supplier-card-receipts tr,
  body[data-current-view="suppliers"] .supplier-card-receipts td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  body[data-current-view="suppliers"] .supplier-card-receipts thead {
    display: none;
  }

  body[data-current-view="suppliers"] .supplier-card-receipts tbody {
    display: grid;
    gap: 8px;
  }

  body[data-current-view="suppliers"] .supplier-card-receipts tr {
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 8px 10px;
  }

  body[data-current-view="suppliers"] .supplier-card-receipts td {
    align-items: center;
    border: 0;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 4px 0;
    white-space: normal;
  }

  body[data-current-view="suppliers"] .supplier-card-receipts td:not([colspan])::before {
    color: #667085;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
  }
}

@media (max-width: 520px) {
  body[data-current-view="suppliers"] .supplier-directory-head {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-current-view="suppliers"] .supplier-directory-head button {
    width: 100%;
  }

  body[data-current-view="suppliers"] .sup-kpis,
  body[data-current-view="suppliers"] .sup-card-sums,
  body[data-current-view="suppliers"] .sup-actions-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="suppliers"] .sup-reliability-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Purchases: supplier-order journal and document workspace. */
body[data-current-view="supplierOrders"] .topbar #page-title,
body[data-current-view="supplierOrders"] .topbar #page-subtitle {
  display: none;
}

body[data-current-view="supplierOrders"] .supplier-order-toolbar {
  grid-template-columns: minmax(260px, 1fr) minmax(210px, 280px);
}

body[data-current-view="supplierOrders"] .so-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-current-view="supplierOrders"] .so-chip {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 7px 12px;
}

body[data-current-view="supplierOrders"] .so-chip:hover,
body[data-current-view="supplierOrders"] .so-chip:focus-visible {
  border-color: #84ad98;
  outline: none;
}

body[data-current-view="supplierOrders"] .so-chip.active {
  background: #eef7f1;
  border-color: #87c39f;
  color: #14532d;
}

body[data-current-view="supplierOrders"] .so-chip.warn {
  color: #a15c07;
}

body[data-current-view="supplierOrders"] .so-chip.warn.active {
  background: #fff8e8;
  border-color: #f2c45f;
}

body[data-current-view="supplierOrders"] .so-chip.danger {
  color: #b42318;
}

body[data-current-view="supplierOrders"] .so-chip.danger.active {
  background: #fff3f1;
  border-color: #fda29b;
}

body[data-current-view="supplierOrders"] .so-chip.ok {
  color: #027a48;
}

body[data-current-view="supplierOrders"] .so-chip.ok.active {
  background: #ecfdf3;
  border-color: #86d3aa;
}

body[data-current-view="supplierOrders"] .so-compact-table {
  min-width: 660px;
}

body[data-current-view="supplierOrders"] .so-compact-table th:nth-child(1),
body[data-current-view="supplierOrders"] .so-compact-table td:nth-child(1) {
  width: 16%;
}

body[data-current-view="supplierOrders"] .so-compact-table th:nth-child(2),
body[data-current-view="supplierOrders"] .so-compact-table td:nth-child(2) {
  width: 28%;
}

body[data-current-view="supplierOrders"] .so-compact-table th:nth-child(3),
body[data-current-view="supplierOrders"] .so-compact-table td:nth-child(3) {
  width: 14%;
}

body[data-current-view="supplierOrders"] .so-compact-table th:nth-child(4),
body[data-current-view="supplierOrders"] .so-compact-table td:nth-child(4) {
  width: 20%;
}

body[data-current-view="supplierOrders"] .so-compact-table th:last-child,
body[data-current-view="supplierOrders"] .so-compact-table td:last-child {
  width: 22%;
  white-space: normal;
}

body[data-current-view="supplierOrders"] .so-row-number {
  color: #175cd3;
}

body[data-current-view="supplierOrders"] .so-row-supplier b,
body[data-current-view="supplierOrders"] .so-row-sum strong {
  color: #1d2939;
}

body[data-current-view="supplierOrders"] .supplier-document-card {
  grid-template-columns: minmax(0, 1fr);
}

body[data-current-view="supplierOrders"] .supplier-document-row:focus-visible td {
  box-shadow: inset 0 0 0 2px #84ad98;
}

.so-card-top {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.so-card-oneline {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #475467;
  font-size: 13px;
  padding: 10px 12px;
}

.so-card-kpis {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.so-card-kpis > div {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 9px;
}

.so-card-kpis span {
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.so-card-kpis strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.so-card-kpis .so-ok {
  color: #027a48;
}

.so-card-kpis > div.is-debt {
  background: #fff7f6;
  border-color: #fda29b;
}

.so-card-kpis > div.is-debt strong {
  color: #b42318;
}

.so-card-fields {
  margin-bottom: 2px;
}

.so-card-lines {
  min-width: 0 !important;
  table-layout: fixed;
  width: 100%;
}

.so-card-lines th,
.so-card-lines td {
  font-size: 11px;
  padding-left: 6px;
  padding-right: 6px;
}

.so-card-lines th:nth-child(1),
.so-card-lines td:nth-child(1) {
  width: 50%;
}

.so-card-lines th:nth-child(2),
.so-card-lines td:nth-child(2) {
  white-space: normal;
  width: 30%;
}

.so-card-lines th:nth-child(3),
.so-card-lines td:nth-child(3) {
  text-align: right;
  width: 20%;
}

.so-card-line-name {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.so-zero {
  color: #98a2b3;
}

.so-all-fields {
  font-size: 12px;
  margin-top: 6px;
}

.so-empty-fields {
  font-size: 12px;
}

.so-timeline {
  align-items: flex-start;
  display: flex;
  gap: 4px;
  margin: 10px 0 4px;
  min-width: 0;
}

.so-timeline-step {
  align-items: center;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  text-align: center;
}

.so-timeline-step b {
  color: #475467;
  font-size: 11px;
  margin-top: 4px;
}

.so-timeline-step small {
  color: #98a2b3;
  font-size: 10px;
  line-height: 1.2;
  margin-top: 1px;
}

.so-timeline-dot {
  align-items: center;
  background: #eef2f6;
  border-radius: 50%;
  color: #98a2b3;
  display: inline-flex;
  flex: 0 0 24px;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.so-timeline-step.is-done .so-timeline-dot {
  background: #12b76a;
  color: #ffffff;
}

.so-timeline-step.is-done b {
  color: #027a48;
}

.so-timeline-step.is-active .so-timeline-dot {
  background: #f79009;
  color: #ffffff;
}

.so-timeline-step.is-active b {
  color: #b54708;
}

.so-timeline-step.is-danger .so-timeline-dot {
  background: #d92d20;
  color: #ffffff;
}

.so-timeline-step.is-danger b,
.so-timeline-step.is-danger small {
  color: #b42318;
  font-weight: 700;
}

.so-timeline-link {
  background: #e4e7ec;
  border-radius: 2px;
  flex: 0 1 28px;
  height: 3px;
  margin-top: 11px;
  min-width: 8px;
}

.so-timeline-link.done {
  background: #12b76a;
}

body[data-current-view="supplierOrders"] .supplier-documents-workspace.so-focus {
  grid-template-columns: minmax(0, 1fr) !important;
}

body[data-current-view="supplierOrders"] .supplier-documents-workspace.so-focus .supplier-documents-main {
  margin: 0 auto;
  max-width: 1160px;
  width: 100%;
}

body[data-current-view="supplierOrders"] .procurement-document-workspace {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
  max-width: 1160px;
  padding: 20px 24px 24px;
  width: 100%;
}

body[data-current-view="supplierOrders"] .procurement-document-workspace .so-timeline {
  margin: 16px 0 8px;
}

body[data-current-view="supplierOrders"] .procurement-document-workspace .procurement-section h3 {
  color: #667085;
  font-size: 12px;
  text-transform: uppercase;
}

@media (min-width: 1280px) {
  body[data-current-view="supplierOrders"] .supplier-documents-workspace:not(.so-focus) {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 400px) !important;
  }

  body[data-current-view="supplierOrders"] .supplier-documents-workspace:not(.so-focus) > .supplier-document-card {
    max-height: calc(100vh - 112px);
    position: sticky;
    top: 12px;
  }
}

@media (max-width: 1279px) {
  body[data-current-view="supplierOrders"] .supplier-documents-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 900px) {
  body[data-current-view="supplierOrders"] .supplier-directory-head,
  body[data-current-view="supplierOrders"] .supplier-order-toolbar {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="supplierOrders"] .supplier-directory-head {
    flex-direction: column;
  }

  body[data-current-view="supplierOrders"] .supplier-directory-head button {
    width: 100%;
  }

  body[data-current-view="supplierOrders"] .so-compact-table,
  body[data-current-view="supplierOrders"] .so-compact-table tbody,
  body[data-current-view="supplierOrders"] .so-compact-table tr,
  body[data-current-view="supplierOrders"] .so-compact-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  body[data-current-view="supplierOrders"] .so-compact-table {
    min-width: 0;
  }

  body[data-current-view="supplierOrders"] .so-compact-table thead {
    display: none;
  }

  body[data-current-view="supplierOrders"] .so-compact-table tbody {
    display: grid;
    gap: 8px;
    padding: 8px;
  }

  body[data-current-view="supplierOrders"] .so-compact-table tr {
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    display: grid;
    gap: 7px 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
  }

  body[data-current-view="supplierOrders"] .so-compact-table td,
  body[data-current-view="supplierOrders"] .so-compact-table td:last-child {
    border: 0;
    padding: 0;
    white-space: normal;
    width: auto !important;
  }

  body[data-current-view="supplierOrders"] .so-compact-table td:nth-child(1),
  body[data-current-view="supplierOrders"] .so-compact-table td:nth-child(2),
  body[data-current-view="supplierOrders"] .so-compact-table td:nth-child(3),
  body[data-current-view="supplierOrders"] .so-compact-table td:nth-child(4),
  body[data-current-view="supplierOrders"] .so-compact-table td:nth-child(5) {
    width: auto !important;
  }

  body[data-current-view="supplierOrders"] .so-compact-table td:nth-child(2),
  body[data-current-view="supplierOrders"] .so-compact-table td:last-child {
    grid-column: 1 / -1;
  }

  body[data-current-view="supplierOrders"] .so-compact-table td::before {
    color: #667085;
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: uppercase;
  }

  body[data-current-view="supplierOrders"] .procurement-document-workspace {
    box-shadow: none;
    padding: 12px;
  }
}

@media (max-width: 520px) {
  body[data-current-view="supplierOrders"] .so-chip {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: 9px;
  }

  .so-card-top {
    align-items: stretch;
    flex-direction: column;
  }

  .so-card-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .so-timeline-step b {
    font-size: 10px;
  }

  .so-timeline-step small {
    font-size: 9px;
  }

}

/* Purchases: supplier-receipt final cascade. */
body[data-current-view="purchaseReceipts"] .pr-card-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 520px) {
  body[data-current-view="purchaseReceipts"] .pr-card-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  body[data-current-view="purchaseReceipts"] .so-compact-table tr.selected-row td {
    background: transparent !important;
  }

  body[data-current-view="purchaseReceipts"] .purchase-form .detail-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="purchaseReceipts"] .purchase-form .supplier-order-summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }
}

/* Purchases: supplier balance workspace. */
body[data-current-view="purchases"] .purchase-history.has-selection {
  grid-template-columns: minmax(0, 1fr);
  margin-inline: auto;
  max-width: 1180px;
  width: 100%;
}

body[data-current-view="purchases"] .supplier-finance-card {
  border-radius: 8px;
  gap: 16px;
}

body[data-current-view="purchases"] .supplier-finance-card .detail-head {
  align-items: flex-start;
}

body[data-current-view="purchases"] .supplier-finance-card .detail-head h2 {
  margin-top: 5px;
}

.sup-finance-back {
  color: #b54708;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 0;
}

body[data-current-view="purchases"] .supplier-finance-summary-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-current-view="purchases"] .supplier-finance-summary-row.has-net {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body[data-current-view="purchases"] .supplier-finance-summary-row > div {
  border-radius: 8px;
}

body[data-current-view="purchases"] .supplier-sections > section {
  min-width: 0;
  overflow-x: auto;
}

.sup-acc {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

.sup-acc > summary {
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style-position: inside;
  padding: 13px 14px;
}

.sup-acc > summary:hover {
  background: #f8fafc;
}

.sup-acc[open] > summary {
  border-bottom: 1px solid #eaecf0;
}

.sup-acc > .supplier-ledger,
.sup-acc > table {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
}

.sup-acc > .supplier-ledger {
  padding: 12px 14px;
}

.sup-acc > table {
  display: block;
  padding: 12px 14px;
  width: 100%;
}

@media (max-width: 1100px) {
  body[data-current-view="purchases"] .supplier-finance-summary-row,
  body[data-current-view="purchases"] .supplier-finance-summary-row.has-net {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body[data-current-view="purchases"] .supplier-finance-summary-row,
  body[data-current-view="purchases"] .supplier-finance-summary-row.has-net {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-current-view="purchases"] .supplier-finance-card {
    padding: 12px;
  }

  .sup-acc > .supplier-ledger,
  .sup-acc > table {
    padding: 10px;
  }

  body[data-current-view="purchases"] .supplier-balance-invoices,
  body[data-current-view="purchases"] .supplier-balance-invoices tbody,
  body[data-current-view="purchases"] .supplier-balance-invoices tr,
  body[data-current-view="purchases"] .supplier-balance-invoices td {
    display: block;
    width: 100%;
  }

  body[data-current-view="purchases"] .supplier-balance-invoices thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }

  body[data-current-view="purchases"] .supplier-balance-invoices tbody {
    display: grid;
    gap: 10px;
  }

  body[data-current-view="purchases"] .supplier-balance-invoices tr {
    background: #ffffff;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    overflow: hidden;
  }

  body[data-current-view="purchases"] .supplier-balance-invoices td {
    align-items: baseline;
    border: 0;
    border-bottom: 1px solid #eef1f5;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(80px, 0.8fr) minmax(0, 1.2fr);
    padding: 9px 10px;
    text-align: right;
    white-space: normal;
  }

  body[data-current-view="purchases"] .supplier-balance-invoices td:last-child {
    border-bottom: 0;
  }

  body[data-current-view="purchases"] .supplier-balance-invoices td::before {
    color: #667085;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
  }
}

body[data-current-view="purchases"] .supplier-payment-actions {
  min-width: 150px;
}

body[data-current-view="purchases"] .supplier-payment-actions .link-button {
  display: block;
  margin: 0 0 6px;
  text-align: left;
}

body[data-current-view="purchases"] .supplier-payment-actions .link-button:last-child {
  margin-bottom: 0;
}

body[data-current-view="purchases"] .supplier-payment-row.is-cancelled td {
  background: #fff8f7;
  color: #667085;
}

.supplier-payment-correction-summary {
  display: grid;
  gap: 8px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.supplier-payment-correction-summary > div {
  border-bottom: 1px solid #eaecf0;
  display: grid;
  gap: 4px;
  padding: 0 0 8px;
}

.supplier-payment-correction-summary dt {
  color: #667085;
  font-size: 12px;
}

.supplier-payment-correction-summary dd {
  font-weight: 800;
  margin: 0;
}

@media (max-width: 600px) {
  .supplier-payment-correction-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  body[data-current-view="purchases"] .supplier-payments-table,
  body[data-current-view="purchases"] .supplier-payments-table tbody {
    display: block;
    overflow: visible;
    width: 100%;
  }

  body[data-current-view="purchases"] .supplier-payments-table thead {
    display: none;
  }

  body[data-current-view="purchases"] .supplier-payments-table tbody {
    display: grid;
    gap: 10px;
  }

  body[data-current-view="purchases"] .supplier-payments-table .supplier-payment-row {
    border: 1px solid #dce3ec;
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  body[data-current-view="purchases"] .supplier-payments-table .supplier-payment-row td {
    background: #fff;
    border: 0;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    text-align: left;
  }

  body[data-current-view="purchases"] .supplier-payments-table .supplier-payment-row td::before {
    color: #667085;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  body[data-current-view="purchases"] .supplier-payments-table .supplier-payment-row td:first-child,
  body[data-current-view="purchases"] .supplier-payments-table .supplier-payment-row td:nth-child(6),
  body[data-current-view="purchases"] .supplier-payments-table .supplier-payment-actions {
    grid-column: 1 / -1;
  }

  body[data-current-view="purchases"] .supplier-payments-table .supplier-payment-actions {
    border-top: 1px solid #e4e7ec;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
  }

  body[data-current-view="purchases"] .supplier-payments-table .supplier-payment-actions::before {
    flex-basis: 100%;
  }

  body[data-current-view="purchases"] .supplier-payments-table .supplier-payment-actions .link-button {
    display: inline-flex;
    margin: 0;
  }
}

.cashflow-row.is-voided {
  opacity: 0.72;
}

.cashflow-row.is-voided .cash-type-pill,
.cashflow-row .cash-cell-amount.voided {
  color: #8a3440;
}

.cashflow-voided-amount {
  display: grid;
  justify-items: end;
  gap: 2px;
  line-height: 1.15;
}

.cashflow-voided-amount b {
  font-size: 13px;
  text-decoration: line-through;
}

.cashflow-voided-amount small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

/* ── Редизайн вкладки «Банк» (Приват24) ─────────────────────────────────── */
.integration-workspace-page .bank-shell { grid-template-columns: 280px minmax(0, 1fr); }
.integration-workspace-page .bank-detail { display: flex; flex-direction: column; gap: 14px; }
.integration-workspace-page .bank-detail > form[data-integration-form="privat24"] { display: flex; flex-direction: column; gap: 14px; }

.integration-workspace-page .bank-channel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.integration-workspace-page .bank-channel-title { display: flex; align-items: center; gap: 14px; }
.integration-workspace-page .bank-channel-title h2 { margin: 0; font-size: 16px; }
.integration-workspace-page .bank-channel-title p { margin: 3px 0 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.integration-workspace-page .bank-channel-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; }
.integration-workspace-page .bank-on { color: var(--accent); }
.integration-workspace-page .bank-off { color: var(--muted); }
.integration-workspace-page .bank-sync-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.integration-workspace-page .bank-period-picker { display: flex; align-items: center; gap: 4px; background: #f4f6fa; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.integration-workspace-page .bank-period-picker button.is-active { border-color: var(--primary); color: var(--primary); font-weight: bold; background: #fff; }
.integration-workspace-page .bank-period-picker input[type="date"] { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: 12px; }
.integration-workspace-page .bank-sync-main { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.integration-workspace-page .bank-sync-main small { font-size: 10px; color: var(--muted); }

.integration-workspace-page .bank-filter-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.integration-workspace-page .bank-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 12px; cursor: pointer; }
.integration-workspace-page .bank-chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: bold; }
.integration-workspace-page .bank-chip.is-danger:not(.is-active) { color: #b42318; }
.integration-workspace-page .bank-chip.is-danger.is-active { background: #b42318; border-color: #b42318; }
.integration-workspace-page .bank-chip.is-muted:not(.is-active) { color: var(--muted); }

.integration-workspace-page .bank-fop-table { padding: 0; overflow: hidden; }
.integration-workspace-page .bank-fop-head, .integration-workspace-page .bank-fop-row { display: grid; grid-template-columns: 230px 160px 200px minmax(0, 1fr) 230px; gap: 10px; align-items: center; padding: 11px 18px; }
.integration-workspace-page .bank-fop-head { border-bottom: 1px solid var(--line); background: #f8fafc; font-size: 11px; color: var(--muted); font-weight: bold; text-transform: uppercase; letter-spacing: 0.02em; }
.integration-workspace-page .bank-fop-row-wrap { border-bottom: 1px solid #eef1f6; }
.integration-workspace-page .bank-fop-row-wrap:last-child { border-bottom: none; }
.integration-workspace-page .bank-fop-row.is-attention { background: #fef6f5; }
.integration-workspace-page .bank-fop-row.is-disabled { opacity: 0.55; }
.integration-workspace-page .bank-cell-name strong { font-size: 13px; display: block; }
.integration-workspace-page .bank-cell-name small { font-size: 11px; color: var(--muted); }
.integration-workspace-page .bank-cell-iban { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); }
.integration-workspace-page .bank-state { border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: bold; white-space: nowrap; }
.integration-workspace-page .bank-state.is-success { background: #ecfdf3; color: var(--accent); }
.integration-workspace-page .bank-state.is-warning { background: #fffaeb; color: var(--warn); }
.integration-workspace-page .bank-state.is-danger { background: #fef3f2; color: #b42318; }
.integration-workspace-page .bank-state.is-muted { background: #f2f4f7; color: var(--muted); }
.integration-workspace-page .bank-cell-sync { font-size: 12px; min-width: 0; }
.integration-workspace-page .bank-cell-sync.is-danger { color: #b42318; }
.integration-workspace-page .bank-cell-sync.is-muted { color: var(--muted); }
.integration-workspace-page .bank-cell-actions { display: flex; gap: 6px; justify-content: flex-end; }
.integration-workspace-page .bank-empty { padding: 22px 18px; font-size: 12px; color: var(--muted); text-align: center; }

.integration-workspace-page .bank-fop-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; border-top: 2px solid var(--primary); background: #fff; }
.integration-workspace-page .bank-fop-editor-main { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid #eef1f6; min-width: 0; }
.integration-workspace-page .bank-unsaved { background: #fffaeb; color: var(--warn); border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: bold; }
.integration-workspace-page .bank-fop-editor-actions { display: flex; align-items: center; gap: 10px; border-top: 1px solid #eef1f6; padding-top: 12px; }
.integration-workspace-page .bank-fop-editor-spacer { flex: 1; }
.integration-workspace-page .danger-ghost { color: #b42318; border-color: #fecdca; }
.integration-workspace-page .bank-fop-editor-aside { padding: 16px 18px; background: #f8fafc; display: flex; flex-direction: column; gap: 10px; }
.integration-workspace-page .bank-fop-editor-aside h4 { margin: 0; font-size: 12px; }
.integration-workspace-page .bank-check { font-size: 12px; }
.integration-workspace-page .bank-check.is-ok { color: var(--accent); }
.integration-workspace-page .bank-check.is-bad { color: #b42318; }
.integration-workspace-page .bank-fop-aside-buttons { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.integration-workspace-page .bank-fop-aside-buttons small { font-size: 11px; color: var(--muted); }
.integration-workspace-page .bank-fop-aside-log { font-size: 11px; border-top: 1px solid var(--line); padding-top: 10px; }
.integration-workspace-page .bank-fop-aside-log.is-bad { color: #b42318; }
.integration-workspace-page .bank-fop-aside-log.is-ok { color: var(--muted); }
.integration-workspace-page .bank-hint { font-size: 11px; color: var(--muted); }

.integration-workspace-page .bank-connect .bank-connect-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.integration-workspace-page .bank-connect .bank-connect-row b { color: var(--text); }
.integration-workspace-page .bank-connect { border-style: dashed; }
.integration-workspace-page .bank-connect.is-open { border-style: solid; }
.integration-workspace-page .bank-connect-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.integration-workspace-page .bank-connect-tile { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.integration-workspace-page .bank-connect-tile:hover { border-color: var(--primary); }
.integration-workspace-page .bank-connect-tile strong { font-size: 13px; }
.integration-workspace-page .bank-connect-tile small { font-size: 11px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.integration-workspace-page .bank-connect-tile span { font-size: 12px; color: var(--primary); font-weight: bold; }
.integration-workspace-page .bank-connect-tile.is-blank { border-style: dashed; }

.integration-workspace-page .bank-rules { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.integration-workspace-page .bank-rules h3 { margin: 0; font-size: 13px; }
.integration-workspace-page .bank-rules p { margin: 3px 0 0; font-size: 12px; color: var(--muted); max-width: 720px; }

.integration-workspace-page .bank-journal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.integration-workspace-page .bank-journal-head h3 { margin: 0; font-size: 13px; }
.integration-workspace-page .bank-log-row { display: grid; grid-template-columns: 130px 150px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px dashed #eef1f6; font-size: 12px; align-items: baseline; }
.integration-workspace-page .bank-log-row:last-child { border-bottom: none; }
.integration-workspace-page .bank-log-date { color: var(--muted); }
.integration-workspace-page .bank-log-period { color: var(--muted); }
.integration-workspace-page .bank-log-ok { color: var(--text); }
.integration-workspace-page .bank-log-ok + .bank-log-ok::before { content: ""; }
.integration-workspace-page .bank-log-bad { color: #b42318; }
.integration-workspace-page .bank-test-import { padding: 4px 0; }
.integration-workspace-page .bank-test-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.integration-workspace-page .bank-test-form input:not([type="checkbox"]) { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 12px; }
.integration-workspace-page .bank-test-form label { font-size: 12px; display: flex; align-items: center; gap: 5px; }

@media (max-width: 1500px) {
  .integration-workspace-page .bank-fop-head, .integration-workspace-page .bank-fop-row { grid-template-columns: 200px 130px 170px minmax(0, 1fr) 210px; }
}
@media (max-width: 1350px) {
  .integration-workspace-page .bank-shell { grid-template-columns: minmax(0, 1fr); }
  .integration-workspace-page .bank-fop-editor { grid-template-columns: minmax(0, 1fr); }
  .integration-workspace-page .bank-fop-editor-main { border-right: none; }
}
.integration-workspace-page .bank-channel-toggle input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.integration-workspace-page .bank-rules .bank-channel-toggle input[type="checkbox"] { width: 18px; height: 18px; }

/* аудит інтеграцій: маршрут — інфо плоскі, дія — кнопка; журнал-чіпи */
.integration-work-route .route-info { background: transparent; border: none; box-shadow: none; }
.integration-work-route .route-action {
  cursor: pointer; border: 1px solid var(--primary); background: #fff;
  border-radius: 10px; display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px; padding: 10px 14px; text-align: left;
}
.integration-work-route .route-action:hover { background: #eef4ff; }
.integration-work-route .route-action strong { color: var(--primary); }
.integration-journal-chips { margin: 10px 0 12px; flex-wrap: wrap; }
.integration-journal-chips .chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.integration-kpi-card > div { min-width: 0; }
.integration-kpi-card > div span, .integration-kpi-card > div strong { overflow-wrap: break-word; display: block; }

/* адаптація Codex: кнопка збереження + карткова таблиця на вузьких екранах */
.integration-workspace-page .bank-save-button { min-height: 40px; align-self: center; }
.integration-workspace-page .bank-save-button.is-dirty {
  background: #fffaeb; border-color: var(--warn); color: var(--warn); font-weight: bold;
}
@media (max-width: 1100px) {
  .integration-workspace-page .bank-fop-head { display: none; }
  .integration-workspace-page .bank-fop-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name state" "iban iban" "sync sync" "actions actions";
    row-gap: 6px;
  }
  .integration-workspace-page .bank-cell-name { grid-area: name; }
  .integration-workspace-page .bank-fop-row > div:nth-child(3) { grid-area: state; justify-self: end; }
  .integration-workspace-page .bank-cell-iban { grid-area: iban; }
  .integration-workspace-page .bank-cell-sync { grid-area: sync; }
  .integration-workspace-page .bank-cell-actions { grid-area: actions; justify-content: flex-start; flex-wrap: wrap; }
  .integration-workspace-page .bank-channel-head { flex-direction: column; align-items: stretch; }
  .integration-workspace-page .bank-sync-controls { justify-content: space-between; }
  .integration-workspace-page .bank-connect-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .integration-workspace-page .bank-fop-editor { grid-template-columns: minmax(0, 1fr); }
  .integration-workspace-page .bank-fop-editor-main { border-right: none; }
}
@media (max-width: 640px) {
  .integration-workspace-page .bank-log-row { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .integration-workspace-page .bank-connect-list { grid-template-columns: minmax(0, 1fr); }
  .integration-workspace-page .bank-period-picker { width: 100%; }
  .integration-workspace-page .bank-rules { flex-direction: column; align-items: flex-start; }
}

/* ── «Головна» v2 ────────────────────────────────────────────────────────── */
.dash2 { display: flex; flex-direction: column; gap: 14px; }
.dash2 button { cursor: pointer; font-family: inherit; }
.dash2-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dash2-head h2 { margin: 0; font-size: 20px; }
.dash2-head small { color: var(--muted); font-size: 12px; }
.dash2-head #dash2-refresh.is-stale { color: var(--warn); font-weight: bold; }
.dash2-quick { display: flex; gap: 6px; }
.dash2-periods { margin-left: auto; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.dash2-periods > button { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 12px; }
.dash2-periods > button.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: bold; }
.dash2-custom { display: flex; gap: 4px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }
.dash2-custom.is-active { border-color: var(--primary); }
.dash2-custom input { border: none; font-size: 12px; width: 118px; }
.dash2-custom button { background: var(--primary); border: none; border-radius: 6px; padding: 5px 10px; font-size: 12px; color: #fff; }
.dash2-money { background: #0f172a; border-radius: 10px; padding: 10px 16px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.dash2-money > button { background: transparent; border: none; color: #94a3b8; font-size: 13px; padding: 4px 0; }
.dash2-money > button b { color: #fff; font-size: 15px; margin-left: 4px; }
.dash2-money > button b.is-green { color: #4ade80; }
.dash2-money > button b.is-red { color: #f87171; }
.dash2-money > button:hover { color: #cbd5e1; }
.dash2-runway { font-size: 12px; color: #94a3b8; border: 1px solid #334155; border-radius: 999px; padding: 4px 10px; }
.dash2-runway.is-warn { color: #fbbf24; border-color: #92650a; }
.dash2-runway.is-red { color: #f87171; border-color: #9a2f2f; font-weight: bold; }
.dash2-money-link { margin-left: auto; }
.dash2-pulse { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.dash2-pulse-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash2-live { color: #22c55e; animation: dash2pulse 2s infinite; }
@keyframes dash2pulse { 50% { opacity: 0.3; } }
.dash2-median { color: var(--muted); }
.dash2-pulse-hours { display: flex; align-items: flex-end; gap: 2px; height: 30px; width: 130px; }
.dash2-pulse-hours i { flex: 1; background: #c7d6f5; border-radius: 2px 2px 0 0; }
.dash2-pulse-hours i.is-now { background: var(--primary); }
.dash2-pulse-split { margin-left: auto; display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.dash2-pulse-split b { color: var(--text); }
.dash2-plan { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dash2-plan-title small { display: block; font-size: 11px; color: var(--muted); font-weight: bold; }
.dash2-plan-title b { font-size: 19px; }
.dash2-plan-progress { flex: 1; min-width: 260px; }
.dash2-plan-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; gap: 10px; flex-wrap: wrap; }
.dash2-bar { height: 7px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.dash2-bar > div { height: 100%; background: var(--primary); border-radius: 999px; min-width: 3px; }
.dash2-bar.is-warn > div { background: #f59e0b; }
.dash2-bar.is-red > div { background: #ef4444; }
.dash2-warn { color: var(--warn); }
.dash2-ok { color: var(--accent); }
.dash2-danger { color: #b42318; }
.dash2-plan-edit { display: flex; gap: 6px; align-items: center; }
.dash2-plan-edit input { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 12px; width: 130px; }
.dash2-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.dash2-kpi { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; text-align: left; position: relative; min-height: 102px; }
.dash2-kpi::after { content: "→"; position: absolute; top: 8px; right: 10px; color: #c3c9d6; font-size: 12px; }
.dash2-kpi:hover { border-color: var(--primary); }
.dash2-kpi small { display: block; font-size: 12px; color: var(--muted); }
.dash2-kpi > b { display: block; font-size: 17px; margin: 4px 0; }
.dash2-badge { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: bold; }
.dash2-badge.is-up { background: #ecfdf3; color: var(--accent); }
.dash2-badge.is-down { background: #fef3f2; color: #b42318; }
.dash2-badge.is-muted { background: #f2f4f7; color: var(--muted); font-weight: normal; }
.dash2-costwarn { display: block; font-size: 10px; color: var(--warn); }
.dash2-costnote { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.dash2-row { display: grid; gap: 12px; }
.dash2-row-charts { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); }
.dash2-row-mid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.1fr); }
.dash2-row-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); }
.dash2-row-mid.is-two, .dash2-row-bottom.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash2-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-width: 0; }
.dash2-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.dash2-card-head h3 { margin: 0; font-size: 13px; }
.dash2-card-head small { color: var(--muted); font-size: 12px; }
.dash2-line { width: 100%; height: auto; }
.dash2-line line { stroke: #eef1f6; }
.dash2-line-prev { fill: none; stroke: #b9bed0; stroke-width: 1.5; stroke-dasharray: 5 4; }
.dash2-line-fill { fill: #e5edff; }
.dash2-line-main { fill: none; stroke: var(--primary); stroke-width: 2; }
.dash2-empty-text { fill: var(--muted); font-size: 13px; }
.dash2-shadowlegend { color: #98a2b3; }
.dash2-donut-wrap { display: flex; gap: 14px; align-items: center; }
.dash2-donut { width: 112px; height: 112px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash2-donut i { width: 68px; height: 68px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: bold; font-style: normal; text-align: center; padding: 4px; }
.dash2-donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dash2-donut-legend > button, .dash2-legend-other { display: flex; align-items: center; gap: 6px; background: transparent; border: none; font-size: 11px; padding: 2px 0; text-align: left; }
.dash2-donut-legend em { flex: 1; min-width: 0; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash2-donut-legend b { white-space: nowrap; }
.dash2-donut-legend > button:hover em { color: var(--primary); }
.dash2-toprow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; background: transparent; border: none; text-align: left; font-size: 12px; padding: 5px 0; border-bottom: 1px dashed #eef1f6; }
.dash2-toprow:last-child { border-bottom: none; }
.dash2-toprow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash2-toprow .dash2-bar { grid-column: 1 / -1; }
.dash2-toprow small { color: var(--muted); }
.dash2-toprow:hover > span { color: var(--primary); }
.dash2-flow-legend { display: flex; gap: 12px; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.dash2-flow-legend .is-in { color: #22c55e; }
.dash2-flow-legend .is-out { color: #ef4444; }
.dash2-flow { display: flex; align-items: flex-end; gap: 3px; height: 120px; width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--line); padding: 0; }
.dash2-flow > span { flex: 1; display: flex; align-items: flex-end; gap: 1px; height: 100%; }
.dash2-flow i { flex: 1; border-radius: 2px 2px 0 0; min-height: 2px; }
.dash2-flow i.is-in { background: #22c55e; }
.dash2-flow i.is-out { background: #ef4444; }
.dash2-attn { display: flex; flex-direction: column; gap: 7px; }
.dash2-attn-row { display: flex; align-items: center; gap: 10px; background: #f8fafc; border: none; border-radius: 8px; padding: 8px 12px; font-size: 12px; text-align: left; width: 100%; }
.dash2-attn-row b { font-size: 15px; min-width: 26px; }
.dash2-attn-row span { flex: 1; min-width: 0; }
.dash2-attn-row i { color: var(--primary); font-style: normal; font-weight: bold; }
.dash2-attn-row.is-danger b { color: #b42318; }
.dash2-attn-row.is-warn b { color: var(--warn); }
.dash2-attn-row.is-danger { background: #fef6f5; }
.dash2-attn-row:hover { outline: 1px solid var(--primary); }
.dash2-events { display: flex; flex-direction: column; gap: 6px; }
.dash2-event { display: flex; gap: 10px; font-size: 12px; }
.dash2-event > span { color: var(--muted); width: 118px; flex-shrink: 0; }
.dash2-event em { font-style: normal; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1500px) { .dash2-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1350px) {
  .dash2-row-charts, .dash2-row-mid, .dash2-row-bottom,
  .dash2-row-mid.is-two, .dash2-row-bottom.is-two { grid-template-columns: minmax(0, 1fr); }
}
.dash2-kpi-note { font-style: normal; font-size: 10px; color: #b9bed0; }

@media (max-width: 1100px) {
  .dash2-head { align-items: flex-start; }
  .dash2-periods { width: 100%; margin-left: 0; }
  .dash2-money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
  .dash2-money > button { text-align: left; min-width: 0; }
  .dash2-money-link { margin-left: 0; }
  .dash2-runway { justify-self: start; }
  .dash2-pulse-split { width: 100%; margin-left: 0; justify-content: flex-start; }
}

@media (max-width: 768px) {
  .dash2 { gap: 12px; }
  .dash2-head { flex-direction: column; }
  .dash2-quick { width: 100%; flex-wrap: wrap; }
  .dash2-periods > button { flex: 1 1 auto; }
  .dash2-custom { max-width: 100%; }
  .dash2-plan { align-items: stretch; flex-direction: column; gap: 12px; }
  .dash2-plan-progress { min-width: 0; width: 100%; }
  .dash2-plan-edit { width: 100%; }
  .dash2-plan-edit input { flex: 1; min-width: 0; width: auto; }
  .dash2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash2-pulse-hours { width: min(240px, 100%); }
  .dash2-card-head { align-items: flex-start; }
}

@media (max-width: 900px) {
  body[data-current-view="dashboard"] .topbar { margin-bottom: 0; }
  body[data-current-view="dashboard"] .topbar-title { gap: 0; }
  body[data-current-view="dashboard"] .topbar #page-title,
  body[data-current-view="dashboard"] .topbar #page-subtitle { display: none; }
}

@media (max-width: 520px) {
  .dash2-head h2 { font-size: 20px; }
  .dash2-quick > button { flex: 1 1 auto; }
  .dash2-periods { align-items: stretch; }
  .dash2-custom { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; }
  .dash2-custom input { width: 100%; min-width: 0; }
  .dash2-money { grid-template-columns: minmax(0, 1fr); }
  .dash2-money > button, .dash2-runway { width: 100%; }
  .dash2-pulse { align-items: flex-start; gap: 10px; }
  .dash2-pulse-main, .dash2-pulse-split { flex-direction: column; align-items: flex-start; gap: 4px; }
  .dash2-kpis { grid-template-columns: minmax(0, 1fr); }
  .dash2-kpi { min-height: 0; }
  .dash2-card { padding: 12px; }
  .dash2-donut-wrap { align-items: flex-start; flex-direction: column; }
  .dash2-donut-legend { width: 100%; }
  .dash2-event { gap: 8px; }
  .dash2-event > span { width: 92px; }
  .dash2-attn-row { align-items: flex-start; }
}

/* Products V2: compact catalog, selection and guarded bulk actions. */
.catalog-page .catalog-list {
  max-height: calc(100vh - 236px);
  min-height: 320px;
  overflow: auto;
}

.catalog-page .catalog-list-head,
.catalog-page .catalog-list-row {
  gap: 8px;
  grid-template-columns: 24px minmax(145px, 2.4fr) minmax(54px, .7fr) minmax(62px, .75fr) minmax(62px, .75fr) minmax(36px, .45fr) minmax(36px, .45fr) minmax(52px, .7fr) 34px;
  min-width: 0;
}

.catalog-page .catalog-list-row.catalog-row-compact { padding: 5px 10px; }

.catalog-page .catalog-row-compact .catalog-list-thumb {
  border-radius: 6px;
  font-size: 10px;
  height: 30px;
  width: 30px;
}

.catalog-page .catalog-row-compact .catalog-list-product {
  grid-template-columns: 30px minmax(0, 1fr);
}

.catalog-page .catalog-list-main-compact {
  align-items: baseline;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.catalog-page .catalog-list-main-compact strong {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-page .catalog-row-tail {
  color: var(--muted);
  flex-shrink: 0;
  font-size: 11px;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-page .catalog-check-cell {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.catalog-page .catalog-check-cell input {
  cursor: pointer;
  height: 15px;
  margin: 0;
  width: 15px;
}

.catalog-page .catalog-list-sku {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-page .catalog-list-sku small {
  color: #667085;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-page .catalog-list-price-cell {
  display: grid;
  gap: 1px;
  text-align: right;
  white-space: nowrap;
}

.catalog-page .catalog-list-numeric-head,
.catalog-page .catalog-list-price-cell,
.catalog-page .catalog-list-number {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.catalog-page .catalog-list-actions-head { text-align: center; }

.catalog-page .catalog-list-price-cell small,
.pricing-matrix-table .matrix-price-note {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.catalog-page .catalog-list-price-cell.danger-cell {
  background: #fef2f2;
  border-radius: 6px;
  color: #b42318;
  padding: 2px 6px;
}

.catalog-page .catalog-list-number.muted-number { color: var(--muted); }

.catalog-page .catalog-flag {
  border-radius: 999px;
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
  padding: 1px 6px;
  vertical-align: 1px;
}

.catalog-page .catalog-flag.warning { background: #fef3c7; color: #92400e; }
.catalog-page .catalog-flag.danger { background: #fee2e2; color: #991b1b; }

.catalog-page .catalog-bulk-bar {
  align-items: center;
  background: #0f172a;
  border-radius: 8px;
  color: #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px;
  padding: 8px 12px;
}

.catalog-page .catalog-bulk-bar strong { color: #fff; }
.catalog-page .catalog-bulk-spacer { flex: 1; }
.catalog-page .catalog-bulk-progress { color: #cbd5e1; }

.catalog-page .catalog-bulk-bar button {
  background: #1e2b47;
  border: 1px solid #33415c;
  border-radius: 6px;
  color: #e2e8f0;
  cursor: pointer;
  font-size: 12px;
  min-height: 30px;
  padding: 4px 10px;
}

.catalog-page .catalog-bulk-bar button:hover { background: #27375c; }
.catalog-page .catalog-bulk-bar button:disabled { cursor: wait; opacity: .55; }

.catalog-page .catalog-bulk-bar .catalog-bulk-select-all {
  background: transparent;
  border: 0;
  color: #8fb4ff;
  min-height: auto;
  padding: 0;
  text-decoration: underline;
}

.catalog-page .catalog-bulk-bar .catalog-bulk-clear {
  background: transparent;
  border: 0;
  font-size: 16px;
  line-height: 1;
  min-height: auto;
  padding: 2px 6px;
}

.catalog-page .catalog-problems-chip { position: relative; }
.catalog-page .catalog-problems-chip > summary { cursor: pointer; list-style: none; width: 100%; }
.catalog-page .catalog-problems-chip > summary::-webkit-details-marker { display: none; }

.catalog-page .catalog-problems-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
  display: grid;
  gap: 3px;
  min-width: 250px;
  padding: 5px;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 60;
}

.catalog-page .catalog-problems-panel button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 9px;
  text-align: left;
}

.catalog-page .catalog-problems-panel button:hover,
.catalog-page .catalog-problems-panel button.active { background: #fff8ec; }
.catalog-page .catalog-show-more { font-weight: 700; }
.catalog-page .catalog-card { position: relative; }

.catalog-page .catalog-card-check {
  left: 8px;
  position: absolute;
  top: 8px;
  z-index: 3;
}

.catalog-page .catalog-card-check input { cursor: pointer; height: 16px; width: 16px; }

/* Products V2: grouped pricing navigation and protected price matrix. */
.pricing-workspace .pricing-tab-groups button { font-weight: 700; }
.pricing-workspace .pricing-subtabs { margin-top: -4px; }

.pricing-workspace .pricing-subtabs button {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 12px;
}

.pricing-matrix-panel .pricing-matrix-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.pricing-matrix-panel .pricing-matrix-search { flex: 1; min-width: 220px; }

.pricing-matrix-panel .pricing-matrix-toolbar > label {
  display: grid;
  font-size: 12px;
  gap: 4px;
}

.pricing-matrix-panel .pricing-matrix-anomaly-toggle {
  align-items: center;
  background: #fffaf0;
  border: 1px solid #f0c987;
  border-radius: 8px;
  color: #b54708;
  cursor: pointer;
  display: inline-flex !important;
  flex-direction: row;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
}

.pricing-matrix-panel .pricing-matrix-anomaly-toggle input { margin: 0; }
.pricing-matrix-panel .pricing-matrix-reprice { min-height: 38px; }

.pricing-matrix-panel .pricing-matrix-head-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.pricing-matrix-shell {
  max-height: calc(100vh - 330px);
  min-height: 280px;
  overflow: auto;
}

.pricing-matrix-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.pricing-matrix-table .matrix-sku { width: 12%; }
.pricing-matrix-table .matrix-name { width: 27%; }
.pricing-matrix-table .matrix-cost { width: 10%; }
.pricing-matrix-table .matrix-input-cell { width: 11%; }
.pricing-matrix-table .matrix-promo { width: 10%; }
.pricing-matrix-table .matrix-margin { width: 8%; }
.pricing-matrix-table .matrix-anomaly { width: 11%; }

.pricing-matrix-table thead th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 2;
}

.pricing-matrix-table .matrix-name-link {
  color: var(--text);
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.pricing-matrix-table .matrix-name-link:hover { color: #1d4ed8; text-decoration: underline; }
.pricing-matrix-table .matrix-sku { color: var(--muted); white-space: nowrap; }

.pricing-matrix-table .matrix-cost,
.pricing-matrix-table .matrix-promo,
.pricing-matrix-table .matrix-margin { text-align: right; white-space: nowrap; }

.pricing-matrix-table .matrix-input-cell { text-align: right; }

.pricing-matrix-table .matrix-input-cell input {
  border: 1px solid var(--line);
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 12px;
  max-width: 100%;
  min-width: 0;
  padding: 4px 6px;
  text-align: right;
  width: 100%;
}

.pricing-matrix-table .matrix-input-cell input.matrix-input-edited,
.pricing-matrix-table .matrix-row-changed .matrix-input-cell input {
  border-color: #1d4ed8;
  font-weight: 700;
}

.pricing-matrix-table .matrix-row-changed td { background: #f0f6ff; }

.pricing-matrix-table .matrix-anomaly-badge {
  background: #fef3c7;
  border-radius: 999px;
  color: #92400e;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  white-space: normal;
}

.pricing-matrix-table .matrix-row-anomaly td:first-child { box-shadow: inset 3px 0 0 #f0c987; }

.pricing-matrix-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 10px;
  margin-top: 10px;
}

/* Products V2: current prices inside the product card. */
.product-card-gaps {
  align-items: center;
  background: #fffaf0;
  border: 1px solid #f0c987;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 10px 14px;
}

.product-card-gaps > div { display: grid; gap: 2px; }
.product-card-gaps strong { color: #b54708; font-size: 13px; }
.product-card-gaps span { color: #92400e; font-size: 12px; }
.product-card-price-shell { overflow-x: auto; }

.product-card-price-table .card-price-amount {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.product-card-price-table .card-price-margin { text-align: right; white-space: nowrap; }
.product-card-price-table .card-price-action { text-align: right; }

.product-card-prices-section .product-card-inline-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .catalog-page .catalog-summary-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .catalog-page .catalog-list {
    border: 0;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .catalog-page .catalog-list-head,
  .catalog-page .catalog-list-row {
    grid-template-columns: 28px repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .catalog-page .catalog-list-head { display: none; }

  .catalog-page .catalog-list-row.catalog-row-compact {
    border: 1px solid var(--line);
    border-radius: 8px;
    gap: 6px;
    margin-bottom: 8px;
    padding: 10px 12px;
  }

  .catalog-page .catalog-list-main-compact { flex-wrap: wrap; }
  .catalog-page .catalog-list-main-compact strong { white-space: normal; }
  .catalog-page .catalog-check-cell { justify-content: flex-start; }

  .catalog-page .catalog-row-compact > .catalog-check-cell { grid-column: 1; }
  .catalog-page .catalog-row-compact > .catalog-list-product { grid-column: 2 / -1; }
  .catalog-page .catalog-row-compact > .catalog-list-sku { grid-column: 1 / 3; }
  .catalog-page .catalog-row-compact > .catalog-list-price-cell:nth-of-type(3) { grid-column: 3; }
  .catalog-page .catalog-row-compact > .catalog-list-price-cell:nth-of-type(4) { grid-column: 4; }
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(5) { grid-column: 1; }
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(6) { grid-column: 2; }
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(7) { grid-column: 3; }
  .catalog-page .catalog-row-compact > .catalog-list-actions {
    align-items: end;
    grid-column: 4;
    justify-content: end;
  }

  .catalog-page .catalog-list-sku,
  .catalog-page .catalog-list-number,
  .catalog-page .catalog-list-price-cell { text-align: left; }

  .catalog-page .catalog-list-actions { justify-content: flex-start; }

  .catalog-page .catalog-row-compact > .catalog-list-sku::before,
  .catalog-page .catalog-row-compact > .catalog-list-number::before,
  .catalog-page .catalog-row-compact > .catalog-list-price-cell::before {
    color: var(--muted);
    font-size: 11px;
  }

  .catalog-page .catalog-row-compact > .catalog-list-sku::before { content: "SKU · "; }
  .catalog-page .catalog-row-compact > .catalog-list-price-cell:nth-of-type(3)::before { content: "Роздріб · "; }
  .catalog-page .catalog-row-compact > .catalog-list-price-cell:nth-of-type(4)::before { content: "Опт · "; }
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(5)::before { content: "Факт · "; }
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(6)::before { content: "Резерв · "; }
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(7)::before { content: "Доступно · "; }
}

@media (max-width: 780px) {
  .catalog-page .catalog-summary-bar:has(.catalog-problems-chip[open]) {
    flex-wrap: wrap;
    max-height: none;
    overflow: visible;
  }

  .catalog-page .catalog-problems-chip { flex: 0 0 148px; }

  .pricing-matrix-panel .detail-head,
  .pricing-matrix-panel .pricing-matrix-toolbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-matrix-panel .pricing-matrix-search { min-width: 0; }
  .pricing-matrix-panel .pricing-matrix-head-actions > *,
  .pricing-matrix-panel .pricing-matrix-reprice { width: 100%; }

  .pricing-matrix-shell {
    border: 0;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .pricing-matrix-table,
  .pricing-matrix-table tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .pricing-matrix-table thead { display: none; }

  .pricing-matrix-table tbody {
    display: grid;
    gap: 10px;
  }

  .pricing-matrix-table tbody tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 0 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    padding: 8px 10px;
  }

  .pricing-matrix-table tbody td[data-label] {
    border: 0;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 7px 4px;
    text-align: left;
    white-space: normal;
    width: auto;
  }

  .pricing-matrix-table tbody td[data-label]::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .pricing-matrix-table .matrix-sku,
  .pricing-matrix-table .matrix-name,
  .pricing-matrix-table .matrix-anomaly {
    grid-column: 1 / -1;
  }

  .pricing-matrix-table .matrix-name-link {
    max-width: none;
    overflow: visible;
    white-space: normal;
  }

  .pricing-matrix-table .matrix-input-cell input { text-align: left; }
  .pricing-matrix-table .matrix-row-anomaly td:first-child { box-shadow: none; }
  .pricing-matrix-table .matrix-row-anomaly { box-shadow: inset 3px 0 0 #f0c987; }
}

@media (max-width: 520px) {
  .catalog-page .catalog-list {
    border: 0;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .catalog-page .catalog-list-head,
  .catalog-page .catalog-list-row {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .catalog-page .catalog-row-compact > .catalog-check-cell,
  .catalog-page .catalog-row-compact > .catalog-list-product,
  .catalog-page .catalog-row-compact > .catalog-list-sku,
  .catalog-page .catalog-row-compact > .catalog-list-price-cell,
  .catalog-page .catalog-row-compact > .catalog-list-number,
  .catalog-page .catalog-row-compact > .catalog-list-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .catalog-page .catalog-row-compact > .catalog-list-price-cell:nth-of-type(3),
  .catalog-page .catalog-row-compact > .catalog-list-price-cell:nth-of-type(4),
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(5),
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(6),
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(7) {
    grid-column: 1;
  }

  .catalog-page .catalog-list-head { display: none; }

  .catalog-page .catalog-list-row.catalog-row-compact {
    border: 1px solid var(--line);
    border-radius: 8px;
    gap: 6px;
    margin-bottom: 8px;
    padding: 10px 12px;
  }

  .catalog-page .catalog-list-main-compact { flex-wrap: wrap; }
  .catalog-page .catalog-list-main-compact strong { white-space: normal; }
  .catalog-page .catalog-check-cell { justify-content: flex-start; }

  .catalog-page .catalog-list-sku,
  .catalog-page .catalog-list-number,
  .catalog-page .catalog-list-price-cell { text-align: left; }

  .catalog-page .catalog-list-actions { justify-content: flex-start; }
  .catalog-page .catalog-bulk-bar { font-size: 11px; gap: 6px; padding: 8px 10px; }

  .catalog-page .catalog-row-compact > .catalog-list-sku::before,
  .catalog-page .catalog-row-compact > .catalog-list-number::before,
  .catalog-page .catalog-row-compact > .catalog-list-price-cell::before {
    color: var(--muted);
    font-size: 11px;
  }

  .catalog-page .catalog-row-compact > .catalog-list-sku::before { content: "SKU · "; }
  .catalog-page .catalog-row-compact > .catalog-list-price-cell:nth-of-type(3)::before { content: "Роздріб · "; }
  .catalog-page .catalog-row-compact > .catalog-list-price-cell:nth-of-type(4)::before { content: "Опт · "; }
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(5)::before { content: "Факт · "; }
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(6)::before { content: "Резерв · "; }
  .catalog-page .catalog-row-compact > .catalog-list-number:nth-of-type(7)::before { content: "Доступно · "; }

  .product-card-price-shell {
    border: 0;
    overflow: visible;
  }

  .product-card-price-table,
  .product-card-price-table tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .product-card-price-table thead { display: none; }

  .product-card-price-table tbody {
    display: grid;
    gap: 8px;
  }

  .product-card-price-table tbody tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px;
  }

  .product-card-price-table tbody td[data-label] {
    border: 0;
    min-width: 0;
    padding: 0;
    text-align: left;
    white-space: normal;
  }

  .product-card-price-table .card-price-name { grid-column: 1 / -1; }
  .product-card-price-table .card-price-amount,
  .product-card-price-table .card-price-margin,
  .product-card-price-table .card-price-action { text-align: left; }
}

/* Desktop navigation rail: compact at rest, full navigation on hover or keyboard focus. */
@media (min-width: 901px) {
  body.sidebar-collapsed .sidebar {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    transition: width 160ms ease, padding 160ms ease, box-shadow 160ms ease;
    width: 56px;
    z-index: 850;
  }

  body.sidebar-collapsed .sidebar::-webkit-scrollbar {
    width: 0;
  }

  body.sidebar-collapsed .sidebar .main-nav {
    align-content: start;
    display: grid;
    gap: 6px;
    justify-items: center;
    padding-bottom: 8px;
  }

  body.sidebar-collapsed .sidebar .nav-group {
    border-top: 0;
    padding-top: 0;
    width: 100%;
  }

  body.sidebar-collapsed .sidebar .nav-home,
  body.sidebar-collapsed .sidebar .nav-group-toggle,
  body.sidebar-collapsed .sidebar .nav-subitems button {
    align-items: center;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    min-height: 40px;
    padding: 0;
    width: 40px;
  }

  body.sidebar-collapsed .sidebar .nav-subitems {
    gap: 4px;
    justify-items: center;
    margin-top: 3px;
  }

  body.sidebar-collapsed .sidebar .nav-label,
  body.sidebar-collapsed .sidebar .nav-group-toggle::after {
    display: none;
  }

  body.sidebar-collapsed .sidebar .nav-icon {
    flex-basis: auto;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) {
    box-shadow: 22px 0 48px rgba(15, 23, 42, 0.24);
    overflow-y: auto;
    padding: 18px 12px 14px;
    scrollbar-width: thin;
    width: 240px;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded)::-webkit-scrollbar {
    width: 6px;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .sidebar-head {
    align-items: center;
    flex-direction: row;
    margin-bottom: 18px;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .brand-logo {
    height: 30px;
    width: 30px;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .brand span {
    display: inline;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .main-nav {
    gap: 10px;
    justify-items: stretch;
    padding: 2px 0 8px;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .nav-group {
    border-top: 1px solid rgba(148, 163, 184, 0.13);
    padding-top: 10px;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .nav-group:first-of-type {
    border-top: 0;
    padding-top: 0;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .nav-home,
  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .nav-group-toggle,
  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .nav-subitems button {
    height: auto;
    justify-content: flex-start;
    min-height: 34px;
    padding: 8px 10px;
    width: 100%;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .nav-subitems {
    gap: 5px;
    justify-items: stretch;
    margin-top: 5px;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .nav-label,
  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .nav-group-toggle::after {
    display: inline;
  }

  body.sidebar-collapsed .sidebar:is(:hover, .is-keyboard-expanded) .sidebar-user-dock {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sidebar-collapsed .sidebar {
    transition: none;
  }
}

/* Analytics V1: shared workspaces and stable desktop composition. */
.analytics-report-head-compact {
  grid-template-columns: minmax(0, 1fr);
}

.analytics-filter-panel {
  grid-template-columns: minmax(230px, 1.4fr) repeat(4, minmax(125px, 1fr)) minmax(250px, auto);
}

.analytics-filter-panel-compact {
  grid-template-columns: minmax(250px, 1fr) minmax(180px, 0.7fr) minmax(310px, auto);
}

.finance-analytics-page .analytics-filter-panel-compact {
  grid-template-columns: minmax(250px, 1fr) minmax(420px, auto);
}

.analytics-filter-panel-v2 {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr);
}

.analytics-filter-primary {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(250px, 1.25fr) minmax(180px, 0.7fr) minmax(360px, auto);
}

.analytics-filter-advanced {
  border-top: 1px solid #eef1f5;
  padding-top: 8px;
}

.analytics-filter-advanced summary {
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  width: max-content;
}

.analytics-filter-advanced > div {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 10px;
}

.analytics-filter-summary,
.analytics-filter-notice {
  grid-column: 1 / -1;
}

.analytics-filter-summary {
  align-items: center;
  border-top: 1px solid #eef1f5;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding-top: 10px;
}

.analytics-filter-chips,
.analytics-filter-reset-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.analytics-filter-reset-actions {
  justify-content: flex-end;
  position: relative;
}

.analytics-filter-chip {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #d8defd;
  border-radius: 999px;
  color: #3442a5;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
}

button.analytics-filter-chip {
  cursor: pointer;
}

.analytics-filter-chip.period {
  background: #f7f8fa;
  border-color: #e4e7ec;
  color: #475467;
}

.analytics-filter-notice {
  background: #fff7e6;
  border: 1px solid #f4d28b;
  border-radius: 6px;
  color: #7a4b00;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}

.analytics-period-buttons .active {
  background: #eef2ff;
  border-color: #aeb8f4;
  color: #3442a5;
}

.analytics-customizer summary {
  align-items: baseline;
  display: flex;
  gap: 7px;
}

.analytics-customizer summary small {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.analytics-customizer-inline {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.analytics-customizer-inline > summary {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent-dark);
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  line-height: 1.2;
  list-style: none;
  min-height: 32px;
  padding: 7px 11px;
  white-space: nowrap;
}

.analytics-customizer-inline > summary::-webkit-details-marker {
  display: none;
}

.analytics-customizer-inline > summary:hover,
.analytics-customizer-inline[open] > summary {
  background: var(--accent-dark);
}

.analytics-customizer-inline > summary:focus-visible {
  outline: 3px solid rgba(25, 135, 84, 0.24);
  outline-offset: 2px;
}

.analytics-customizer-inline > .analytics-customizer-grid {
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.18);
  max-height: min(620px, 72vh);
  overflow: auto;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(900px, calc(100vw - 96px));
  z-index: 40;
}

.analytics-selected-metrics {
  scroll-margin-top: 16px;
}

.analytics-sales-tabs {
  background: #f2f4f7;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 4px;
}

.analytics-sales-tabs button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #475467;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  white-space: nowrap;
}

.analytics-sales-tabs button:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #182230;
}

.analytics-sales-tabs button.active {
  background: #ffffff;
  border-color: #d0d5dd;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
  color: var(--accent-dark);
}

.analytics-sales-tabs button:focus-visible {
  outline: 3px solid rgba(25, 135, 84, 0.2);
  outline-offset: 1px;
}

.analytics-sales-tabs button span {
  align-items: center;
  background: #e4e7ec;
  border-radius: 999px;
  color: #475467;
  display: inline-flex;
  font-size: 11px;
  justify-content: center;
  min-height: 20px;
  min-width: 20px;
  padding: 2px 6px;
}

.analytics-sales-tab-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.analytics-tab-empty {
  align-items: center;
  background: #ffffff;
  border: 1px dashed #cfd5df;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  min-height: 92px;
  padding: 16px;
}

.analytics-tab-empty span {
  color: #667085;
  flex: 1 1 auto;
  font-size: 13px;
}

.analytics-metrics-empty,
.analytics-load-error {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px;
}

.analytics-metrics-empty span,
.analytics-load-error span {
  color: #667085;
  flex: 1 1 auto;
  font-size: 13px;
}

.analytics-load-error {
  background: #fff8f7;
  border-color: #f5c7c2;
}

.analytics-order-search {
  background: #f8fafc;
  border-bottom: 1px solid #eaecf0;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.analytics-order-search > span {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.analytics-order-search > div {
  display: flex;
  gap: 8px;
}

.analytics-order-search input {
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  flex: 1 1 auto;
  min-height: 36px;
  min-width: 0;
}

.analytics-order-search small {
  color: #667085;
  font-size: 11px;
}

.analytics-scope-band {
  display: grid;
  gap: 9px;
}

.analytics-scope-label {
  align-items: baseline;
  display: flex;
  gap: 9px;
}

.analytics-scope-label strong {
  color: #344054;
  font-size: 14px;
}

.analytics-scope-label span {
  color: #667085;
  font-size: 12px;
}

.analytics-scope-band.current {
  border-top: 1px solid #e4e7ec;
  padding-top: 12px;
}

.analytics-kpi-foot > .analytics-sparkline:only-child {
  grid-column: 1 / -1;
}

.analytics-kpi-card.orange .analytics-kpi-mark {
  background: #fff3df;
  color: #b56808;
}

.analytics-dashboard-single {
  grid-template-columns: minmax(0, 1fr);
}

.analytics-kpi-grid-five {
  grid-template-columns: repeat(5, minmax(155px, 1fr));
}

.analytics-loading {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  color: #667085;
  font-weight: 700;
  padding: 28px;
  text-align: center;
}

.analytics-coverage-chip {
  background: #fff7df;
  border: 1px solid #f4cf78;
  border-radius: 6px;
  color: #7a4b00;
  font-size: 12px;
  font-weight: 800;
  justify-self: start;
  padding: 6px 9px;
}

.analytics-status-chip.completed {
  background: #e8f7ef;
  color: #047857;
}

.analytics-status-chip.cancelled {
  background: #ffe8e8;
  color: #b42318;
}

.analytics-stock-table td:first-child,
.analytics-manager-detail-table td:first-child {
  min-width: 210px;
}

.analytics-report-table td > small {
  color: #667085;
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

@media (max-width: 1500px) {
  .executive-control-grid > .analytics-report-card {
    grid-column: 1 / -1;
    min-width: 0;
  }
}

@media (max-width: 1380px) {
  .analytics-report-head:not(.analytics-report-head-compact) {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  }

  .analytics-user-card {
    display: none;
  }

  .analytics-filter-panel,
  .stock-analytics-filter,
  .analytics-filter-panel-compact,
  .finance-analytics-page .analytics-filter-panel-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-filter-panel-v2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .analytics-filter-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-filter-primary .analytics-filter-actions {
    grid-column: 1 / -1;
  }

  .analytics-filter-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .analytics-kpi-grid,
  .analytics-kpi-grid-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 1250px) {
  .analytics-workspace-focus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .analytics-report-head,
  .analytics-filter-panel,
  .stock-analytics-filter,
  .analytics-filter-panel-compact,
  .finance-analytics-page .analytics-filter-panel-compact,
  .analytics-kpi-grid,
  .analytics-kpi-grid-five,
  .analytics-workspace-focus {
    grid-template-columns: minmax(0, 1fr);
  }

  .analytics-filter-actions {
    align-items: center;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    grid-column: auto;
    justify-content: space-between;
  }

  .analytics-period-buttons {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: auto;
  }

  .analytics-global-search {
    width: 100%;
  }

  .analytics-filter-primary,
  .analytics-filter-advanced > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .analytics-filter-summary,
  .analytics-scope-label,
  .analytics-metrics-empty,
  .analytics-load-error {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-filter-reset-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .analytics-sales-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-tab-empty {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-customizer-inline > .analytics-customizer-grid {
    left: 0;
    right: auto;
    width: min(720px, calc(100vw - 48px));
  }
}

@media (max-width: 500px) {
  .analytics-filter-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .analytics-period-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-customizer-inline,
  .analytics-customizer-inline > summary {
    width: 100%;
  }

  .analytics-customizer-inline > .analytics-customizer-grid {
    width: calc(100vw - 32px);
  }
}

/* Analytics V2: honest daily close and read-only ERP risk workspace. */
body[data-current-view="reports"] .topbar,
body[data-current-view="analyticsRisks"] .topbar {
  margin-bottom: 0;
  min-height: 0;
  padding: 0;
}

body[data-current-view="reports"] .topbar #page-title,
body[data-current-view="reports"] .topbar #page-subtitle,
body[data-current-view="analyticsRisks"] .topbar #page-title,
body[data-current-view="analyticsRisks"] .topbar #page-subtitle {
  display: none;
}

.daily-close-page,
.analytics-risks-page {
  display: grid;
  gap: 0;
  margin: 0 auto;
  max-width: 1480px;
  min-width: 0;
  width: 100%;
}

.daily-close-head,
.analytics-risks-head {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-width: 0;
  padding: 4px 0 20px;
}

.daily-close-head h1,
.analytics-risks-head h1 {
  font-size: 30px;
  letter-spacing: 0;
  margin: 4px 0 6px;
}

.daily-close-head p,
.analytics-risks-head p {
  color: #667085;
  margin: 0;
  overflow-wrap: anywhere;
}

.daily-close-head > div,
.analytics-risks-head > div {
  min-width: 0;
}

.daily-close-controls,
.analytics-risks-head-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.daily-close-controls label {
  display: grid;
  gap: 5px;
}

.daily-close-controls label span,
.analytics-risks-toolbar label span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.daily-close-controls input,
.analytics-risks-toolbar select {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  min-height: 38px;
  padding: 7px 10px;
}

.daily-close-section {
  border-top: 1px solid #e4e7ec;
  min-width: 0;
  padding: 22px 0 24px;
}

.daily-close-section-head {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.daily-close-section-head h2 {
  font-size: 20px;
  letter-spacing: 0;
  margin: 3px 0 0;
}

.daily-close-source {
  color: #667085;
  font-size: 12px;
  text-align: right;
}

.daily-close-metrics,
.analytics-risk-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.daily-close-metrics-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.daily-close-metric {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-left: 4px solid #2e6f9e;
  border-radius: 7px;
  display: grid;
  gap: 4px;
  min-height: 104px;
  min-width: 0;
  padding: 14px 15px;
}

.daily-close-metric.green { border-left-color: #198754; }
.daily-close-metric.amber { border-left-color: #b7791f; }
.daily-close-metric.red { border-left-color: #c2413b; }

.daily-close-metric > span,
.daily-close-bank-row span,
.daily-close-current span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.daily-close-metric strong,
.daily-close-bank-row strong,
.daily-close-current strong {
  color: #101828;
  font-size: 21px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.daily-close-metric small,
.daily-close-bank-row small,
.daily-close-current small {
  color: #667085;
  font-size: 11px;
}

.daily-close-bank-row,
.daily-close-current {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.daily-close-bank-row > div,
.daily-close-current > div {
  border-left: 1px solid #e4e7ec;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 4px 18px 4px 20px;
}

.daily-close-bank-row > div:first-child,
.daily-close-current > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.daily-close-bank-row > .amber strong { color: #9a6700; }
.daily-close-bank-row > .green strong { color: #087443; }

.daily-close-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.daily-close-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.daily-close-table th,
.daily-close-table td {
  border-bottom: 1px solid #eaecf0;
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

.daily-close-table th {
  color: #667085;
  font-size: 11px;
  text-transform: uppercase;
}

.daily-close-table th:nth-child(1) { width: 15%; }
.daily-close-table th:nth-child(2) { width: 14%; }
.daily-close-table th:nth-child(4) { width: 14%; }
.daily-close-table th:nth-child(5) { width: 16%; }

.daily-close-table-empty,
.daily-close-empty,
.analytics-risks-empty {
  color: #667085;
  padding: 28px 0;
  text-align: center;
}

.daily-close-empty,
.analytics-risks-empty {
  border-top: 1px solid #e4e7ec;
  display: grid;
  gap: 6px;
}

.daily-close-empty.danger { color: #b42318; }
.analytics-risks-empty.success { color: #087443; }

.analytics-readonly-badge {
  background: #f2f4f7;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  padding: 8px 10px;
  text-transform: uppercase;
}

.analytics-risk-summary {
  border-bottom: 1px solid #e4e7ec;
  border-top: 1px solid #e4e7ec;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 20px 0;
}

.analytics-risks-toolbar {
  align-items: end;
  border-bottom: 1px solid #e4e7ec;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(190px, 260px) minmax(190px, 260px) 1fr;
  padding: 18px 0;
}

.analytics-risks-toolbar label {
  display: grid;
  gap: 5px;
}

.analytics-risks-toolbar > strong {
  color: #475467;
  justify-self: end;
  padding-bottom: 10px;
}

.analytics-risks-list {
  display: grid;
}

.analytics-risk-item {
  align-items: start;
  border-bottom: 1px solid #e4e7ec;
  display: grid;
  gap: 14px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 18px 0;
}

.analytics-risk-mark {
  align-items: center;
  background: #fef3f2;
  border-radius: 50%;
  color: #b42318;
  display: flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.analytics-risk-item.warning .analytics-risk-mark {
  background: #fffaeb;
  color: #b54708;
}

.analytics-risk-item.info .analytics-risk-mark {
  background: #eff8ff;
  color: #175cd3;
}

.analytics-risk-copy,
.analytics-risk-title {
  min-width: 0;
}

.analytics-risk-title {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
}

.analytics-risk-title span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.analytics-risk-copy p {
  color: #475467;
  margin: 6px 0;
}

.analytics-risk-copy > small {
  color: #667085;
}

.analytics-risk-copy details {
  margin-top: 9px;
}

.analytics-risk-copy summary {
  color: #475467;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.analytics-risk-copy pre {
  background: #f8fafc;
  border: 1px solid #eaecf0;
  border-radius: 6px;
  font-size: 11px;
  margin: 8px 0 0;
  max-width: 100%;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

@media (max-width: 1280px) {
  .daily-close-metrics-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .daily-close-head,
  .analytics-risks-head {
    align-items: stretch;
    display: grid;
    justify-content: stretch;
  }

  .daily-close-controls,
  .analytics-risks-head-actions {
    justify-content: flex-start;
  }

  .daily-close-metrics,
  .daily-close-metrics-five,
  .analytics-risk-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .daily-close-section-head {
    align-items: start;
    display: grid;
    gap: 8px;
  }

  .daily-close-source {
    text-align: left;
  }

  .daily-close-bank-row,
  .daily-close-current {
    grid-template-columns: minmax(0, 1fr);
  }

  .daily-close-bank-row > div,
  .daily-close-current > div,
  .daily-close-bank-row > div:first-child,
  .daily-close-current > div:first-child {
    border-left: 0;
    border-top: 1px solid #eaecf0;
    padding: 12px 0;
  }

  .daily-close-bank-row > div:first-child,
  .daily-close-current > div:first-child {
    border-top: 0;
  }

  .analytics-risks-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-risks-toolbar > strong {
    grid-column: 1 / -1;
    justify-self: start;
    padding-bottom: 0;
  }

  .analytics-risk-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .analytics-risk-actions {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .daily-close-head h1,
  .analytics-risks-head h1 {
    font-size: 26px;
  }

  .daily-close-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-close-controls label {
    grid-column: 1 / -1;
  }

  .daily-close-controls input,
  .daily-close-controls button {
    width: 100%;
  }

  .daily-close-metrics,
  .daily-close-metrics-five,
  .analytics-risk-summary,
  .analytics-risks-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .daily-close-metric {
    min-height: 0;
  }

  .daily-close-table thead {
    display: none;
  }

  .daily-close-table,
  .daily-close-table tbody,
  .daily-close-table tr,
  .daily-close-table td {
    display: block;
    width: 100%;
  }

  .daily-close-table tr {
    border-bottom: 1px solid #d0d5dd;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 0;
  }

  .daily-close-table td {
    border: 0;
    min-width: 0;
    padding: 4px 8px 4px 0;
  }

  .daily-close-table td:nth-child(3) {
    grid-column: 1 / -1;
  }

  .daily-close-table-empty {
    grid-column: 1 / -1;
  }

  .analytics-risks-head-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-readonly-badge {
    align-self: center;
    justify-self: start;
  }
}

@media (max-width: 1250px) {
  .customer-vitals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .customer-vitals {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-feed-row {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .customer-feed-row .link-button,
  .customer-feed-detail {
    grid-column: 1 / -1;
    text-align: left;
    white-space: normal;
  }
}

/* Orders Journal V1: scoped workspace. */
body[data-current-view="orders"] .orders-smart-page.oj2,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2,
body[data-current-view="stockReservations"] .orders-smart-page.oj2 {
  gap: 10px;
  overflow: visible;
  padding: 12px;
}

.oj2 .oj2-head {
  align-items: center;
  min-height: 48px;
}

.oj2 .oj2-head h2 {
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0 0 3px;
}

.oj2 .oj2-head p {
  font-size: 12px;
  margin: 0;
}

.oj2 .oj2-readonly {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.oj2 .oj2-sticky-controls {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #dbe3ef;
  display: grid;
  gap: 7px;
  margin: 0 -12px;
  padding: 7px 12px 9px;
  position: sticky;
  top: 0;
  z-index: 24;
}

.oj2 .oj2-queue-wrap {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.oj2 .oj2-queues {
  align-items: center;
  display: flex;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-width: thin;
}

.oj2 .oj2-queue,
.oj2 .oj2-attention,
.oj2 .oj2-subqueues button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  gap: 6px;
  height: 34px;
  justify-content: center;
  padding: 0 10px;
  white-space: nowrap;
}

.oj2 .oj2-queue strong,
.oj2 .oj2-attention strong,
.oj2 .oj2-subqueues strong {
  color: #64748b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.oj2 .oj2-queue:hover,
.oj2 .oj2-subqueues button:hover {
  background: #f8fafc;
  border-color: #b9c6d8;
}

.oj2 .oj2-queue.is-active,
.oj2 .oj2-subqueues button.is-active {
  background: #e9f7ef;
  border-color: #4f9d6d;
  color: #176b3a;
}

.oj2 .oj2-queue.is-active strong,
.oj2 .oj2-subqueues button.is-active strong {
  color: #176b3a;
}

.oj2 .oj2-attention {
  border-color: #f2c86d;
  color: #925f00;
  margin-left: auto;
}

.oj2 .oj2-attention > span:first-child {
  align-items: center;
  background: #fff4cf;
  border-radius: 50%;
  display: inline-flex;
  font-size: 11px;
  height: 18px;
  justify-content: center;
  width: 18px;
}

.oj2 .oj2-attention.is-active {
  background: #fff7dd;
  border-color: #cf8d00;
  box-shadow: inset 0 0 0 1px #cf8d00;
}

.oj2 .oj2-subqueues {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-left: 2px;
}

.oj2 .oj2-subqueues button {
  height: 30px;
  padding: 0 9px;
}

.oj2 .oj2-subqueues small {
  color: #64748b;
  font-size: 11px;
  margin-left: 4px;
}

.oj2 .oj2-filterbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.oj2 .order-journal-search {
  flex: 1 1 310px;
  max-width: none;
  min-width: 250px;
  position: relative;
}

.oj2 .order-journal-search input {
  height: 38px;
  padding-right: 34px;
  width: 100%;
}

.oj2 .oj2-search-clear {
  align-items: center;
  background: transparent;
  border: 0;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  height: 30px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 4px;
  top: 4px;
  width: 30px;
}

.oj2 .order-journal-source-segment {
  flex: 0 1 auto;
  min-width: 0;
}

.oj2 .order-journal-source-segment > div {
  display: flex;
  gap: 2px;
  max-width: 100%;
  overflow-x: auto;
}

.oj2 .order-journal-source-segment button {
  flex: 0 0 auto;
  font-size: 11px;
  height: 36px;
  min-width: 0;
  padding: 0 9px;
}

.oj2 .oj2-sort-segment {
  align-items: center;
  background: #eef2f7;
  border: 1px solid #d7dfeb;
  border-radius: 7px;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  height: 38px;
  padding: 2px;
}

.oj2 .oj2-sort-segment button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #536174;
  font-size: 11px;
  font-weight: 700;
  height: 32px;
  padding: 0 9px;
  white-space: nowrap;
}

.oj2 .oj2-sort-segment button.is-active {
  background: #ffffff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 14%);
  color: #174a78;
}

.oj2 .order-journal-mine,
.oj2 .site-journal-filter-button {
  flex: 0 0 auto;
  height: 38px;
  white-space: nowrap;
}

.oj2 .oj2-reset {
  flex: 0 0 auto;
  font-size: 12px;
  white-space: nowrap;
}

.oj2 .orders-smart-count {
  color: #64748b;
  flex: 0 0 auto;
  font-size: 11px;
  margin-left: auto;
  white-space: nowrap;
}

.oj2 .oj2-search-scope {
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 6px;
  color: #315a9d;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  white-space: nowrap;
}

.oj2 .oj2-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.oj2 .oj2-filter-chips button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 11px;
  gap: 7px;
  max-width: min(340px, 100%);
  min-height: 28px;
  padding: 4px 8px;
}

.oj2 .oj2-filter-chips button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oj2 .oj2-filter-chips button b {
  color: #64748b;
  font-size: 14px;
}

.oj2 .oj2-filters {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  padding: 10px;
}

.oj2 .oj2-filters.is-collapsed {
  display: none;
}

.oj2 .oj2-filters label {
  color: #475569;
  font-size: 11px;
  font-weight: 750;
  min-width: 0;
}

.oj2 .oj2-filters input,
.oj2 .oj2-filters select {
  background: #ffffff;
  font-size: 12px;
  height: 36px;
  margin-top: 4px;
  min-width: 0;
  width: 100%;
}

.oj2 .oj2-customer-filter {
  position: relative;
}

.oj2 .oj2-customer-selected {
  background: #e9f7ef;
  border: 1px solid #a7d9ba;
  border-radius: 5px;
  color: #176b3a;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  margin-top: 5px;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oj2 .oj2-customer-suggestions,
.order-customer-payment-dialog .customer-payment-suggestions {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  display: grid;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 5px;
  position: absolute;
  right: 0;
  top: calc(100% + 3px);
  z-index: 60;
}

.oj2 .oj2-customer-suggestions button,
.order-customer-payment-dialog .customer-payment-suggestions button {
  align-items: start;
  background: #ffffff;
  border: 0;
  border-radius: 5px;
  color: #1f2937;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 2px;
  padding: 8px;
  text-align: left;
}

.oj2 .oj2-customer-suggestions button:hover,
.order-customer-payment-dialog .customer-payment-suggestions button:hover {
  background: #f1f5f9;
}

.oj2 .oj2-customer-suggestions button span,
.order-customer-payment-dialog .customer-payment-suggestions button span {
  color: #64748b;
  font-size: 11px;
}

.oj2 .oj2-refresh-banner,
.warehouse-queue-card > .oj2-refresh-banner {
  align-items: center;
  background: #eef7ff;
  border: 1px solid #b7d9f5;
  border-radius: 7px;
  color: #245c88;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 10px;
  justify-content: center;
  margin-bottom: 7px;
  padding: 8px 10px;
}

.warehouse-queue-card > .oj2-refresh-banner {
  margin: 10px 0 0;
}

.oj2 .oj2-table-wrap {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  max-height: none;
  max-width: 100%;
  min-height: 220px;
  overflow-x: auto !important;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.oj2 .orders-smart-table.order-work-table {
  min-width: 1220px !important;
  table-layout: fixed;
  width: 100%;
}

.oj2 .orders-smart-table.order-work-table th,
.oj2 .orders-smart-table.order-work-table td {
  display: table-cell !important;
  font-size: 12px;
  min-height: 0;
  overflow: hidden;
  padding: 8px 9px;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.oj2 .orders-smart-table.order-work-table th {
  background: #f6f8fb;
  color: #526079;
  font-size: 11px;
  height: 38px;
  letter-spacing: 0;
}

.oj2 .orders-smart-table.order-work-table .order-work-row {
  cursor: pointer;
  height: 62px;
}

.oj2 .orders-smart-table.order-work-table .order-work-row td {
  background: #ffffff !important;
  border-top: 1px solid #e5eaf1;
  box-shadow: none !important;
  height: 62px;
  line-height: 1.25;
}

.oj2 .orders-smart-table.order-work-table .order-work-row:hover td {
  background: #f8fafc !important;
}

.oj2 .orders-smart-table.order-work-table .order-work-row:focus-visible td {
  background: #f2f7ff !important;
  box-shadow: inset 0 2px 0 #2563eb, inset 0 -2px 0 #2563eb !important;
}

.oj2 .orders-smart-table.order-work-table .order-work-row.needs-action td:first-child {
  box-shadow: inset 3px 0 0 #dc8b00 !important;
}

.oj2 .orders-smart-table.order-work-table .order-work-row.is-overdue td:first-child,
.oj2 .orders-smart-table.order-work-table .order-work-row.payment-due-attention td:first-child {
  box-shadow: inset 3px 0 0 #c63b32 !important;
}

.oj2 .orders-smart-table.order-work-table th:nth-child(1) { width: 9%; }
.oj2 .orders-smart-table.order-work-table th:nth-child(2) { width: 17%; }
.oj2 .orders-smart-table.order-work-table th:nth-child(3) { width: 8%; }
.oj2 .orders-smart-table.order-work-table th:nth-child(4) { width: 15%; }
.oj2 .orders-smart-table.order-work-table th:nth-child(5) { width: 15%; }
.oj2 .orders-smart-table.order-work-table th:nth-child(6) { width: 14%; }
.oj2 .orders-smart-table.order-work-table th:nth-child(7) { width: 12%; }
.oj2 .orders-smart-table.order-work-table th:nth-child(8) { width: 6%; }
.oj2 .orders-smart-table.order-work-table th:nth-child(9) { width: 4%; }

.oj2 .orders-smart-table.order-work-table th:nth-child(7),
.oj2 .orders-smart-table.order-work-table td:nth-child(7),
.oj2 .orders-smart-table.order-work-table th:nth-child(8),
.oj2 .orders-smart-table.order-work-table td:nth-child(8),
.oj2 .orders-smart-table.order-work-table th:nth-child(9),
.oj2 .orders-smart-table.order-work-table td:nth-child(9) {
  box-shadow: none !important;
  min-width: 0 !important;
  position: static !important;
  right: auto !important;
  z-index: auto !important;
}

.oj2 .orders-smart-table .order-number-link,
.oj2 .orders-smart-table .order-row-client-name {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.oj2 .orders-smart-table .order-row-sub {
  color: #64748b;
  display: block;
  font-size: 10px;
  line-height: 1.25;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oj2 .orders-smart-table .order-client-phone {
  color: #64748b;
}

.oj2 .orders-smart-table .oj2-customer-note {
  color: #9a5b00;
  display: block;
  font-size: 10px;
  font-weight: 750;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oj2 .orders-smart-table .order-source-main,
.oj2 .orders-smart-table .order-row-person {
  color: #1f2937;
  display: block;
  font-size: 12px;
  font-weight: 750;
}

.oj2 .orders-smart-table .order-row-person.is-unassigned {
  color: #9a5b00;
}

.oj2 .oj2-state-cell,
.oj2 .order-payment-cell {
  align-items: start;
  display: grid !important;
  gap: 3px;
  min-width: 0;
}

.oj2 .oj2-state-cell > small,
.oj2 .order-payment-cell > small {
  color: #64748b;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oj2 .oj2-action-reason {
  color: #9a5b00;
  font-size: 10px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oj2 .oj2-action-reason.is-danger {
  color: #b42318;
}

.oj2 .order-payment-marker,
.oj2 .payment-due-badge,
.oj2 .order-workflow-badge,
.oj2 .status,
.oj2 .channel-pill {
  font-size: 10px !important;
  line-height: 1.15;
  max-width: 100%;
  min-height: 22px;
  overflow: hidden;
  padding: 3px 6px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oj2 .delivery-badge-table {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.oj2 .delivery-badge-table > span {
  display: block;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oj2 .delivery-badge-table small {
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oj2 .order-amount-cell,
.oj2 .order-amount-cell strong {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.oj2 .order-row-open-cell {
  text-align: right;
}

.oj2 .order-row-open-cell button {
  font-size: 10px;
  min-height: 28px;
  min-width: 0;
  padding: 0 7px;
  white-space: nowrap;
}

.oj2 .oj2-empty {
  align-items: center;
  color: #64748b;
  display: grid;
  gap: 5px;
  justify-items: center;
  min-height: 150px;
  padding: 24px;
  text-align: center;
}

.oj2 .order-journal-footer {
  padding-top: 7px;
}

.order-customer-payment-backdrop,
.order-status-settings-backdrop {
  overflow: auto;
  padding: 20px;
  z-index: 180;
}

.order-customer-payment-dialog {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  max-height: calc(100dvh - 40px);
  max-width: 980px;
  overflow: auto;
  padding: 16px;
  position: relative;
  width: min(980px, 100%);
}

.order-customer-payment-dialog .oj2-dialog-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

.order-customer-payment-dialog .customer-payment-form {
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

.order-customer-payment-dialog .payment-summary {
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(115px, 0.7fr)) minmax(160px, 0.9fr) minmax(150px, 0.8fr);
}

.order-customer-payment-dialog .customer-payment-search-field {
  position: relative;
}

.order-customer-payment-dialog .customer-payment-selected {
  background: #e9f7ef;
  border: 1px solid #a7d9ba;
  border-radius: 5px;
  color: #176b3a;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  margin-top: 5px;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-status-settings-backdrop .order-status-settings {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  max-height: calc(100dvh - 40px);
  max-width: 1180px;
  overflow: auto;
  padding: 16px;
  width: min(1180px, 100%);
}

.order-status-settings-backdrop .order-status-settings-table {
  min-width: 900px;
}

.order-status-settings-backdrop .danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 1180px) {
  .oj2 .oj2-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .oj2 .orders-smart-table.order-work-table {
    min-width: 1180px !important;
  }

  .oj2 .orders-smart-table.order-work-table th:nth-child(3),
  .oj2 .orders-smart-table.order-work-table td:nth-child(3),
  .oj2 .orders-smart-table.order-work-table th:nth-child(6),
  .oj2 .orders-smart-table.order-work-table td:nth-child(6),
  .oj2 .orders-smart-table.order-work-table th:nth-child(7),
  .oj2 .orders-smart-table.order-work-table td:nth-child(7),
  .oj2 .orders-smart-table.order-work-table th:nth-child(8),
  .oj2 .orders-smart-table.order-work-table td:nth-child(8),
  .oj2 .orders-smart-table.order-work-table th:nth-child(9),
  .oj2 .orders-smart-table.order-work-table td:nth-child(9) {
    display: table-cell !important;
  }
}

@media (max-width: 900px) {
  body[data-current-view="orders"] .orders-smart-page.oj2,
  body[data-current-view="onlineOrders"] .orders-smart-page.oj2,
  body[data-current-view="stockReservations"] .orders-smart-page.oj2 {
    padding: 10px;
  }

  .oj2 .oj2-head {
    align-items: stretch;
    flex-direction: column;
  }

  .oj2 .oj2-head .orders-smart-actions {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .oj2 .oj2-sticky-controls {
    margin: 0 -10px;
    padding: 7px 10px 9px;
    position: static;
  }

  .oj2 .oj2-filterbar {
    align-items: stretch;
  }

  .oj2 .order-journal-search {
    flex-basis: 100%;
    min-width: 100%;
  }

  .oj2 .order-journal-source-segment {
    flex: 1 1 100%;
  }

  .oj2 .oj2-sort-segment {
    flex: 0 0 auto;
  }

  .oj2 .order-journal-source-segment > div {
    padding-bottom: 2px;
  }

  .oj2 .orders-smart-count {
    margin-left: 0;
  }

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

  .order-customer-payment-backdrop,
  .order-status-settings-backdrop {
    align-items: start;
    padding: 10px;
  }

  .order-customer-payment-dialog,
  .order-status-settings-backdrop .order-status-settings {
    max-height: calc(100dvh - 20px);
    padding: 12px;
  }

  .order-customer-payment-dialog .payment-summary,
  .order-status-settings-backdrop .order-status-create {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .oj2 .oj2-head h2 {
    font-size: 22px;
  }

  .oj2 .oj2-head .orders-smart-actions > button,
  .oj2 .oj2-head .orders-more-actions {
    flex: 1 1 100%;
  }

  .oj2 .oj2-head .orders-more-actions summary {
    width: 100%;
  }

  .oj2 .orders-more-actions-panel {
    left: 0;
    max-width: calc(100vw - 40px);
    right: auto;
    width: 100%;
  }

  .oj2 .oj2-filterbar > button,
  .oj2 .order-journal-mine,
  .oj2 .site-journal-filter-button {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  .oj2 .oj2-filterbar .oj2-reset {
    flex-basis: auto;
  }

  .oj2 .oj2-filters,
  .order-customer-payment-dialog .payment-summary,
  .order-status-settings-backdrop .order-status-create {
    grid-template-columns: minmax(0, 1fr);
  }

  .oj2 .oj2-filters .orders-smart-filters-head {
    align-items: start;
  }

  .oj2 .orders-smart-table.order-work-table {
    min-width: 1120px !important;
  }

  .order-status-settings-backdrop .order-status-settings-head {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Orders Journal V1: outrank the legacy v4 journal rhythm only on this workspace. */
body[data-current-view="orders"] .orders-smart-page.oj2 .oj2-table-wrap,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .oj2-table-wrap {
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th,
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table td,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table td {
  font-size: 11px;
  line-height: 1.2;
  min-height: 0;
  padding: 4px 7px;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table {
  min-width: 1220px !important;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th {
  font-size: 10px;
  height: 34px;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-work-row,
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-work-row td,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-work-row,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-work-row td {
  height: 54px;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-number-link,
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-row-client-name,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-number-link,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-row-client-name {
  font-size: 12px;
  line-height: 1.15;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-source-main,
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-row-person,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-source-main,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-row-person {
  font-size: 11px;
  line-height: 1.15;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-row-sub,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-row-sub {
  font-size: 10px;
  line-height: 1.15;
  margin-top: 1px;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .oj2-state-cell,
body[data-current-view="orders"] .orders-smart-page.oj2 .order-payment-cell,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .oj2-state-cell,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .order-payment-cell {
  align-items: start;
  display: grid !important;
  gap: 2px;
  grid-template-rows: auto auto;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .oj2-state-meta,
body[data-current-view="orders"] .orders-smart-page.oj2 .oj2-payment-meta,
body[data-current-view="orders"] .orders-smart-page.oj2 .oj2-customer-flags,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .oj2-state-meta,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .oj2-payment-meta,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .oj2-customer-flags {
  align-items: center;
  display: flex;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .oj2-state-meta > *,
body[data-current-view="orders"] .orders-smart-page.oj2 .oj2-payment-meta > *,
body[data-current-view="orders"] .orders-smart-page.oj2 .oj2-customer-flags > *,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .oj2-state-meta > *,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .oj2-payment-meta > *,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .oj2-customer-flags > * {
  flex: 0 1 auto;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .order-row-client-name,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .order-row-client-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .oj2-customer-flags .customer-business-type-badge,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .oj2-customer-flags .customer-business-type-badge {
  font-size: 9px;
  min-height: 16px;
  padding: 1px 4px;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .delivery-badge-table span,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .delivery-badge-table span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(1),
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(1) { width: 8%; }
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(2),
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(2) { width: 15%; }
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(3),
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(3) { width: 8%; }
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(4),
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(4) { width: 14%; }
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(5),
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(5) { width: 14%; }
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(6),
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(6) { width: 12%; }
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(7),
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(7) { width: 10%; }
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(8),
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(8) { width: 7%; }
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(9),
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table th:nth-child(9) { width: 12%; }

body[data-current-view="orders"] .orders-smart-page.oj2 .order-main-action,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .order-main-action {
  font-size: 9px;
  max-width: 100%;
  padding: 3px 4px;
  width: 100%;
}

body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-payment-marker,
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .payment-due-badge,
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-workflow-badge,
body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .status,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-payment-marker,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .payment-due-badge,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .order-workflow-badge,
body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table .status {
  font-size: 9px !important;
  line-height: 1.1;
  min-height: 17px;
  padding: 1px 5px !important;
}

@media (max-width: 1180px) {
  body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table,
  body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table {
    min-width: 1180px !important;
  }
}

@media (min-width: 1181px) and (max-width: 1360px) {
  body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table,
  body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table {
    min-width: 1160px !important;
  }
}

@media (max-width: 560px) {
  body[data-current-view="orders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table,
  body[data-current-view="onlineOrders"] .orders-smart-page.oj2 .orders-smart-table.order-work-table {
    min-width: 1120px !important;
  }
}

@media (min-width: 761px) and (max-width: 800px) {
  body[data-current-view="orders"] .global-customer-search-host,
  body[data-current-view="onlineOrders"] .global-customer-search-host,
  body[data-current-view="warehouseDocuments"] .global-customer-search-host {
    flex: 0 0 auto;
    margin-left: 0;
    min-width: 0;
    width: 100%;
  }
}

/* Warehouse Documents V1: journal, working document and print. */
.print-document.stock-document-print {
  display: none;
}

body[data-current-view="warehouseDocuments"] .shell {
  overflow-x: clip;
}

body[data-current-view="warehouseDocuments"] .warehouse-suite-page {
  gap: 10px;
}

body[data-current-view="warehouseDocuments"] .warehouse-suite-main,
.wd-root,
.wd-document,
.wd-lines,
.wd-journal,
.wd-tools {
  min-width: 0;
}

.wd-root {
  --wd-blue: #155eef;
  --wd-blue-soft: #eef4ff;
  --wd-green: #16794a;
  --wd-green-soft: #eaf7ef;
  --wd-amber: #a15c07;
  --wd-amber-soft: #fff7e8;
  --wd-red: #b42318;
  --wd-red-soft: #fff1f0;
  --wd-violet: #6941c6;
  color: #172033;
  display: grid;
  gap: 10px;
  width: 100%;
}

.wd-grow {
  flex: 1 1 auto;
  min-width: 0;
}

.wd-tools,
.wd-journal,
.wd-create,
.wd-info-card,
.wd-lines,
.wd-movements,
.wd-danger-zone,
.wd-document-missing {
  background: #fff;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
}

.wd-tools {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  overflow: visible;
}

.wd-status-chips {
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
}

.wd-chip {
  align-items: center;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  color: #526075;
  display: inline-flex;
  gap: 7px;
  min-height: 30px;
  padding: 4px 11px;
}

.wd-chip strong,
.wd-document-number,
.wd-line-sku,
.wd-number-cell,
.wd-summary strong {
  font-variant-numeric: tabular-nums;
}

.wd-chip strong {
  color: #172033;
  font-size: 12px;
}

.wd-chip:hover,
.wd-chip[aria-pressed="true"] {
  border-color: var(--wd-blue);
  color: var(--wd-blue);
}

.wd-chip[aria-pressed="true"] {
  background: var(--wd-blue-soft);
  box-shadow: inset 0 0 0 1px rgba(21, 94, 239, 0.08);
}

.wd-chip--draft.has-items:not([aria-pressed="true"]) {
  border-color: #e3a144;
  color: var(--wd-amber);
}

.wd-filters {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1.5fr) minmax(0, 3fr);
  padding: 9px 10px;
}

.wd-filter-search,
.wd-filter-search input {
  min-width: 0;
  width: 100%;
}

.wd-filter-extras {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(118px, 1fr)) minmax(180px, 1.35fr);
  min-width: 0;
}

.wd-filter-extras label,
.wd-filter-extras select,
.wd-filter-extras input {
  min-width: 0;
  width: 100%;
}

.wd-mobile-filter-toggle {
  display: none;
}

.wd-active-filters,
.wd-context-note {
  align-items: center;
  background: var(--wd-amber-soft);
  border: 1px solid #f2d49d;
  border-radius: 8px;
  color: #704006;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
  padding: 7px 10px;
}

.wd-active-filters span {
  background: #fff;
  border: 1px solid #efd39f;
  border-radius: 999px;
  color: #263247;
  padding: 1px 8px;
}

.wd-active-filters em {
  font-style: normal;
  margin-left: auto;
}

.wd-journal {
  overflow: visible;
}

.wd-journal-table,
.wd-lines-table,
.wd-movements table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.wd-journal-table th,
.wd-journal-table td,
.wd-lines-table th,
.wd-lines-table td,
.wd-movements th,
.wd-movements td {
  border-bottom: 1px solid #edf0f4;
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
}

.wd-journal-table th,
.wd-lines-table th,
.wd-movements th {
  background: #f7f9fc;
  color: #657187;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.wd-journal-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.wd-journal-table th:nth-child(1) { width: 34%; }
.wd-journal-table th:nth-child(2) { width: 12%; }
.wd-journal-table th:nth-child(3) { width: 14%; }
.wd-journal-table th:nth-child(4) { width: 28%; }
.wd-journal-table th:nth-child(5) { width: 9%; }
.wd-journal-table th:nth-child(6) { width: 3%; }

.wd-journal-table tbody tr {
  cursor: pointer;
  min-height: 44px;
}

.wd-journal-table tbody tr:hover td,
.wd-journal-table tbody tr:focus td {
  background: #f8faff;
}

.wd-journal-table tbody tr:focus {
  outline: 2px solid var(--wd-blue);
  outline-offset: -2px;
}

.wd-journal-table tr.is-last-opened td {
  background: var(--wd-blue-soft);
}

.wd-journal-table tr.is-last-opened td:first-child {
  box-shadow: inset 3px 0 var(--wd-blue);
}

.wd-journal-table tr.is-opening {
  opacity: 0.7;
}

.wd-document-number {
  color: #172033;
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.2;
}

.wd-journal-meta {
  align-items: center;
  color: #69768a;
  display: flex;
  flex-wrap: wrap;
  font-size: 10.5px;
  gap: 4px 7px;
  line-height: 1.2;
  margin-top: 3px;
  min-width: 0;
}

.wd-journal-meta > span:last-child:not(.wd-source) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wd-source {
  background: #f2edff;
  border-radius: 4px;
  color: var(--wd-violet);
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  padding: 1px 5px;
  white-space: nowrap;
}

.wd-status {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  line-height: 1.25;
  padding: 3px 8px;
  white-space: nowrap;
}

.wd-status::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 6px;
  width: 6px;
}

.wd-status--draft {
  background: var(--wd-amber-soft);
  border-color: #efd19d;
  color: var(--wd-amber);
}

.wd-status--posted {
  background: var(--wd-green-soft);
  border-color: #b5dfc5;
  color: var(--wd-green);
}

.wd-status--voided {
  background: #f1f3f6;
  border-color: #d8dde5;
  color: #687386;
  text-decoration: line-through;
}

.wd-number-cell {
  text-align: right !important;
  white-space: nowrap;
}

.wd-journal-open {
  color: #8490a1;
  font-size: 18px;
  padding-left: 0 !important;
  text-align: center !important;
}

.wd-journal-footer {
  align-items: center;
  color: #6d788a;
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  padding: 7px 10px;
}

.wd-empty {
  align-items: center;
  color: #6b778a;
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  min-height: 112px;
  padding: 22px;
  text-align: center;
}

.wd-empty strong {
  color: #263247;
  font-size: 14px;
}

.wd-empty--loading {
  flex-direction: row;
}

.wd-spinner {
  animation: wd-spin 0.8s linear infinite;
  border: 2px solid #b8c3d3;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  height: 14px;
  width: 14px;
}

@keyframes wd-spin {
  to { transform: rotate(360deg); }
}

.wd-product-picker {
  min-width: 0;
  position: relative;
}

.wd-product-picker > input {
  padding-right: 30px;
}

.wd-picker-clear {
  align-items: center;
  background: transparent;
  border: 0;
  color: #667085;
  display: flex;
  font-size: 18px;
  height: 28px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 4px;
  top: 25px;
  width: 28px;
}

.wd-filter-product-picker .wd-picker-clear {
  top: 5px;
}

.wd-suggestions {
  background: #fff;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
  left: 0;
  max-height: 320px;
  overflow: auto;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
}

.wd-suggestions button {
  align-items: baseline;
  background: #fff;
  border: 0;
  display: grid;
  gap: 3px 9px;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  padding: 7px 10px;
  text-align: left;
  width: 100%;
}

.wd-suggestions button:hover,
.wd-suggestions button.is-active {
  background: var(--wd-blue-soft);
}

.wd-suggestions button strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.wd-suggestions button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wd-suggestions button small {
  color: #6b778a;
  white-space: nowrap;
}

.wd-suggestion-empty {
  color: #69768a;
  padding: 10px;
}

.wd-create-toolbar,
.wd-document-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wd-create-toolbar {
  min-height: 42px;
}

.wd-create {
  max-width: 1020px;
  padding: 16px;
}

.wd-create-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.wd-create-head h2 {
  font-size: 18px;
  margin: 2px 0 0;
}

.wd-type-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wd-type-option {
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  min-height: 68px;
  padding: 10px;
  text-align: left;
}

.wd-type-option strong,
.wd-type-option span {
  display: block;
}

.wd-type-option span {
  color: #68758a;
  font-size: 11px;
  margin-top: 3px;
}

.wd-type-option.is-active {
  background: var(--wd-blue-soft);
  border-color: var(--wd-blue);
  box-shadow: inset 0 0 0 1px rgba(21, 94, 239, 0.08);
}

.wd-create-fields {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 150px minmax(170px, 0.8fr) minmax(240px, 1.5fr);
  margin-top: 14px;
}

.wd-create-fields label,
.wd-create-notes label,
.wd-add-line label {
  color: #526075;
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  min-width: 0;
}

.wd-create-fields input,
.wd-create-fields select,
.wd-create-fields textarea,
.wd-create-notes textarea,
.wd-add-line input {
  width: 100%;
}

.wd-create-reason {
  grid-column: -2 / -1;
}

.wd-transfer-arrow {
  color: #8792a3;
  font-size: 20px;
  padding-bottom: 7px;
  text-align: center;
}

.wd-create-notes {
  margin-top: 10px;
}

.wd-create-notes summary {
  color: var(--wd-blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.wd-create-notes label {
  margin-top: 8px;
}

.wd-create-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.wd-disabled-reason,
.wd-field-error,
.wd-field-warning,
.wd-field-hint {
  font-size: 12px;
}

.wd-field-error {
  color: var(--wd-red);
}

.wd-field-warning {
  color: var(--wd-amber);
}

.wd-field-hint,
.wd-disabled-reason {
  color: #68758a;
}

.wd-preselected-product {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
}

.wd-document {
  display: grid;
  gap: 10px;
}

.wd-document-bar {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #dce3ec;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  min-height: 54px;
  padding: 8px 10px;
  position: sticky;
  top: 6px;
  z-index: 35;
}

.wd-document-bar h2 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  margin: 0;
}

.wd-document-context,
.wd-post-reason,
.wd-admin-only {
  color: #68758a;
  font-size: 11px;
}

.wd-copy-mobile {
  display: none;
}

.wd-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  padding: 2px 4px;
}

.wd-summary > div {
  display: grid;
  gap: 1px;
}

.wd-summary span {
  color: #68758a;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.wd-summary strong {
  color: #172033;
  font-size: 20px;
  line-height: 1.1;
}

.wd-missing-cost-chip {
  background: var(--wd-amber-soft);
  border: 1px solid #edca8e;
  border-radius: 999px;
  color: var(--wd-amber);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
}

.wd-banner,
.wd-notice,
.wd-refresh-banner,
.wd-view-only {
  align-items: flex-start;
  border: 1px solid;
  border-radius: 8px;
  display: flex;
  gap: 9px;
  padding: 9px 11px;
}

.wd-banner > strong,
.wd-notice > strong {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 22px;
  height: 22px;
  justify-content: center;
}

.wd-banner > div,
.wd-notice span,
.wd-refresh-banner span,
.wd-view-only span {
  flex: 1 1 auto;
  min-width: 0;
}

.wd-banner p {
  margin: 2px 0 0;
}

.wd-banner--warning {
  background: var(--wd-amber-soft);
  border-color: #efd19d;
}

.wd-banner--warning > strong {
  background: #f7dca9;
  color: #7e4806;
}

.wd-banner--danger,
.wd-notice--error {
  background: var(--wd-red-soft);
  border-color: #f1b5b0;
}

.wd-banner--danger > strong,
.wd-notice--error > strong {
  background: #f8d1ce;
  color: var(--wd-red);
}

.wd-banner--success,
.wd-notice--success {
  background: var(--wd-green-soft);
  border-color: #b7dfc6;
}

.wd-banner--success > strong,
.wd-notice--success > strong {
  background: #ccebd7;
  color: var(--wd-green);
}

.wd-notice--info,
.wd-refresh-banner,
.wd-view-only {
  background: #f4f7fb;
  border-color: #dce3ec;
}

.wd-notice {
  align-items: center;
  font-size: 12px;
}

.wd-refresh-banner {
  align-items: center;
  color: #41506a;
}

.wd-view-only {
  align-items: center;
  color: #56647a;
}

.wd-view-only strong {
  color: #263247;
}

.wd-info-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.wd-info-card {
  padding: 11px 13px;
}

.wd-info-card h3,
.wd-lines-head h3 {
  color: #2c394f;
  font-size: 12px;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.wd-info-card dl {
  display: grid;
  font-size: 12px;
  gap: 5px 10px;
  grid-template-columns: 92px minmax(0, 1fr);
  margin: 0;
}

.wd-info-card dt {
  color: #6c788b;
}

.wd-info-card dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wd-history {
  display: grid;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wd-history li {
  align-items: flex-start;
  display: grid;
  gap: 8px;
  grid-template-columns: 9px minmax(0, 1fr);
}

.wd-history li > span {
  background: #9ca6b5;
  border-radius: 50%;
  height: 8px;
  margin-top: 5px;
  width: 8px;
}

.wd-history li.is-posted > span { background: var(--wd-green); }
.wd-history li.is-voided > span { background: var(--wd-red); }
.wd-history li.is-created > span { background: var(--wd-amber); }

.wd-history strong,
.wd-history small {
  display: block;
}

.wd-history small {
  color: #6d788a;
  font-size: 11px;
}

.wd-lines {
  overflow: visible;
}

.wd-lines-head {
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  padding: 8px 11px;
}

.wd-lines-head h3 {
  margin: 0;
}

.wd-lines-head h3 span,
.wd-lines-head small {
  color: #6d788a;
  font-weight: 500;
}

.wd-lines-head > input {
  max-width: 260px;
}

.wd-checkbox {
  align-items: center;
  color: #5e6b80;
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
}

.wd-checkbox input {
  margin: 0;
  width: auto;
}

.wd-add-line {
  align-items: end;
  background: #f7f9fc;
  border-bottom: 1px solid #e7ebf1;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(240px, 2fr) 105px 125px minmax(150px, 1fr) auto;
  padding: 9px 11px;
}

.wd-add-line > button {
  min-height: 38px;
}

.wd-add-line label small {
  color: #7a8597;
  font-size: 9px;
  font-weight: 500;
}

.wd-add-line-hint,
.wd-added-line {
  color: #647187;
  font-size: 11px;
  grid-column: 1 / -1;
  margin: 0;
}

.wd-add-line-hint.is-warning {
  color: var(--wd-red);
  font-weight: 700;
}

.wd-added-line {
  align-items: center;
  background: var(--wd-green-soft);
  border: 1px solid #b9dfc7;
  border-radius: 6px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 6px 8px;
}

.wd-lines-table-wrap {
  max-width: 100%;
  overflow-x: visible;
}

.wd-lines-table {
  min-width: 800px;
}

.wd-lines-table th {
  position: sticky;
  top: var(--wd-bar-h, 64px);
  z-index: 4;
}

.wd-lines-table th:nth-child(1) { width: 42px; }
.wd-lines-table th:nth-child(2) { width: 37%; }
.wd-lines-table th:nth-child(3) { width: 18%; }
.wd-lines-table .wd-line-note { overflow-wrap: anywhere; }
.wd-lines-table .wd-line-actions-column { width: 44px; }

.wd-lines-table tr:last-child td,
.wd-movements tr:last-child td {
  border-bottom: 0;
}

.wd-lines-table tr.is-missing-cost td {
  background: var(--wd-amber-soft);
}

.wd-lines-table tr.is-negative td {
  background: var(--wd-red-soft);
}

.wd-lines-table tr.is-flash td {
  animation: wd-flash 1.6s ease;
}

@keyframes wd-flash {
  from { background: #d9f3e2; }
}

.wd-line-index {
  color: #8490a1;
  font-size: 11px;
}

.wd-line-sku,
.wd-line-name,
.wd-line-warning {
  display: block;
}

.wd-line-sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.wd-line-name {
  color: #56647a;
  font-size: 11px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.wd-line-warning,
.wd-zero-cost {
  color: var(--wd-red);
  font-size: 10px;
  font-weight: 800;
}

.wd-edit-cell {
  background: transparent;
  border: 1px dashed transparent;
  border-radius: 5px;
  color: inherit;
  max-width: 100%;
  padding: 3px 5px;
  text-align: inherit;
}

.wd-edit-cell:hover,
.wd-edit-cell:focus-visible {
  background: var(--wd-blue-soft);
  border-color: #b6caf6;
}

.wd-inline-input {
  min-width: 72px;
  padding: 4px 6px;
  width: 100%;
}

.wd-adjustment-values {
  display: grid;
  font-size: 10px;
  gap: 2px;
}

.wd-adjustment-values span {
  color: #69768a;
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}

.wd-adjustment-values b {
  color: #172033;
}

.wd-lines-table tfoot td {
  background: #f7f9fc;
  border-top: 1px solid #dde4ed;
  font-weight: 800;
}

.wd-line-cards {
  display: none;
}

.wd-movements {
  overflow: hidden;
}

.wd-movements summary {
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: 8px;
  list-style: none;
  padding: 10px 12px;
}

.wd-movements summary::before {
  color: #7b8798;
  content: "▸";
}

.wd-movements[open] summary::before {
  content: "▾";
}

.wd-movements summary small {
  color: #758195;
  font-weight: 500;
  margin-left: auto;
}

.wd-movements > div {
  border-top: 1px solid #e5eaf0;
  overflow-x: auto;
}

.wd-movements table {
  min-width: 720px;
}

.wd-danger-zone {
  align-items: center;
  border-color: #efc0bc;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 11px 13px;
}

.wd-danger-zone p,
.wd-danger-zone small {
  color: #68758a;
  margin: 2px 0 0;
}

.wd-document-missing {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 150px;
  padding: 18px;
}

.wd-document-missing h2,
.wd-document-missing p {
  margin: 0;
}

.wd-document-missing p {
  color: #68758a;
  margin-top: 4px;
}

.wd-mobile-postbar {
  display: none;
}

.wd-dialog {
  max-height: min(86vh, 720px);
  overflow-y: auto;
  width: min(520px, calc(100vw - 28px));
}

.wd-dialog-warnings {
  display: grid;
  gap: 5px;
}

.wd-dialog-warnings p {
  color: var(--wd-red);
  font-weight: 700;
  margin: 0;
}

.stock-document-print {
  background: #fff;
  color: #111827;
  font-size: 11px;
  line-height: 1.35;
  min-height: 100%;
  position: relative;
}

.stock-document-print .document-title-row h2 {
  font-size: 21px;
  margin: 0 0 3px;
}

.stock-document-print-parties {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stock-document-print-table thead {
  display: table-header-group;
}

.stock-document-print-table tr {
  break-inside: avoid;
}

.stock-document-print-table th,
.stock-document-print-table td {
  font-size: 10px;
  padding: 5px 6px;
}

.stock-document-print-table .number {
  text-align: right;
  white-space: nowrap;
}

.stock-document-watermark {
  color: rgba(180, 35, 24, 0.12);
  font-size: 48px;
  font-weight: 900;
  left: 50%;
  letter-spacing: 0;
  pointer-events: none;
  position: absolute;
  text-align: center;
  top: 42%;
  transform: translate(-50%, -50%) rotate(-28deg);
  white-space: nowrap;
  z-index: 2;
}

@media (max-width: 1100px) {
  .wd-filters {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-filter-extras {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .wd-root input,
  .wd-root select,
  .wd-root textarea,
  .wd-dialog input,
  .wd-dialog select,
  .wd-dialog textarea {
    font-size: 16px;
  }

  .wd-add-line {
    grid-template-columns: minmax(240px, 2fr) 105px 125px auto;
  }

  .wd-add-line-notes {
    grid-column: 1 / -2;
  }

  .wd-journal-table th:nth-child(1) { width: 35%; }
  .wd-journal-table th:nth-child(4) { width: 25%; }
}

@media (max-width: 900px) {
  .wd-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wd-create-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wd-create-reason {
    grid-column: 1 / -1;
  }

  .wd-transfer-arrow {
    display: none;
  }

  .wd-info-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-document-context {
    order: 4;
    width: 100%;
  }

  .wd-journal-table th:nth-child(4),
  .wd-journal-table td:nth-child(4) {
    display: none;
  }

  .wd-journal-table th:nth-child(1) { width: 48%; }
  .wd-journal-table th:nth-child(2) { width: 17%; }
  .wd-journal-table th:nth-child(3) { width: 22%; }
  .wd-journal-table th:nth-child(5) { width: 10%; }
}

@media (max-width: 900px) {
  .wd-root {
    gap: 6px;
  }

  .wd-status-chips {
    gap: 4px;
    padding: 4px 8px;
  }

  .wd-chip {
    min-height: 27px;
    padding: 2px 8px;
  }

  .wd-filters {
    gap: 6px;
    padding: 5px 8px;
  }

  body[data-current-view="warehouseDocuments"] .warehouse-suite-head {
    align-items: stretch;
  }

  body[data-current-view="warehouseDocuments"] .warehouse-suite-head-actions .warehouse-action-button {
    width: 100%;
  }

  .wd-status-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .wd-chip {
    flex: 0 0 auto;
  }

  .wd-filters {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .wd-mobile-filter-toggle {
    display: inline-flex;
  }

  .wd-filter-extras {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-filters.is-open .wd-filter-extras {
    display: grid;
  }

  .wd-active-filters {
    align-items: flex-start;
  }

  .wd-active-filters em {
    margin-left: 0;
    width: 100%;
  }

  .wd-journal {
    background: transparent;
    border: 0;
    overflow: visible;
  }

  .wd-journal-table,
  .wd-journal-table tbody {
    display: grid;
    gap: 8px;
  }

  .wd-journal-table thead {
    display: none;
  }

  .wd-journal-table tbody tr {
    background: #fff;
    border: 1px solid #dfe5ed;
    border-radius: 8px;
    display: grid;
    gap: 6px 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px;
  }

  .wd-journal-table tbody tr.is-last-opened {
    border-color: #a9c0f4;
    box-shadow: inset 3px 0 var(--wd-blue);
  }

  .wd-journal-table tbody tr td {
    background: transparent !important;
    border: 0;
    display: block !important;
    padding: 0;
    width: auto !important;
  }

  .wd-journal-table tbody tr td:first-child {
    grid-column: 1 / -1;
  }

  .wd-journal-table tbody tr td:nth-child(2),
  .wd-journal-table tbody tr td:nth-child(3),
  .wd-journal-table tbody tr td:nth-child(4),
  .wd-journal-table tbody tr td:nth-child(5) {
    align-self: center;
    font-size: 11px;
    text-align: left !important;
  }

  .wd-journal-table tbody tr td:nth-child(3),
  .wd-journal-table tbody tr td:nth-child(4),
  .wd-journal-table tbody tr td:nth-child(5) {
    color: #5f6c80;
    grid-column: 1;
  }

  .wd-journal-open {
    align-self: center;
    grid-column: 2;
    grid-row: 2 / span 3;
  }

  .wd-create {
    padding: 12px;
  }

  .wd-create-head {
    align-items: flex-start;
  }

  .wd-create-fields,
  .wd-type-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-document-bar {
    top: 4px;
  }

  .wd-document-bar h2 {
    font-size: 13px;
  }

  .wd-document-bar .wd-grow,
  .wd-post-desktop,
  .wd-copy-desktop,
  .wd-post-reason {
    display: none;
  }

  .wd-copy-mobile {
    display: inline-flex;
  }

  .wd-document-context {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wd-summary {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wd-summary > div {
    background: #f7f9fc;
    border: 1px solid #e2e7ee;
    border-radius: 7px;
    padding: 8px;
  }

  .wd-summary strong {
    font-size: 17px;
  }

  .wd-missing-cost-chip {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .wd-info-card dl {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .wd-lines-head > input {
    max-width: none;
    order: 4;
    width: 100%;
  }

  .wd-add-line {
    grid-template-columns: minmax(0, 1fr) minmax(86px, 0.45fr);
  }

  .wd-add-line .wd-product-picker,
  .wd-add-line-notes,
  .wd-add-line-hint,
  .wd-added-line {
    grid-column: 1 / -1;
  }

  .wd-add-line > button {
    grid-column: 2;
  }

  .wd-lines-table-wrap {
    display: none;
  }

  .wd-line-cards {
    display: grid;
    gap: 8px;
    padding: 9px;
  }

  .wd-line-card {
    border: 1px solid #e0e6ee;
    border-radius: 7px;
    display: grid;
    gap: 7px;
    padding: 9px;
  }

  .wd-line-card.is-missing-cost {
    background: var(--wd-amber-soft);
    border-color: #efd19d;
  }

  .wd-line-card-head strong,
  .wd-line-card-head span {
    display: block;
  }

  .wd-line-card-head strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
  }

  .wd-line-card-head span {
    color: #526075;
    font-size: 12px;
    margin-top: 2px;
  }

  .wd-line-card-math {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
  }

  .wd-line-card-math span,
  .wd-line-card p {
    color: #667388;
    font-size: 11px;
    margin: 0;
  }

  .wd-line-card-actions {
    display: flex;
    gap: 7px;
  }

  .wd-movements > div {
    padding: 8px;
  }

  .wd-movements table,
  .wd-movements tbody {
    display: grid;
    gap: 7px;
    min-width: 0;
    width: 100%;
  }

  .wd-movements thead {
    display: none;
  }

  .wd-movements tr {
    border: 1px solid #e0e6ee;
    border-radius: 7px;
    display: grid;
    gap: 5px 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    padding: 8px;
  }

  .wd-movements td {
    border: 0;
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 0;
    white-space: normal !important;
  }

  .wd-movements td:nth-child(1),
  .wd-movements td:nth-child(2) {
    grid-column: 1 / -1;
  }

  .wd-movements td:nth-child(1),
  .wd-movements td:nth-child(4),
  .wd-movements td:nth-child(5) {
    color: #667388;
    font-size: 11px;
  }

  .wd-movements td:nth-child(3) {
    align-self: center;
    grid-column: 2;
    grid-row: 3 / span 2;
  }

  .wd-mobile-postbar {
    align-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #d8e0e9;
    border-radius: 8px 8px 0 0;
    bottom: 0;
    box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.12);
    display: grid;
    gap: 4px;
    left: 0;
    padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 70;
  }

  .wd-mobile-postbar small,
  .wd-mobile-postbar span {
    color: #667388;
    font-size: 10px;
    text-align: center;
  }

  .wd-document:has(.wd-mobile-postbar) {
    padding-bottom: 72px;
  }

  .wd-danger-zone,
  .wd-document-missing {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .wd-root {
    font-size: 12px;
  }

  .wd-document-bar > button,
  .wd-document-bar .wd-status {
    flex: 0 0 auto;
  }

  .wd-document-bar h2 {
    flex: 1 1 120px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wd-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-add-line {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-add-line > *,
  .wd-add-line > button {
    grid-column: 1;
  }

  .wd-suggestions button {
    grid-template-columns: minmax(64px, auto) minmax(0, 1fr);
  }

  .wd-suggestions button small {
    grid-column: 2;
  }

  .wd-banner {
    flex-wrap: wrap;
  }

  .wd-banner > button {
    margin-left: 31px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wd-spinner,
  .wd-lines-table tr.is-flash td {
    animation: none;
  }
}

@media print {
  .stock-document-print {
    display: block !important;
    position: relative;
  }

  .stock-document-print-table thead {
    display: table-header-group;
  }

  .stock-document-print-table tr,
  .stock-document-print .document-parties,
  .stock-document-print .invoice-total,
  .stock-document-print .signatures {
    break-inside: avoid;
  }

  .stock-document-watermark {
    color: rgba(180, 35, 24, 0.13) !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
.finance-source-dialog.generic-dialog-wide {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.finance-source-dialog .confirm-dialog-details {
  padding: 0;
  border: 0;
  background: transparent;
}

.finance-source-dialog .customer-payment-editor.is-embedded {
  margin: 0;
  box-shadow: none;
}

.customer-payment-editor-inline-meta {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.cash-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cash-row-details .cash-detail-actions {
  grid-column: 1 / -1;
}

.cash-row-details .danger-button {
  color: var(--danger, #b42318);
}

@media (max-width: 720px) {
  .finance-source-dialog.generic-dialog-wide {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
}

/* CRM Inquiry V1 */
.global-customer-search-host {
  flex-basis: 740px;
  width: min(740px, 58vw);
}

.global-sales-tools {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(280px, 1fr);
  position: relative;
}

.crm-inquiry-launch {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  min-height: 42px;
  padding: 8px 13px;
  white-space: nowrap;
}

.crm-inquiry-launch .order-action-icon,
.crm-history-new-inquiry .order-action-icon {
  height: 18px;
  width: 18px;
}

.crm-history-new-inquiry {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  margin-top: 12px;
}

.crm-inquiry-backdrop {
  align-items: stretch;
  background: rgb(19 31 27 / 42%);
  display: flex;
  inset: 0;
  justify-content: flex-end;
  position: fixed;
  z-index: 500;
}

.crm-inquiry-drawer {
  background: #f7f9f8;
  box-shadow: -16px 0 40px rgb(20 42 33 / 18%);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100dvh;
  max-width: 100%;
  overflow: hidden;
  width: min(720px, 92vw);
}

.crm-inquiry-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #d9e1dd;
  display: flex;
  justify-content: space-between;
  padding: 18px 22px 14px;
}

.crm-inquiry-header h2 {
  font-size: 22px;
  margin: 2px 0 0;
}

.crm-inquiry-header .icon-button svg,
.crm-inquiry-option-control .icon-button svg,
.crm-inquiry-line .icon-button svg {
  height: 17px;
  width: 17px;
}

.crm-inquiry-stage {
  background: #fff;
  border-bottom: 1px solid #d9e1dd;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 10px 22px 14px;
}

.crm-inquiry-stage button {
  background: #f1f4f2;
  border: 1px solid #d5ddd8;
  border-radius: 6px;
  color: #516159;
  font-size: 12px;
  min-height: 34px;
  padding: 6px 8px;
}

.crm-inquiry-stage button.active {
  background: #e8f5ef;
  border-color: #16845b;
  color: #126747;
  font-weight: 700;
}

.crm-inquiry-stage button:disabled:not(.active) {
  opacity: 0.5;
}

.crm-inquiry-body {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 18px 22px 120px;
}

.crm-inquiry-linked {
  margin: 12px 22px 0;
}

.crm-inquiry-customer-picker {
  display: grid;
  gap: 6px;
  position: relative;
}

.crm-inquiry-customer-picker > label,
.crm-inquiry-option-field > label,
.crm-inquiry-note-grid label,
.crm-inquiry-price-grid label {
  color: #34473f;
  font-size: 12px;
  font-weight: 700;
}

.crm-inquiry-customer-picker > label span {
  color: #748078;
  font-weight: 500;
}

.crm-inquiry-customer-control,
.crm-inquiry-product-search {
  align-items: center;
  background: #fff;
  border: 1px solid #aebfb6;
  border-radius: 7px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 0 9px 0 12px;
}

.crm-inquiry-customer-control:focus-within,
.crm-inquiry-product-search:focus-within {
  border-color: #16845b;
  box-shadow: 0 0 0 3px rgb(22 132 91 / 13%);
}

.crm-inquiry-customer-control input,
.crm-inquiry-product-search input {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-width: 0;
  outline: 0;
  padding: 10px;
  width: 100%;
}

.crm-inquiry-customer-control svg,
.crm-inquiry-product-search svg {
  color: #557066;
  height: 18px;
  width: 18px;
}

.crm-inquiry-clear {
  background: transparent;
  border: 0;
  color: #64726c;
  font-size: 20px;
  height: 30px;
  padding: 0;
  width: 30px;
}

.crm-inquiry-customer-results {
  background: #fff;
  border: 1px solid #c9d5cf;
  border-radius: 7px;
  box-shadow: 0 14px 30px rgb(24 45 37 / 14%);
  display: grid;
  left: 0;
  max-height: 320px;
  overflow: auto;
  position: absolute;
  right: 0;
  top: 70px;
  z-index: 8;
}

.crm-inquiry-customer-results button {
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  border-radius: 0;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  text-align: left;
}

.crm-inquiry-customer-results button:hover {
  background: #f0f8f4;
}

.crm-inquiry-customer-results span,
.crm-inquiry-customer-picker small,
.crm-inquiry-section-head small,
.crm-inquiry-lines-empty {
  color: #687870;
  font-size: 12px;
}

.crm-inquiry-new-contact {
  background: #f0f6f3;
  border: 1px solid #cbdad2;
  border-radius: 7px;
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 11px;
}

.crm-inquiry-new-contact > div:first-child {
  display: grid;
  gap: 2px;
}

.crm-inquiry-new-contact-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.75fr);
}

.crm-inquiry-new-contact-fields label {
  color: #34473f;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
}

.crm-inquiry-new-contact-fields input {
  background: #fff;
  border: 1px solid #b9c8c1;
  border-radius: 6px;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

.crm-new-contact-badge {
  background: #fff4d8;
  border-radius: 4px;
  color: #7b5d12;
  display: inline-flex;
  font-size: 10px;
  margin-top: 4px;
  padding: 2px 5px;
  width: fit-content;
}

.crm-inquiry-options-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-inquiry-option-field {
  display: grid;
  gap: 6px;
}

.crm-inquiry-option-control {
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr) 36px;
}

.crm-inquiry-option-control select,
.crm-inquiry-note-grid input,
.crm-inquiry-note-grid textarea,
.crm-inquiry-price-grid input,
.crm-inquiry-price-grid select,
.crm-inquiry-dictionary input,
.crm-inquiry-line input {
  background: #fff;
  border: 1px solid #b9c8c1;
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.crm-inquiry-option-control .icon-button {
  height: 38px;
  width: 36px;
}

.crm-inquiry-note-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.65fr);
}

.crm-inquiry-note-grid label {
  display: grid;
  gap: 6px;
}

.crm-inquiry-note-grid .span-2 {
  grid-column: 1 / -1;
}

.crm-inquiry-note-grid textarea {
  min-height: 78px;
  resize: vertical;
}

.crm-inquiry-catalog {
  border-top: 1px solid #d9e1dd;
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.crm-inquiry-section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.crm-inquiry-section-head > div {
  display: grid;
  gap: 2px;
}

.crm-inquiry-product-search {
  grid-template-columns: 22px minmax(0, 1fr);
}

.crm-inquiry-product-results {
  background: #fff;
  border: 1px solid #cbd6d0;
  border-radius: 7px;
  display: grid;
  max-height: 310px;
  overflow: auto;
}

.crm-inquiry-product-results button {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  border-radius: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 9px 11px;
  text-align: left;
}

.crm-inquiry-product-results button:hover {
  background: #f1f8f5;
}

.crm-inquiry-product-results img,
.crm-inquiry-product-placeholder {
  align-items: center;
  background: #f1f4f2;
  border-radius: 5px;
  display: flex;
  height: 40px;
  justify-content: center;
  object-fit: contain;
  width: 40px;
}

.crm-inquiry-product-results button > span:nth-child(2),
.crm-inquiry-selected-product > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crm-inquiry-product-results strong,
.crm-inquiry-selected-product strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-inquiry-product-results small,
.crm-inquiry-selected-product small {
  color: #738078;
  font-size: 11px;
}

.crm-inquiry-product-compose {
  background: #eef4f1;
  border: 1px solid #cad7d0;
  border-radius: 7px;
  display: grid;
  gap: 10px;
  padding: 11px;
}

.crm-inquiry-selected-product {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
}

.crm-inquiry-selected-product > span {
  align-items: center;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.crm-inquiry-selected-product img {
  height: 40px;
  object-fit: contain;
  width: 40px;
}

.crm-inquiry-price-grid {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 1.2fr) 90px 110px auto;
}

.crm-inquiry-price-grid label {
  display: grid;
  gap: 5px;
}

.crm-inquiry-price-grid .primary {
  min-height: 38px;
}

.crm-inquiry-loading,
.crm-inquiry-lines-empty {
  background: #f1f4f2;
  border: 1px dashed #c4d1ca;
  border-radius: 6px;
  padding: 13px;
  text-align: center;
}

.crm-inquiry-lines {
  border-top: 1px solid #d9e1dd;
  display: grid;
  gap: 0;
  padding-top: 8px;
}

.crm-inquiry-line {
  align-items: center;
  border-bottom: 1px solid #e1e7e4;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1fr) 74px 94px 94px 34px;
  padding: 9px 0;
}

.crm-inquiry-line-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crm-inquiry-line-name strong {
  font-size: 13px;
}

.crm-inquiry-line-name small,
.crm-inquiry-line label span {
  color: #748078;
  font-size: 10px;
}

.crm-inquiry-line label {
  display: grid;
  gap: 3px;
}

.crm-inquiry-line input {
  min-height: 34px;
  padding: 6px 7px;
}

.crm-inquiry-line-total {
  font-size: 13px;
  text-align: right;
}

.crm-inquiry-total {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  padding: 13px 0 0;
}

.crm-inquiry-total span {
  color: #65736c;
  margin-right: 12px;
}

.crm-inquiry-total strong {
  color: #126747;
  font-size: 20px;
}

.crm-inquiry-dictionary {
  background: #fff;
  border: 1px solid #cbd7d1;
  border-radius: 7px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.crm-inquiry-dictionary-list {
  display: grid;
  gap: 6px;
}

.crm-inquiry-dictionary-row {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(130px, 1fr) auto auto 32px 32px;
}

.crm-inquiry-dictionary-row.is-inactive {
  opacity: 0.6;
}

.crm-inquiry-dictionary-row .icon-button {
  height: 32px;
  width: 32px;
}

.crm-inquiry-dictionary-add {
  border-top: 1px solid #e1e7e4;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 10px;
}

.crm-inquiry-footer {
  align-items: center;
  background: #fff;
  border-top: 1px solid #cfd9d4;
  box-shadow: 0 -8px 20px rgb(28 48 40 / 7%);
  display: flex;
  gap: 8px;
  padding: 12px 22px;
  position: relative;
  z-index: 3;
}

.crm-inquiry-footer > div {
  display: grid;
  gap: 2px;
  margin-right: auto;
}

.crm-inquiry-footer small {
  color: #6a7771;
  font-size: 10px;
}

.crm-inquiry-footer strong {
  color: #126747;
  font-size: 18px;
}

.crm-log-inquiry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0;
}

.crm-log-inquiry-meta span,
.crm-log-inquiry-meta strong {
  background: #edf3f0;
  border-radius: 4px;
  color: #4e6259;
  font-size: 11px;
  padding: 3px 6px;
}

.crm-inquiry-report-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 14px;
  min-width: 0;
}

.crm-inquiry-report-head {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.72fr);
}

.crm-inquiry-report-head h2,
.crm-inquiry-report-queue-head h3 {
  margin: 3px 0 5px;
}

.crm-inquiry-report-head p,
.crm-inquiry-report-queue-head p {
  color: var(--muted);
  margin: 0;
}

.crm-inquiry-report-period {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
}

.crm-inquiry-report-period label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
}

.crm-inquiry-report-period input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 7px 9px;
}

.crm-inquiry-report-period > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
}

.crm-inquiry-report-period > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  grid-column: 1 / -1;
}

.crm-inquiry-report-metrics {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-inquiry-report-metrics > div {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 14px 16px;
}

.crm-inquiry-report-metrics > div + div {
  border-left: 1px solid var(--line);
}

.crm-inquiry-report-metrics span,
.crm-inquiry-report-metrics small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.crm-inquiry-report-metrics strong {
  color: #173f31;
  font-size: 26px;
  line-height: 1;
}

.crm-inquiry-report-queue-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.crm-inquiry-report-queue-head > strong {
  align-items: center;
  background: #e7f4ee;
  border-radius: 999px;
  color: #126747;
  display: inline-flex;
  font-size: 18px;
  justify-content: center;
  min-height: 38px;
  min-width: 42px;
  padding: 5px 11px;
}

.crm-inquiry-report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.crm-inquiry-report-filters button {
  background: #f6f8f7;
  border: 1px solid #d6ded9;
  border-radius: 6px;
  color: #42554d;
  min-height: 34px;
  padding: 6px 10px;
}

.crm-inquiry-report-filters button.active {
  background: #e7f4ee;
  border-color: #16845b;
  color: #126747;
  font-weight: 800;
}

.crm-inquiry-report-filters button span {
  color: inherit;
  margin-left: 4px;
}

.crm-inquiry-report-list {
  border-top: 1px solid var(--line);
  display: grid;
}

.crm-inquiry-report-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 150px minmax(150px, 0.85fr) minmax(220px, 1.4fr) minmax(150px, 0.75fr) auto;
  min-width: 0;
  padding: 11px 4px;
}

.crm-inquiry-report-row > div {
  min-width: 0;
}

.crm-inquiry-report-status,
.crm-inquiry-report-contact,
.crm-inquiry-report-subject,
.crm-inquiry-report-owner {
  display: grid;
  gap: 3px;
}

.crm-inquiry-report-status span {
  background: #eef2f0;
  border-radius: 4px;
  color: #42554d;
  font-size: 11px;
  font-weight: 800;
  justify-self: start;
  padding: 3px 6px;
}

.crm-inquiry-report-row.new .crm-inquiry-report-status span {
  background: #e8f1ff;
  color: #1d4ed8;
}

.crm-inquiry-report-row.in_progress .crm-inquiry-report-status span {
  background: #fff4d6;
  color: #8a5b0a;
}

.crm-inquiry-report-row.request_without_order .crm-inquiry-report-status span {
  background: #e7f4ee;
  color: #126747;
}

.crm-inquiry-report-row.closed_without_request .crm-inquiry-report-status span {
  background: #f1f3f2;
  color: #68746f;
}

.crm-inquiry-report-row small {
  color: var(--muted);
  font-size: 11px;
}

.crm-inquiry-report-contact strong,
.crm-inquiry-report-subject strong,
.crm-inquiry-report-owner strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-inquiry-report-actions {
  justify-self: end;
}

@media (max-width: 1100px) {
  .global-customer-search-host {
    width: min(680px, 65vw);
  }

  .global-sales-tools {
    grid-template-columns: auto minmax(240px, 1fr);
  }

  .crm-inquiry-report-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-inquiry-report-row {
    grid-template-columns: 140px minmax(150px, 0.9fr) minmax(220px, 1.4fr) auto;
  }

  .crm-inquiry-report-owner {
    display: none;
  }
}

@media (max-width: 720px) {
  .global-customer-search-host {
    min-width: 0;
    width: 100%;
  }

  .global-sales-tools {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .crm-inquiry-drawer {
    width: 100vw;
  }

  .crm-inquiry-header,
  .crm-inquiry-body,
  .crm-inquiry-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .crm-inquiry-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 14px;
    padding-right: 14px;
  }

  .crm-inquiry-linked {
    margin-left: 14px;
    margin-right: 14px;
  }

  .crm-inquiry-options-grid,
  .crm-inquiry-note-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-inquiry-new-contact-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-inquiry-note-grid .span-2 {
    grid-column: auto;
  }

  .crm-inquiry-price-grid {
    grid-template-columns: minmax(0, 1fr) minmax(84px, 0.35fr) minmax(100px, 0.45fr);
  }

  .crm-inquiry-price-grid .primary {
    grid-column: 1 / -1;
  }

  .crm-inquiry-line {
    grid-template-columns: minmax(0, 1fr) 66px 86px 32px;
  }

  .crm-inquiry-line-name {
    grid-column: 1 / -1;
  }

  .crm-inquiry-line-total {
    text-align: left;
  }

  .crm-inquiry-dictionary-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .crm-inquiry-dictionary-row .icon-button {
    display: none;
  }

  .crm-inquiry-footer {
    flex-wrap: wrap;
  }

  .crm-inquiry-footer > div {
    flex-basis: 100%;
  }

  .crm-inquiry-footer button {
    flex: 1 1 auto;
  }

  .crm-inquiry-report-period,
  .crm-inquiry-report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-inquiry-report-metrics > div + div {
    border-left: 0;
  }

  .crm-inquiry-report-metrics > div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .crm-inquiry-report-metrics > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .crm-inquiry-report-queue-head {
    align-items: flex-start;
  }

  .crm-inquiry-report-row {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 2px;
  }

  .crm-inquiry-report-contact,
  .crm-inquiry-report-subject {
    grid-column: 1 / -1;
  }

  .crm-inquiry-report-actions {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crm-inquiry-drawer {
    transition: none;
  }
}

.messenger-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.35fr) minmax(280px, 0.9fr);
}

.messenger-conversation-list,
.messenger-thread,
.messenger-integration-list,
.messenger-outbox-list {
  display: grid;
  gap: 8px;
}

.messenger-conversation-row,
.messenger-integration-row,
.messenger-outbox-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  display: grid;
  gap: 4px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.messenger-conversation-row.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.messenger-conversation-row span,
.messenger-conversation-row em,
.messenger-integration-row span,
.messenger-integration-row small,
.messenger-integration-row em,
.messenger-outbox-row span,
.messenger-outbox-row small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.messenger-conversation-row b {
  align-self: start;
  background: #b42318;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  justify-self: end;
  min-width: 22px;
  padding: 3px 7px;
  text-align: center;
}

.messenger-detail-card {
  min-height: 620px;
}

.messenger-thread {
  background: color-mix(in srgb, var(--panel) 72%, var(--bg));
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 460px;
  overflow: auto;
  padding: 12px;
}

.messenger-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  max-width: 82%;
  padding: 10px;
}

.messenger-message > div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.messenger-message span,
.messenger-message small {
  color: var(--muted);
  font-size: 12px;
}

.messenger-message p {
  margin: 0;
  white-space: pre-wrap;
}

.messenger-message.inbound {
  background: var(--panel);
  justify-self: start;
}

.messenger-message.outbound {
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  justify-self: end;
}

.messenger-message.failed {
  border-color: #b42318;
}

.messenger-reply-form,
.messenger-notes form,
.messenger-integration-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.messenger-reply-form textarea,
.messenger-notes input,
.messenger-integration-form input,
.messenger-integration-form select {
  width: 100%;
}

.messenger-linked-customer {
  align-items: center;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 10px;
}

.messenger-customer-link {
  margin-bottom: 10px;
}

.messenger-side {
  display: grid;
  gap: 16px;
}

.messenger-outbox-row.failed {
  border-color: #b42318;
}

.messenger-outbox-row.sent {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
}

@media (max-width: 1180px) {
  .messenger-layout {
    grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.4fr);
  }

  .messenger-side {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .messenger-layout,
  .messenger-side {
    grid-template-columns: 1fr;
  }

  .messenger-detail-card {
    min-height: auto;
  }

  .messenger-message {
    max-width: 100%;
  }
}
