body.omnidata-v7 .bom-page {
  display: grid;
  gap: 10px;
  padding: 0 0 18px;
}

body.omnidata-v7 .bom-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  margin: 0 -14px;
  padding: 12px 18px 10px;
  border: 0;
  border-bottom: 1px solid var(--od7-line);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(33, 35, 52, .025);
}

body.omnidata-v7 .bom-header > div:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

body.omnidata-v7 .bom-header .eyebrow {
  order: 2;
  margin: 0;
  color: #8a90a0;
  font-size:11px;
  font-weight: 650;
  letter-spacing: .05em;
  white-space: nowrap;
}

body.omnidata-v7 .bom-header h1 {
  order: 1;
  margin: 0;
  color: #2a2e3b;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.01em;
}

body.omnidata-v7 .bom-header .muted {
  order: 3;
  flex: 1 1 auto;
  margin: 0;
  overflow: hidden;
  color: #777e8d;
  font-size:11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.omnidata-v7 .bom-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

body.omnidata-v7 .bom-header-actions .primary,
body.omnidata-v7 .bom-header-actions .secondary,
body.omnidata-v7 .bom-inspector-actions .primary,
body.omnidata-v7 .bom-inspector-actions .secondary,
body.omnidata-v7 .bom-modal-actions .primary,
body.omnidata-v7 .bom-modal-actions .secondary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border-radius: 5px;
  font-family: inherit;
  font-size:11px;
  font-weight: 600;
  cursor: pointer;
}

body.omnidata-v7 .bom-header-actions .primary,
body.omnidata-v7 .bom-inspector-actions .primary,
body.omnidata-v7 .bom-modal-actions .primary {
  border: 1px solid var(--od7-accent);
  color: #fff;
  background: linear-gradient(180deg, #6742d8, #5934c7);
  box-shadow: 0 2px 6px rgba(79, 45, 184, .14);
}

body.omnidata-v7 .bom-header-actions .secondary,
body.omnidata-v7 .bom-inspector-actions .secondary,
body.omnidata-v7 .bom-modal-actions .secondary {
  border: 1px solid #dfe1e7;
  color: #545b68;
  background: #fff;
}

body.omnidata-v7 .bom-kpis {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 1px;
}

body.omnidata-v7 .bom-kpi {
  min-width: 142px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #e3e4ea;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(30, 32, 45, .025);
}

body.omnidata-v7 .bom-kpi span {
  color: #59606d;
  font-size:11px;
  white-space: nowrap;
}

body.omnidata-v7 .bom-kpi strong {
  margin-left: auto;
  color: var(--od7-accent);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

body.omnidata-v7 .bom-tabs {
  width: auto;
  min-height: 43px;
  display: flex;
  align-items: stretch;
  gap: 28px;
  margin: 0 -14px;
  padding: 0 18px;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid #e6e7ed;
  border-radius: 0;
  background: #fff;
}

body.omnidata-v7 .bom-tabs button {
  position: relative;
  min-height: 43px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #4f5664;
  background: transparent;
  font-family: inherit;
  font-size:11px;
  font-weight: 500;
  box-shadow: none;
  cursor: pointer;
}

body.omnidata-v7 .bom-tabs button.active {
  color: var(--od7-accent);
  background: transparent;
  font-weight: 600;
  box-shadow: none;
}

body.omnidata-v7 .bom-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--od7-accent);
}

body.omnidata-v7 .bom-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 455px);
  gap: 10px;
  align-items: stretch;
}

body.omnidata-v7 .bom-table-wrap {
  min-height: 590px;
  overflow: auto;
  border: 1px solid #e4e5eb;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--od7-panel-shadow);
}

body.omnidata-v7 .bom-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  table-layout: auto;
}

body.omnidata-v7 .bom-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

