/* ERP Full-System Master: scoped expansion of the locked Workbench, Detail, and Readonly masters. */
body.erp-ui2 {
  --full-master-surface: var(--workbench-surface, rgba(255, 255, 255, .96));
  --full-master-border: var(--workbench-border, rgba(216, 222, 231, .82));
  --full-master-divider: var(--workbench-divider, rgba(113, 124, 143, .12));
  --full-master-text: var(--workbench-text, #121926);
  --full-master-muted: var(--workbench-muted, #7d8796);
  --full-master-accent: var(--workbench-accent, #d7132a);
  --full-master-radius: var(--workbench-radius, 14px);
  --full-master-control-height: var(--workbench-control-height, 34px);
  --full-master-focus: var(--workbench-focus, 0 0 0 3px rgba(215, 19, 42, .07), 0 0 0 1px rgba(215, 19, 42, .10));
}

body.erp-ui2 .erp-full-master-page {
  padding-top: var(--workbench-page-top) !important;
}

body.erp-ui2 .erp-full-master-page > .page-header:not(.product-page-header) {
  display: none !important;
}

body.erp-ui2 .erp-full-master-page :is(.product-page-header, .history-head, .items-head) {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 12px;
}

body.erp-ui2 .erp-full-master-page :is(.product-title-block, .history-head > div:first-child, .items-head > div:first-child) {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: var(--full-master-control-height);
  color: #566174;
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
}

body.erp-ui2 .erp-full-master-page :is(.product-title-block, .history-head > div:first-child, .items-head > div:first-child)::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid rgba(215, 19, 42, .72);
  background: radial-gradient(circle, rgba(215, 19, 42, .88) 0 2px, transparent 2.5px);
}

body.erp-ui2 .erp-full-master-page :is(.product-title-block.erp-local-toolbar-left, .history-head > .erp-local-toolbar-left:first-child)::before {
  content: none !important;
}

body.erp-ui2 .erp-full-master-page .erp-local-toolbar-left {
  min-width: 0 !important;
  flex: 0 1 auto !important;
}

body.erp-ui2 .erp-full-master-page .erp-local-toolbar-nav {
  max-width: 100% !important;
}

body.erp-ui2 .erp-full-master-page .erp-local-toolbar-nav :is(.nav-cn, .nav-ru, .nav-uz) {
  font: inherit !important;
  line-height: inherit !important;
  letter-spacing: 0 !important;
}

body.erp-ui2 .erp-full-master-page :is(.product-page-header .master-toolbar, .history-head .search, .history-head .master-toolbar, .history-head .salespeople-toolbar, .stock-process-filterbar, .return-filterbar, .batch2-ltrcms-toolbar, .items-head > button) {
  margin-left: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

body.erp-ui2 .erp-full-master-page :is(.page-title, .history-title, .items-title) {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 560 !important;
  color: #566174 !important;
  letter-spacing: 0 !important;
}

body.erp-ui2 .erp-full-master-page :is(.page-subtitle, .history-subtitle, .items-subtitle) {
  display: none !important;
}

body.erp-ui2 .erp-full-master-page :is(.master-section, .history) {
  margin-top: 0 !important;
}

body.erp-ui2 .erp-full-master-page :is(.history-surface, .table-wrapper, .erp-master-ledger-surface) {
  width: 100% !important;
  background: var(--full-master-surface) !important;
  border: 1px solid var(--full-master-border) !important;
  border-radius: var(--full-master-radius) !important;
  box-shadow: 0 14px 34px rgba(28, 31, 35, .035) !important;
  overflow: hidden !important;
}

body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) {
  width: 100% !important;
  min-width: 0 !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) th {
  height: 42px !important;
  padding: 0 14px !important;
  border-bottom: 1px solid rgba(221, 227, 236, .78) !important;
  background: rgba(247, 249, 252, .86) !important;
  color: #68758a !important;
  font-size: 12px !important;
  font-weight: 520 !important;
  text-align: left !important;
  letter-spacing: 0 !important;
}

body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) td {
  height: 54px !important;
  padding: 0 14px !important;
  border-bottom: 1px solid rgba(226, 231, 239, .72) !important;
  color: #253044 !important;
  font-size: 13px !important;
  vertical-align: middle !important;
}

body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) tr:last-child td {
  border-bottom: 0 !important;
}

