.bom-page-title-probe {
  display: none;
}

.bom-management-page .workspace-card__body {
  padding-top: 14px;
}

.bom-two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 14px;
  align-items: start;
}

.bom-two-column > .section-card + .section-card {
  margin-top: 0;
}

.bom-pane.section-card {
  display: grid;
  grid-template-rows: 62px 60px minmax(0, 1fr);
  align-self: start;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.bom-pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  height: 62px;
  padding: 10px 18px;
  background: linear-gradient(90deg, #5a7dff 0%, #4d72ef 100%);
  box-sizing: border-box;
}

.bom-pane__head > * {
  min-width: 0;
}

.bom-pane__title {
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.bom-pane__search {
  flex: 0 0 220px;
  min-width: 220px;
}

.bom-pane__search input {
  min-height: 32px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.18);
}

.bom-pane__search input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.bom-pane__search .search-shell__icon {
  color: rgba(255, 255, 255, 0.88);
}

.bom-pane__toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  height: 60px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid #eef1f7;
  background: #fff;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
  scrollbar-gutter: stable both-edges;
}

.bom-pane__table-shell {
  border: 0;
  border-radius: 0;
  min-height: 0;
}

.bom-pane__toolbar .tool-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.bom-pane__toolbar::-webkit-scrollbar {
  height: 8px;
}

.selection-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #d5dbea;
  color: #a5afc6;
  background: #fff;
  font-size: 12px;
  line-height: 1;
}

.selection-mark--header {
  background: #eef2fb;
}

.selection-mark--selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.bom-master-table thead th:nth-child(1),
.bom-master-table tbody td:nth-child(1),
.bom-detail-table thead th:nth-child(1),
.bom-detail-table tbody td:nth-child(1) {
  width: 58px;
  text-align: center;
}

.bom-master-table thead th:nth-child(2) {
  min-width: 220px;
}

.bom-master-table thead th:nth-child(3) {
  min-width: 180px;
}

.bom-master-table thead th:nth-child(4) {
  min-width: 140px;
}

.bom-master-table thead th:nth-child(5) {
  min-width: 140px;
}

.bom-detail-table thead th:nth-child(2),
.bom-detail-table tbody td:nth-child(2) {
  width: 66px;
  text-align: center;
}

.bom-detail-table thead th:nth-child(3) {
  min-width: 170px;
}

.bom-detail-table thead th:nth-child(4) {
  min-width: 180px;
}

.bom-detail-table thead th:nth-child(5) {
  min-width: 150px;
}

.bom-detail-table thead th:nth-child(6) {
  min-width: 130px;
}

.bom-detail-table thead th:nth-child(7) {
  min-width: 100px;
}

.bom-detail-table thead th:nth-child(8) {
  min-width: 100px;
}

.drawer__panel--bom {
  width: min(780px, 100%);
}

.drawer__panel--bom-item {
  width: min(800px, 100%);
}

.bom-form,
.bom-item-form {
  display: grid;
  gap: 18px;
}

.bom-form .form-row,
.bom-item-form .form-row {
  grid-template-columns: 106px 1fr;
}

.bom-note textarea {
  min-height: 110px;
}

.bom-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.bom-picker__value {
  display: grid;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.bom-picker__placeholder {
  color: var(--color-text-faint);
}

.bom-picker__meta {
  color: #74809a;
  font-size: 13px;
}

.bom-picker__button {
  min-width: 84px;
  padding: 0 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--color-primary);
}

.bom-picker__button:hover {
  border-color: rgba(85, 118, 255, 0.45);
}

.bom-selector-modal {
  z-index: 96;
}

.bom-selector-modal__panel {
  width: min(920px, calc(100vw - 48px));
  margin-top: 72px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.bom-selector-modal__toolbar {
  margin-bottom: 12px;
}

.bom-selector-modal__table-shell {
  min-height: 400px;
}

.bom-selector-table thead th:nth-child(1),
.bom-selector-table tbody td:nth-child(1) {
  width: 58px;
  text-align: center;
}

.bom-selector-table thead th:nth-child(2) {
  min-width: 220px;
}

.bom-selector-table thead th:nth-child(3) {
  min-width: 160px;
}

.bom-selector-table thead th:nth-child(4) {
  min-width: 220px;
}

.bom-selector-table thead th:nth-child(5) {
  min-width: 120px;
}

.bom-selector-row.is-disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.bom-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.bom-tag--free {
  background: rgba(79, 188, 127, 0.14);
  color: #2e8c59;
}

.bom-tag--occupied {
  background: rgba(245, 117, 117, 0.14);
  color: #c24e4e;
}

.bom-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 4px 0 2px;
}

.bom-summary__item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
}

.bom-summary__label {
  color: #4e5974;
  font-size: 14px;
  font-weight: 600;
}

.bom-summary__value {
  color: #2f3850;
  font-size: 14px;
}

.bom-item-form input[readonly] {
  background: #f7f9fc;
  color: #566178;
}

.bom-empty {
  color: var(--color-text-faint);
  text-align: center;
}

@media (max-width: 1220px) {
  .bom-two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .bom-pane__head {
    flex-direction: column;
    align-items: stretch;
    height: auto;
  }

  .bom-pane__search {
    min-width: 0;
  }

  .bom-form .form-row,
  .bom-item-form .form-row {
    grid-template-columns: 1fr;
  }

  .bom-picker {
    grid-template-columns: 1fr;
  }

  .bom-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bom-selector-modal__panel {
    width: calc(100vw - 20px);
    margin-top: 20px;
  }
}