body.omnidata-v7 .bom-table th {
  height: 39px;
  padding: 0 11px;
  border-bottom: 1px solid #e2e4ea;
  color: #6f7582;
  background: #fafafe;
  font-size:11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

body.omnidata-v7 .bom-table td {
  height: 72px;
  padding: 9px 11px;
  border-bottom: 1px solid #ececf1;
  color: #505765;
  font-size:11px;
  line-height: 1.35;
}

body.omnidata-v7 .bom-table tbody tr:hover {
  background: #fbfbfe;
}

body.omnidata-v7 .bom-table tbody tr.selected {
  background: var(--od7-selected);
  box-shadow: inset 2px 0 0 var(--od7-accent);
}

body.omnidata-v7 .bom-table td strong {
  color: #262b38;
  font-weight: 600;
}

body.omnidata-v7 .bom-table td small {
  margin-top: 2px;
  color: #8b919e;
  font-size:11px;
}

body.omnidata-v7 .bom-readiness {
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.omnidata-v7 .bom-progress-track {
  height: 5px;
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e8ed;
}

body.omnidata-v7 .bom-progress-value {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--od7-accent);
}

body.omnidata-v7 .bom-readiness strong {
  min-width: 29px;
  color: #575e6d;
  font-size:11px;
  text-align: right;
}

body.omnidata-v7 .bom-badge {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  max-width: 190px;
  padding: 0 8px;
  border-radius: 4px;
  font-size:11px;
  font-weight: 550;
  line-height: 1;
}

body.omnidata-v7 .bom-ok,
body.omnidata-v7 .bom-low {
  color: #22865d;
  background: #ebf8f2;
}

body.omnidata-v7 .bom-neutral {
  color: #656c79;
  background: #f0f1f4;
}

body.omnidata-v7 .bom-medium {
  color: #a66d1d;
  background: #fff5e5;
}

body.omnidata-v7 .bom-high {
  color: #b45d30;
  background: #fff0e8;
}

body.omnidata-v7 .bom-critical {
  color: #b3424d;
  background: #fff0f2;
}

body.omnidata-v7 .bom-inspector {
  min-width: 0;
  max-height: calc(100vh - 118px);
  position: sticky;
  top: 69px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: auto;
  border: 1px solid #e4e5eb;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--od7-panel-shadow);
}

body.omnidata-v7 .bom-inspector-head {
  min-height: 92px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid #e8e8ee;
}

body.omnidata-v7 .bom-inspector .eyebrow {
  margin: 0;
  color: #626978;
  font-size:11px;
  font-weight: 600;
  letter-spacing: .055em;
}

body.omnidata-v7 .bom-inspector h2 {
  margin: 6px 0 0;
  color: #272b38;
  font-size: 15px;
  font-weight: 650;
}

body.omnidata-v7 .bom-inspector h3 {
  margin: 0;
  padding: 12px 14px 7px;
  color: #343946;
  font-size:11px;
  font-weight: 650;
}

body.omnidata-v7 .bom-inspector-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

body.omnidata-v7 .bom-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid #e8e8ee;
}

body.omnidata-v7 .bom-summary > div {
  min-height: 55px;
  display: block;
  padding: 9px 10px;
  border: 1px solid #e7e8ed;
  border-radius: 5px;
  background: #fff;
}

body.omnidata-v7 .bom-summary dt,
body.omnidata-v7 .bom-cost-card dt {
  margin-bottom: 4px;
  color: #858b97;
  font-size:11px;
  font-weight: 500;
}

body.omnidata-v7 .bom-summary dd,
body.omnidata-v7 .bom-cost-card dd {
  margin: 0;
  color: #313642;
  font-size:11px;
  font-weight: 550;
}

body.omnidata-v7 .bom-line-list,
body.omnidata-v7 .bom-risk-list {
  display: grid;
  gap: 6px;
  padding: 0 14px 12px;
}

body.omnidata-v7 .bom-line-view,
body.omnidata-v7 .bom-risk {
  padding: 9px 10px;
  border: 1px solid #e7e8ed;
  border-radius: 5px;
  background: #fff;
}

body.omnidata-v7 .bom-line-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
}

body.omnidata-v7 .bom-line-view strong {
  grid-column: 1 / -1;
  color: #303542;
  font-size:11px;
}