body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) th:first-child,
body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) td:first-child {
  padding-left: 22px !important;
}

body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) th:last-child,
body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) td:last-child {
  padding-right: 22px !important;
}

body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) tbody tr:hover td {
  background: rgba(248, 250, 253, .82) !important;
}

body.erp-ui2 .erp-full-master-page :is(.ledger-main, .so) {
  color: #182235 !important;
  font-size: 13px !important;
  font-weight: 620 !important;
  line-height: 1.35 !important;
}

body.erp-ui2 .erp-full-master-page :is(.muted, .sku-code, .sp-muted, .return-note) {
  color: #8490a3 !important;
  font-size: 12px !important;
  font-weight: 430 !important;
}

body.erp-ui2 .erp-full-master-page :is(.actions, .personnel-actions) {
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
  white-space: nowrap !important;
  position: relative !important;
  z-index: 1 !important;
  pointer-events: auto !important;
}

body.erp-ui2 .erp-full-master-page :is(.action, .sp-action, .personnel-action) {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 28px !important;
  margin: 0 !important;
  padding: 0 1px !important;
  border: 0 !important;
  background: transparent !important;
  color: #536072 !important;
  font-size: 12px !important;
  font-weight: 520 !important;
  font-family: inherit !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 1 !important;
  appearance: none !important;
  transition: color 150ms ease, transform 150ms ease !important;
}

body.erp-ui2 .erp-full-master-page :is(.action, .sp-action, .personnel-action):hover {
  color: var(--full-master-accent) !important;
}

body.erp-ui2 .erp-full-master-page :is(.action, .sp-action, .personnel-action):active {
  transform: translateY(1px);
}

body.erp-ui2 .erp-full-master-page .pagination.table-pagination-footer {
  min-height: 58px !important;
  margin: 0 !important;
  padding: 0 22px !important;
  border-top: 1px solid rgba(221, 227, 236, .74) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  background: rgba(255, 255, 255, .78) !important;
}

body.erp-ui2 .erp-full-master-page .pagination .page-stat {
  margin-right: auto !important;
  color: #7f8a9d !important;
  font-size: 12px !important;
  font-weight: 460 !important;
}

body.erp-ui2 .erp-full-master-page .pagination :is(.page-controls, .page-actions) {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

body.erp-ui2 .erp-full-master-page .pagination :is(.page-icon, .page-number, .page-btn) {
  min-width: 32px !important;
  width: auto !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(218, 225, 235, .75) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .62) !important;
  color: #6d7889 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease !important;
}

body.erp-ui2 .erp-full-master-page .pagination .page-number.active {
  background: rgba(247, 249, 252, .94) !important;
  border-color: rgba(174, 188, 210, .72) !important;
  color: #1b2536 !important;
}

body.erp-ui2 .erp-full-master-page .pagination :is(.page-icon, .page-number, .page-btn):hover:not(:disabled) {
  background: rgba(255, 255, 255, .96) !important;
  border-color: rgba(196, 207, 223, .94) !important;
  color: #1d2637 !important;
}

body.erp-ui2 .erp-full-master-page .pagination :is(.page-icon, .page-number, .page-btn):active:not(:disabled) {
  transform: translateY(1px) !important;
}

body.erp-ui2 .erp-full-master-page .pagination :is(.page-icon, .page-btn):disabled {
  opacity: .42 !important;
  cursor: default !important;
}

body.erp-ui2 .erp-full-master-page :is(.search, .search-box) {
  height: var(--full-master-control-height) !important;
  min-height: var(--full-master-control-height) !important;
  display: inline-flex !important;
  align-items: center !important;
  width: min(390px, 34vw) !important;
  padding: 0 11px !important;
  border: 1px solid rgba(214, 222, 233, .86) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .66) !important;
  box-shadow: none !important;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease !important;
}

