
.po-info-top {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 6px 28px 8px;
  border-top: 2px solid #c80020;
  background: #f4f4f4;
}

.po-actions {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

#poCreateCatalogueGroupButton {
  white-space: nowrap;
}

.po-body {
  padding: 0 28px 24px;
}

.po-layout {
  display: grid;
  grid-template-columns: 1fr 490px 206px;
  gap: 14px;
  align-items: start;
}

.amount-row {
  display: grid;
  grid-template-columns: 86px 120px 34px 70px 78px 1fr;
  gap: 4px;
  align-items: center;
  margin-top: 6px;
}

.item-qty-panel {
  margin-top: 8px;
  border: 1px solid #aeb7c4;
  background: #ffffff;
  min-height: 340px;
  padding: 0 8px;
}

.item-qty-title {
  margin: 0 0 14px;
  padding-top: 2px;
  text-align: center;
  font-size: 18px;
  font-weight: 400;
}

.po-qty-table {
  min-width: 1360px;
}

.po-qty-table th:nth-child(1),
.po-qty-table td:nth-child(1) {
  width: 48px;
  text-align: center;
}

.po-qty-table th:nth-child(3),
.po-qty-table td:nth-child(3),
.po-qty-table th:nth-child(4),
.po-qty-table td:nth-child(4),
.po-qty-table th:nth-child(5),
.po-qty-table td:nth-child(5) {
  width: 100px;
}

.po-qty-table th:nth-child(n+6):nth-child(-n+10),
.po-qty-table td:nth-child(n+6):nth-child(-n+10) {
  width: 64px;
}

.po-qty-table th:nth-child(12),
.po-qty-table td:nth-child(12) {
  width: 104px;
  text-align: center;
}


.po-qty-table .ts-wrapper {
  width: 100%;
}