/* The component name moved into a .bom-line-head wrapper (name + «основной» badge), so the rule above no longer reached it and the wrapper
   sat in the first narrow grid column, printing the badge over the material code. The wrapper spans the row, as the name did. */
body.omnidata-v7 .bom-line-view > .bom-line-head {
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

body.omnidata-v7 .bom-line-view .bom-line-head strong {
  color: #303542;
  font-size:11px;
}

body.omnidata-v7 .bom-line-view span,
body.omnidata-v7 .bom-risk span {
  color: #5f6673;
  font-size:11px;
}

body.omnidata-v7 .bom-cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}

body.omnidata-v7 .bom-cost-card {
  padding: 13px;
  border: 1px solid #e4e5eb;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--od7-panel-shadow);
}

body.omnidata-v7 .bom-cost-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.omnidata-v7 .bom-cost-card dl {
  display: grid;
  gap: 0;
  margin: 10px 0 0;
}

body.omnidata-v7 .bom-cost-card dl > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #eceef2;
  border-radius: 0;
  background: transparent;
}

body.omnidata-v7 .bom-load-more {
  min-height: 32px;
  margin-top: 8px;
  border-radius: 5px;
  font-size:11px;
}

body.omnidata-v7 .bom-error {
  padding: 10px 12px;
  border: 1px solid #f0ced3;
  border-radius: 5px;
  color: #a33b46;
  background: #fff2f4;
  font-size:11px;
}

body.omnidata-v7 .bom-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 26, 45, .48);
  backdrop-filter: blur(2px);
}

body.omnidata-v7 .bom-modal {
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  gap: 14px;
  padding: 18px;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(17, 26, 45, .26);
}

body.omnidata-v7 .bom-modal-head,
body.omnidata-v7 .bom-editor-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.omnidata-v7 .bom-modal-head h2 {
  margin: 4px 0 0;
  font-size: 16px;
}

body.omnidata-v7 .bom-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.omnidata-v7 .bom-field {
  display: grid;
  gap: 5px;
  color: #5b6372;
  font-size:11px;
  font-weight: 600;
}

body.omnidata-v7 .bom-field input,
body.omnidata-v7 .bom-field select,
body.omnidata-v7 .bom-field textarea {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #dfe1e8;
  border-radius: 5px;
  color: #343946;
  background: #fff;
  font: inherit;
}

body.omnidata-v7 .bom-editor-lines {
  display: grid;
  gap: 8px;
}

body.omnidata-v7 .bom-editor-line {
  display: grid;
  grid-template-columns: 100px minmax(160px, 1.1fr) minmax(190px, 1.3fr) 100px 90px 90px auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid #e2e4ea;
  border-radius: 6px;
  background: #fafbfc;
}

body.omnidata-v7 .bom-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid #eceef2;
}

body.omnidata-v7 .danger-link {
  border: 0;
  color: #b3424d;
  background: transparent;
  font-size:11px;
}

body.omnidata-v7 .icon-button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  color: #626a78;
  background: #f0f1f4;
  font-size: 18px;
}

@media (max-width: 1260px) {
  body.omnidata-v7 .bom-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 400px);
  }

  body.omnidata-v7 .bom-editor-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body.omnidata-v7 .bom-layout {
    grid-template-columns: 1fr;
  }

  body.omnidata-v7 .bom-inspector {
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  body.omnidata-v7 .bom-header {
    grid-template-columns: 1fr;
    padding-inline: 12px;
  }

  body.omnidata-v7 .bom-header > div:first-child {
    display: grid;
    gap: 4px;
  }

  body.omnidata-v7 .bom-header .muted {
    white-space: normal;
  }

  body.omnidata-v7 .bom-kpis {
    grid-column: auto;
  }

  body.omnidata-v7 .bom-summary,
  body.omnidata-v7 .bom-editor-grid,
  body.omnidata-v7 .bom-editor-line {
    grid-template-columns: 1fr;
  }

  body.omnidata-v7 .bom-modal-overlay {
    padding: 0;
  }

  body.omnidata-v7 .bom-modal {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}