body.erp-ui2 .erp-full-master-page :is(.search, .search-box):focus-within {
  border-color: rgba(215, 19, 42, .18) !important;
  box-shadow: 0 0 0 2px rgba(215, 19, 42, .045) !important;
  background: rgba(255, 255, 255, .92) !important;
}

body.erp-ui2 .erp-full-master-page :is(.search-field, .search-input) {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #1e293b !important;
  font-size: 13px !important;
}

body.erp-ui2 :is(.erp-full-master-page, #finance) :is(.add-btn, .btn, .confirm, .compact-confirm, .primary-action-btn, .secondary-tool) {
  height: var(--full-master-control-height) !important;
  min-height: var(--full-master-control-height) !important;
  padding: 0 13px !important;
  border: 1px solid rgba(214, 222, 233, .86) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .66) !important;
  color: #344052 !important;
  font-size: 13px !important;
  font-weight: 540 !important;
  box-shadow: none !important;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease !important;
}

body.erp-ui2 :is(.erp-full-master-page, #finance) :is(.add-btn, .btn, .secondary-tool, .subtle-action):not(.primary-action):not(.primary-action-btn):not(.confirm):not(.compact-confirm):not(.danger):not(:disabled):hover,
body.erp-ui2 :is(.erp-full-master-page, #finance) :is(.btn-outline, .secondary-button):not(:disabled):hover {
  border: 1px solid rgba(215, 19, 42, .16) !important;
  background: linear-gradient(135deg, rgba(215, 19, 42, .045), rgba(255, 255, 255, .9), rgba(72, 130, 200, .035)) !important;
  color: #1d2637 !important;
  box-shadow: 0 8px 18px rgba(30, 41, 59, .045) !important;
  transform: translateY(-1px);
}

body.erp-ui2 :is(.erp-full-master-page, #finance) :is(.add-btn, .btn, .secondary-tool, .subtle-action):not(.primary-action):not(.primary-action-btn):not(.confirm):not(.compact-confirm):not(.danger):not(:disabled):active,
body.erp-ui2 :is(.erp-full-master-page, #finance) :is(.btn-outline, .secondary-button):not(:disabled):active {
  transform: translateY(0);
}

body.erp-ui2 :is(.erp-full-master-page, #finance) :is(.confirm, .compact-confirm, .primary-action-btn, .add-btn.primary-action):not(:disabled) {
  border-color: var(--full-master-accent) !important;
  background: var(--full-master-accent) !important;
  color: #fff !important;
}

body.erp-ui2 :is(.erp-full-master-page, #finance) :is(.confirm, .compact-confirm, .primary-action-btn, .add-btn.primary-action):not(:disabled):hover {
  border-color: #c70f24 !important;
  background: linear-gradient(135deg, #d7132a, #c70f24) !important;
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(215, 19, 42, .12) !important;
  transform: translateY(-1px);
}

body.erp-ui2 :is(.erp-full-master-page, #finance) :is(.confirm, .compact-confirm, .primary-action-btn, .add-btn.primary-action):not(:disabled):active {
  transform: translateY(0);
}

body.erp-ui2 .erp-full-master-page :is(input:not([type="checkbox"]):not([type="radio"]), textarea, .master-input, .form-input, .money-input, .note-field) {
  border-color: rgba(214, 222, 233, .86) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .72) !important;
  color: #1e293b !important;
  box-shadow: none !important;
}

body.erp-ui2 .erp-full-master-page :is(input:not([type="checkbox"]):not([type="radio"]), textarea, .master-input, .form-input, .money-input, .note-field):focus,
body.erp-ui2 .erp-full-master-page :is(.money-input, .note-field):focus-within {
  outline: 0 !important;
  border-color: rgba(215, 19, 42, .18) !important;
  box-shadow: 0 0 0 2px rgba(215, 19, 42, .045) !important;
}

body.erp-ui2 .erp-date-control {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-width: 0;
  height: var(--full-master-control-height);
  border-radius: 10px;
}

body.erp-ui2 .erp-date-control .erp-date-native {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: .01 !important;
  cursor: pointer !important;
}

body.erp-ui2 .erp-date-trigger {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(214, 222, 233, .86);
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
  color: #1f2a3c;
  font-size: 13px;
  font-weight: 520;
  line-height: 1;
  pointer-events: none;
}

body.erp-ui2 .erp-date-trigger svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: #8793a6;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.erp-ui2 .erp-date-trigger [data-date-value] {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2d384b;
}

body.erp-ui2 .erp-date-trigger .erp-date-chevron {
  width: 13px;
  height: 13px;
}

body.erp-ui2 .erp-date-control:hover .erp-date-trigger,
body.erp-ui2 .erp-date-control:focus-within .erp-date-trigger {
  border-color: rgba(215, 19, 42, .18);
  background: rgba(255, 255, 255, .94);
}

body.erp-ui2 .erp-date-control:focus-within .erp-date-trigger {
  box-shadow: 0 0 0 2px rgba(215, 19, 42, .045);
}

body.erp-ui2 .erp-full-master-page :is(.customer-kpi-strip, .stock-process-kpi-strip, .return-kpi-strip, .batch2-summary-strip) {
  border-color: var(--full-master-border) !important;
  border-radius: var(--full-master-radius) !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.erp-ui2 .erp-dashboard-master-page :is(.home-panel, .chart-card, .finance-card) {
  border: 1px solid var(--full-master-border) !important;
  border-radius: var(--full-master-radius) !important;
  background: var(--full-master-surface) !important;
  box-shadow: 0 14px 34px rgba(28, 31, 35, .03) !important;
}

body.erp-ui2 #globalModal.detail-master-modal .modal-panel,
body.erp-ui2 #paymentModal .modal-panel {
  border-color: var(--full-master-border) !important;
  border-radius: 14px 0 0 14px !important;
  background: #fff !important;
}

body.erp-ui2 #globalModal.detail-master-modal #modalBody,
body.erp-ui2 #paymentModal #paymentBody {
  background: #fff !important;
}