.po-qty-table .ts-control,
.po-qty-table .ts-control input,
.po-qty-table .ts-dropdown,
.po-qty-dropdown {
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

.po-qty-table .ts-control {
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 6px;
  background: transparent;
  box-shadow: none;
  cursor: text;
}

.po-qty-table .ts-control:focus-within {
  border-color: #8ba9df;
  background: #ffffff;
  outline: 2px solid rgba(23, 67, 108, 0.14);
}

.po-qty-table .ts-control input {
  min-height: unset;
  border: 0;
  padding: 0;
  background: transparent;
}

.po-qty-table .ts-control .item {
  font-size: inherit;
  font-family: inherit;
  font-weight: 700;
  line-height: inherit;
}

.po-qty-table .ts-dropdown,
.po-qty-dropdown {
  z-index: 9999;
  border: 1px solid #bdd5df;
  border-radius: 6px;
}

.po-qty-table .ts-dropdown .option,
.po-qty-dropdown .option {
  padding: 4px 8px;
}

.po-qty-table .ts-dropdown .option:hover,
.po-qty-table .ts-dropdown .option.active,
.po-qty-dropdown .option:hover,
.po-qty-dropdown .option.active {
  background: #eaf3f7;
  color: inherit;
}

.po-qty-amount {
  text-align: right;
}

.po-qty-amount {
  color: #1f2937;
  font-weight: 700;
}

.po-qty-new-row {
  background: #f7fbfb;
}

.po-qty-state {
  font-size: 11px;
  text-align: center;
}

.po-qty-actions {
  text-align: center;
  white-space: nowrap;
}

.po-qty-delete {
  min-width: 28px;
  min-height: 22px;
  padding: 1px 4px;
}

.po-qty-actions .po-qty-state {
  display: block;
}

@media (max-width: 430px) {
.po-info-top,
.po-layout,
.amount-row {
    display: block;
  }
}

.po-info-screen {
  border: 1px solid rgba(31, 111, 139, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(22, 34, 42, 0.12);
  overflow: hidden;
}

.po-info-screen {
  width: min(100%, 1180px);
}

.po-info-top {
  background: linear-gradient(135deg, #ffffff 0%, #eef7f7 100%);
  border-top: 0;
  border-bottom: 1px solid rgba(31, 111, 139, 0.12);
  padding: 18px;
}

.po-body {
  padding: 20px;
}

.item-qty-panel {
  border-color: rgba(31, 111, 139, 0.14);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(22, 34, 42, 0.05);
}

@media (max-width: 1000px) {
.po-info-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
.po-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
.amount-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1000px) {
.po-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.po-info-top {
  position: relative;
}

.po-info-top {
  padding-right: 72px;
}

.po-info-top .exit-button {
  position: absolute;
  top: 16px;
  right: 16px;
  margin: 0;
}

@media (max-width: 1000px) {
.po-actions {
    padding-top: 48px;
  }
}

@media (max-width: 640px) {
.po-info-top {
    padding: 16px;
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
}

@media (max-width: 640px) {
.po-info-top .exit-button {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin-left: auto;
  }

  .po-info-screen,
  .po-info-top,
  .po-body,
  .po-layout,
  .po-left,
  .po-right,
  .po-amounts,
  .po-form-grid,
  .item-qty-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .po-info-top > *,
  .po-layout,
  .po-left,
  .po-right,
  .po-amounts,
  .po-form-grid,
  .amount-row {
    grid-template-columns: 1fr !important;
  }

  .po-actions {
    padding-top: 0;
    width: 100%;
  }

  .po-info-top .profile-meta {
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .po-info-top input,
  .po-info-top select,
  .po-info-top textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  .po-body {
    padding: 10px;
    overflow-x: hidden;
  }

  .po-body input,
  .po-body select,
  .po-body textarea,
  .po-body .ts-wrapper,
  .po-body .ts-control {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  .item-qty-panel,
  .po-qty-grid-wrap {
    overflow-x: auto;
  }
}


.po-qty-control {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid transparent;
  background: transparent;
  padding: 2px 6px;
  font: inherit;
}

.po-qty-control:focus {
  border-color: #8ba9df;
  background: #ffffff;
  outline: 2px solid rgba(23, 67, 108, 0.14);
}.po-qty-number {
  text-align: right;
}

.po-qty-add-button {
  min-height: 30px;
  padding: 4px 8px;
}


.carton-tag-panel {
  width: min(1040px, 96vw);
}

.carton-tag-wrap {
  max-height: 62vh;
  margin-top: 8px;
}

.po-report-panel {
  width: min(1320px, 96vw);
}

.po-report-wrap {
  max-height: 60vh;
  margin-top: 8px;
}

.po-report-table {
  min-width: 1100px;
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.po-report-table th,
.po-report-table td {
  border-bottom: 1px solid #d6dde3;
  padding: 4px 6px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.po-report-table th {
  background: #eef3f7;
  color: #001b2e;
  font-weight: 700;
}


.po-report-table th:nth-child(1),
.po-report-table td:nth-child(1) {
  width: 84px;
}


.po-report-table th:nth-child(2),
.po-report-table td:nth-child(2) {
  min-width: 200px;
  white-space: normal;
}


.po-report-table th:nth-child(4),
.po-report-table td:nth-child(4) {
  width: 64px;
}


.po-report-table th:nth-child(10),
.po-report-table td:nth-child(10) {
  width: 40px;
  text-align: center;
}

.po-report-toolbar select {
  max-width: 140px;
}

.po-report-po-no {
  font-size: 0.7em;
  font-weight: 600;
  color: #345;
}

.po-shipping-confirm-panel {
  max-width: 460px;
  width: 100%;
}

.po-shipping-confirm-body {
  margin: 8px 0 14px;
  font-size: 13.5px;
}

.po-shipping-confirm-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 2px;
  border-bottom: 1px solid #e6ebf1;
}

.po-shipping-confirm-label {
  color: #34495e;
  font-weight: 600;
}

.po-shipping-confirm-value {
  color: #1f3a5f;
  text-align: right;
}

#poShippingModal .po-shipping-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#poShippingModal .po-shipping-header h2 {
  margin: 0;
}

#poShippingModal .po-shipping-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#poShippingModal #closePoShipping {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0 0 0 4px;
  align-self: center;
}

#poShippingModal .po-report-toolbar {
  align-items: center;
  gap: 8px;
}

#poShippingModal .po-report-toolbar label {
  font-size: 13px;
  font-weight: 600;
  color: #34495e;
  white-space: nowrap;
}

#poShippingModal #poShippingFromWarehouse {
  font-size: 13px;
  font-weight: 600;
  color: #1f6feb;
  white-space: nowrap;
}

#poShippingModal .po-report-toolbar input[type="search"],
#poShippingModal .po-report-toolbar select {
  font-size: 13px;
  height: 30px;
}

.po-report-mode-hint {
  font-size: 12px;
  color: #6a7785;
  font-style: italic;
}

.po-report-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
  padding: 6px 10px;
  background: #eef4f8;
  border: 1px solid #cdd9e2;
  border-radius: 8px;
  font-size: 13px;
}

.carton-tag-table {
  min-width: 900px;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.carton-tag-table th,
.carton-tag-table td {
  border-bottom: 1px solid #d6dde3;
  padding: 4px 6px;
  text-align: left;
  vertical-align: middle;
}

.carton-tag-table th {
  background: #eef3f7;
  color: #001b2e;
  font-weight: 700;
}

.carton-tag-table th:nth-child(1),
.carton-tag-table td:nth-child(1) {
  width: 54px;
  text-align: center;
}

.carton-tag-table th:nth-child(2),
.carton-tag-table td:nth-child(2),
.carton-tag-table th:nth-child(4),
.carton-tag-table td:nth-child(4) {
  width: 130px;
}

.carton-tag-table th:nth-child(5),
.carton-tag-table td:nth-child(5),
.carton-tag-table th:nth-child(6),
.carton-tag-table td:nth-child(6) {
  width: 150px;
}