body.erp-ui2 #globalModal.detail-master-modal :is(.detail-master-section, .modal-grid),
body.erp-ui2 #paymentModal :is(.detail-master-section, .modal-grid) {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body.erp-ui2 #globalModal.detail-master-modal .detail-master-section + .detail-master-section,
body.erp-ui2 #globalModal.detail-master-modal .detail-compact-section + .detail-compact-section {
  margin-top: 18px !important;
  padding-top: 17px !important;
  border-top: 1px solid var(--full-master-divider) !important;
}

body.erp-ui2 #globalModal.detail-master-modal .detail-card {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.erp-ui2 #globalModal.detail-master-modal .detail-card b {
  margin: 0 0 5px !important;
  color: #7f8a9d !important;
  font-size: 12px !important;
  font-weight: 560 !important;
}

body.erp-ui2 #globalModal.detail-master-modal .detail-card span,
body.erp-ui2 #globalModal.detail-master-modal .detail-card div {
  color: #1f2a3c !important;
  font-size: 13px !important;
  font-weight: 580 !important;
}

@media (max-width: 1366px) {
  body.erp-ui2 .erp-full-master-page :is(.product-page-header, .history-head, .items-head) {
    gap: 10px;
  }

  body.erp-ui2 .erp-full-master-page :is(.product-page-header .master-toolbar, .history-head .search, .history-head .master-toolbar, .history-head .salespeople-toolbar, .stock-process-filterbar, .return-filterbar, .batch2-ltrcms-toolbar, .items-head > button) {
    gap: 8px;
  }

  body.erp-ui2 .erp-full-master-page :is(.search, .search-box) {
    width: min(320px, 28vw) !important;
  }

  body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) th,
  body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) td {
    padding-left: 11px !important;
    padding-right: 11px !important;
  }

  body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) th:first-child,
  body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) td:first-child {
    padding-left: 18px !important;
  }

  body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) th:last-child,
  body.erp-ui2 .erp-full-master-page :is(.history-table, .master-table, .erp-master-ledger-table) td:last-child {
    padding-right: 18px !important;
  }
}
