:root {
  --bp-blue: #2f6fb2;
  --bp-blue-soft: #eaf2fb;
  --bp-amber: #b87816;
  --bp-amber-soft: #fff3df;
  --bp-red: #b94a43;
  --bp-red-soft: #fcebea;
  --bp-cyan: #217b82;
}

.blueprint-body {
  background: #f2f5f3;
}

.bp-title-with-tip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bp-title-with-tip h1,
.bp-title-with-tip h2,
.bp-title-with-tip strong {
  min-width: 0;
}

.bp-info-tip {
  position: relative;
  z-index: 60;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #49ad42;
  color: #fff;
  cursor: help;
}

.bp-info-tip::before {
  content: "i";
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.bp-info-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 200;
  top: calc(100% + 7px);
  left: -8px;
  width: max-content;
  max-width: min(300px, calc(100vw - 32px));
  padding: 7px 9px;
  border-radius: 5px;
  background: #173d30;
  color: #fff;
  box-shadow: 0 8px 24px rgba(13, 36, 27, .18);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.bp-info-tip:hover::after,
.bp-info-tip:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bp-info-tip:focus-visible {
  outline: 2px solid #a9d9bd;
  outline-offset: 2px;
}

.blueprint-body .app-shell {
  grid-template-rows: 48px 44px 1fr;
}

.blueprint-body .global-bar {
  grid-template-columns: 164px minmax(220px, 1fr) auto;
}

.bp-product-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.bp-product-title strong { color: #20342c; font-size: 15px; }
.bp-product-title span { color: var(--muted); font-size: 12px; }

.bp-language-switch {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f2f5f3;
}
.bp-language-switch button {
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.bp-language-switch button.active { background: #fff; color: var(--green-2); }

.bp-header-project { width: 210px; min-width: 210px; }

.bp-flow-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 18px 0 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.bp-flow-tools { min-width: 0; display: flex; align-items: center; gap: 7px; }
.bp-flow-tools .select { min-width: 130px; }
.bp-global-tools { display: inline-flex; align-items: center; gap: 5px; }
.bp-global-tools .btn { gap: 5px; }
.bp-global-tools .btn span { color: var(--green-2); font-size: 14px; }
.bp-global-tools .btn.active { background: var(--green-soft); color: var(--green-2); }

.bp-flow {
  min-width: 0;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
}

.bp-flow a {
  position: relative;
  flex: 0 0 auto;
  min-width: 108px;
  height: 43px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: var(--muted);
  font-weight: 720;
  white-space: nowrap;
}

.bp-module-tabs {
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.bp-module-tabs nav { min-width: 0; display: flex; align-items: end; overflow-x: auto; scrollbar-width: thin; }
.bp-module-tabs nav button {
  flex: 0 0 auto;
  height: 39px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
  white-space: nowrap;
}
.bp-module-tabs nav button.active { border-color: var(--green); color: var(--green-2); }
.bp-cost-tabs nav { flex-wrap: nowrap; align-content: center; overflow-x: auto; }
.bp-cost-tabs nav button { height: 30px; }
.bp-module-tab-actions { height: 39px; display: flex; align-items: center; gap: 6px; }
.bp-module-panel-stack { display: grid; gap: 8px; }
.bp-module-panel-shell { display: grid; gap: 8px; }
.bp-action-strip { min-height: 40px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 8px; padding: 0 10px; background: #fff; }

.bp-tool-panel { min-height: 360px; background: #fff; }
.bp-tool-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.bp-inline-actions { display: flex; align-items: center; gap: 6px; }
.bp-tool-toolbar > div:first-child strong { display: block; font-size: 12px; }
.bp-tool-toolbar > div:first-child span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.bp-tool-filters { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-bottom: 1px solid #e7edea; }
.bp-tool-filters .input { min-width: 0; flex: 1; }
.bp-tool-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: #e3eae6; }
.bp-tool-metrics div { min-height: 58px; padding: 10px 12px; background: #fff; }
.bp-tool-metrics span { color: var(--muted); font-size: 12px; }
.bp-tool-metrics strong { display: block; margin-top: 5px; font-size: 16px; }
.good { color: var(--green-2) !important; }
.warn { color: var(--bp-amber) !important; }
.bad { color: var(--bp-red) !important; }

.bp-flow a + a::before {
  content: "";
  position: absolute;
  left: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid #aebcb5;
  border-right: 1px solid #aebcb5;
  transform: rotate(45deg);
}

.bp-flow b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf1ef;
  color: #738079;
  font-size: 12px;
}

.bp-flow a.done { color: #315f4c; }
.bp-flow a.done b { background: var(--green-soft); color: var(--green-2); }
.bp-flow a.active { color: var(--green-2); }
.bp-flow a.active::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 2px;
  background: var(--green);
}
.bp-flow a.active b { background: var(--green); color: #fff; }

.bp-live-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.bp-live-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2d9b69;
  box-shadow: 0 0 0 3px #e4f4ec;
}

.bp-page {
  min-height: 0;
  padding: 12px 18px 28px;
  overflow: auto;
}

.bp-compact-head {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  padding: 0 12px;
  border-radius: 7px;
  background: #fff;
}

.bp-compact-head h1 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}

.bp-compact-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.bp-metrics-inline {
  display: flex;
  align-items: center;
  min-width: 0;
}

.bp-metrics-inline span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 18px;
  white-space: nowrap;
}

.bp-metrics-inline span + span { border-left: 1px solid #e3eae6; }
.bp-metrics-inline strong { color: #193e31; font-size: 17px; }
.bp-metrics-inline em { color: var(--muted); font-size: 12px; font-style: normal; }

.bp-band {
  border-radius: 7px;
  background: #fff;
}

.bp-band-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 12px;
  border-bottom: 1px solid #e6ece9;
}

.bp-band-head h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

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

.bp-segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: #edf2ef;
}

.bp-segmented button {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.bp-segmented button.active {
  background: #fff;
  color: var(--green-2);
  box-shadow: 0 1px 4px rgba(23, 50, 38, .1);
}

/* Project entry */
.bp-project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 10px;
}

.bp-project-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
}

.bp-project-toolbar .input { width: 250px; }

.bp-project-table {
  width: 100%;
  border-collapse: collapse;
}

.bp-project-table th {
  height: 34px;
  padding: 0 12px;
  background: #f7f9f8;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

.bp-project-table td {
  height: 66px;
  padding: 8px 12px;
  border-top: 1px solid #edf1ef;
  vertical-align: middle;
}

.bp-project-table tbody tr:hover { background: #f7fbf9; }
.bp-project-name { display: grid; gap: 4px; }
.bp-project-name a { color: #176d4a; font-size: 13px; font-weight: 800; }
.bp-project-name span, .bp-subtext { color: var(--muted); font-size: 12px; }

.bp-progress {
  width: 120px;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7ece9;
}

.bp-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.bp-progress-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.bp-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.bp-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a5b0aa;
}

.bp-status.building::before { background: var(--bp-blue); }
.bp-status.costing::before { background: var(--bp-amber); }
.bp-status.ready::before { background: var(--green); }

.bp-guide-list { padding: 8px 12px 12px; }
.bp-guide-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 0;
}
.bp-guide-item + .bp-guide-item { border-top: 1px solid #edf1ef; }
.bp-guide-item b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-2);
  font-size: 12px;
}
.bp-guide-item strong { display: block; font-size: 12px; }
.bp-guide-item span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.bp-modal-backdrop {
  position: fixed;
  z-index: 20000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(16, 28, 22, .42);
}

.bp-modal {
  width: min(720px, calc(100vw - 48px));
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(12, 29, 20, .22);
}

.bp-modal-head, .bp-modal-foot {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
}
.bp-modal-head { border-bottom: 1px solid var(--line); }
.bp-modal-head h2 { margin: 0; font-size: 16px; }
.bp-modal-foot { border-top: 1px solid var(--line); }
.bp-modal-body { padding: 14px 16px 16px; }
.bp-start-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bp-start-option {
  min-height: 130px;
  padding: 14px;
  border: 2px solid transparent;
  border-radius: 7px;
  background: #f4f7f5;
  text-align: left;
}
.bp-start-option.active { border-color: #8ac5a8; background: #eef8f3; }
.bp-start-option strong { display: block; margin-bottom: 8px; font-size: 14px; }
.bp-start-option span { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; }
.bp-start-option em { display: inline-block; margin-top: 12px; color: var(--green-2); font-size: 12px; font-style: normal; font-weight: 800; }

/* Definition */
.bp-definition-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 320px;
  gap: 10px;
}

.bp-definition-nav { padding: 8px; }
.bp-definition-nav button {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}
.bp-definition-nav button.active { background: var(--green-soft); color: var(--green-2); font-weight: 800; }
.bp-definition-nav b { color: var(--green); }
.bp-definition-nav small { font-size: 12px; }

.bp-form-section { padding: 12px; }
.bp-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bp-field { display: grid; gap: 5px; }
.bp-field.wide { grid-column: span 2; }
.bp-field label { color: var(--muted); font-size: 12px; font-weight: 720; }
.bp-field .input, .bp-field .select { width: 100%; height: 34px; }

.bp-upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.bp-upload-tool {
  min-height: 92px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px dashed #b8c9c0;
  border-radius: 7px;
  background: #f9fbfa;
  color: var(--muted);
}
.bp-upload-tool strong { color: var(--ink); font-size: 12px; }
.bp-upload-tool span { font-size: 12px; }

.bp-preview-panel { overflow: hidden; }
.bp-vehicle-visual {
  position: relative;
  min-height: 205px;
  display: grid;
  place-items: center;
  background: #e9f0ed;
}
.bp-vehicle-visual img { width: 86%; max-height: 168px; object-fit: contain; }
.bp-view-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
}
.bp-view-controls button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 5px;
  background: rgba(255,255,255,.9);
  color: var(--muted);
}
.bp-preview-specs { display: grid; grid-template-columns: 1fr 1fr; }
.bp-preview-specs div { min-height: 52px; padding: 9px 12px; border-top: 1px solid #e8eeeb; }
.bp-preview-specs div:nth-child(even) { border-left: 1px solid #e8eeeb; }
.bp-preview-specs span { display: block; color: var(--muted); font-size: 12px; }
.bp-preview-specs strong { display: block; margin-top: 4px; font-size: 12px; }
.bp-vehicle-facts { margin: 0; padding: 4px 12px 12px; }
.bp-vehicle-facts div { min-height: 36px; display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 8px; border-top: 1px solid #e8eeeb; }
.bp-vehicle-facts dt { color: var(--muted); }
.bp-vehicle-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; text-align: right; }

/* Persistent BOM workspace */
.bp-workspace-grid {
  --bp-tree-width: 300px;
  min-height: 0;
  height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: var(--bp-tree-width) 7px minmax(0, 1fr) 310px;
  overflow: hidden;
}

.bp-workspace-grid.no-inspector { grid-template-columns: var(--bp-tree-width) 7px minmax(0, 1fr); }

.bp-tree-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.bp-tree-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px;
  border-bottom: 1px solid var(--line);
}
.bp-tree-head h2 { margin: 0; font-size: 13px; }
.bp-tree-summary { color: var(--muted); font-size: 12px; }
.bp-tree-tools { padding: 8px; border-bottom: 1px solid #e7edea; }
.bp-tree-search { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.bp-tree-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; }
.bp-tree-modes { display: flex; align-items: center; gap: 3px; margin-top: 6px; }
.bp-tree-modes button { height: 24px; padding: 0 8px; border: 0; border-radius: 4px; background: #f1f4f2; color: var(--muted); font-size: 12px; }
.bp-tree-modes button.active { background: var(--green-soft); color: var(--green-2); font-weight: 800; }
.bp-tree-scroll { min-height: 0; flex: 1; overflow: auto; padding: 6px 8px 18px; }
.bp-node {
  min-width: max-content;
  width: 100%;
  min-height: 29px;
  display: grid;
  grid-template-columns: 14px minmax(110px, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.bp-node:hover { background: #f1f6f3; }
.bp-node.active { background: #dff3e9; color: #155f42; font-weight: 780; }
.bp-node.depth-1 { padding-left: 20px; }
.bp-node.depth-2 { padding-left: 36px; }
.bp-node.depth-3 { padding-left: 52px; }
.bp-node small { color: var(--muted); font-size: 12px; font-weight: 600; }
.bp-node-state { width: 6px; height: 6px; border-radius: 50%; background: #a8b3ad; }
.bp-node-state.done { background: var(--green); }
.bp-node-state.partial { background: var(--bp-amber); }
.bp-node-state.empty { background: #c7cfcb; }
.bp-tree-foot { min-height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.bp-resize-handle {
  position: relative;
  z-index: 30;
  border-right: 1px solid #d8e2dd;
  border-left: 1px solid #d8e2dd;
  background: #edf2ef;
  cursor: col-resize;
}
.bp-resize-handle::after {
  content: "";
  position: absolute;
  top: calc(50% - 18px);
  left: 2px;
  width: 2px;
  height: 36px;
  border-radius: 2px;
  background: #aebdb6;
}

.bp-workspace-main {
  min-width: 0;
  min-height: 0;
  padding: 10px;
  overflow: auto;
}

.bp-source-toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}
.bp-source-toolbar .input { width: 100%; }

.bp-candidate-list { padding: 0 10px 10px; }
.bp-candidate {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 72px minmax(150px, 1fr) repeat(3, 82px) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 7px;
  background: #f5f7f6;
  text-align: left;
}
.bp-candidate + .bp-candidate { margin-top: 6px; }
.bp-candidate.active { border-color: #8ac6a8; background: #edf8f2; }
.bp-candidate img { width: 72px; height: 54px; border-radius: 5px; object-fit: cover; background: #dfe8e3; }
.bp-candidate strong { display: block; font-size: 12px; }
.bp-candidate .bp-subtext { display: block; margin-top: 4px; }
.bp-candidate dl { margin: 0; }
.bp-candidate dt { color: var(--muted); font-size: 12px; }
.bp-candidate dd { margin: 3px 0 0; font-size: 12px; font-weight: 780; }
.bp-candidate .recommended { color: var(--green-2); font-size: 12px; font-weight: 800; }

.bp-current-build { margin-top: 8px; }
.bp-build-table { width: 100%; border-collapse: collapse; }
.bp-build-table th { height: 32px; padding: 0 10px; background: #f7f9f8; color: var(--muted); font-size: 12px; text-align: left; }
.bp-build-table td { height: 40px; padding: 5px 10px; border-top: 1px solid #edf1ef; font-size: 12px; }
.bp-build-table .num { text-align: right; }

.bp-inspector {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #fff;
}
.bp-inspector-head { min-height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--line); }
.bp-inspector-head h2 { margin: 0; font-size: 13px; }
.bp-live-preview { min-height: 185px; display: grid; place-items: center; padding: 12px; background: #e8f0ec; }
.bp-live-preview img { width: 95%; max-height: 155px; object-fit: contain; }
.bp-inspector-metrics { display: grid; grid-template-columns: 1fr 1fr; }
.bp-inspector-metrics div { min-height: 58px; padding: 10px 12px; border-bottom: 1px solid #e8eeeb; }
.bp-inspector-metrics div:nth-child(even) { border-left: 1px solid #e8eeeb; }
.bp-inspector-metrics span { color: var(--muted); font-size: 12px; }
.bp-inspector-metrics strong { display: block; margin-top: 5px; font-size: 14px; }
.bp-inspector-note { margin: 10px 12px; padding: 9px 10px; border-radius: 6px; background: var(--blue-soft); color: #365d84; font-size: 12px; line-height: 1.5; }
.bp-inspector-actions { display: grid; gap: 6px; padding: 0 12px 14px; }

/* Global BOM and 3D viewers */
.bp-global-viewer {
  min-width: 0;
  min-height: 0;
  grid-column: 3 / -1;
  overflow: auto;
  padding: 10px;
  background: #f2f5f3;
}
.bp-global-viewer[hidden] { display: none; }
.bp-workspace-grid.is-global-view > .bp-workspace-main,
.bp-workspace-grid.is-global-view > .bp-dashboard-main,
.bp-workspace-grid.is-global-view > .bp-inspector { display: none; }
.bp-definition-grid.is-global-view > .bp-definition-content,
.bp-definition-grid.is-global-view > .bp-preview-panel { display: none; }
.bp-definition-grid > .bp-global-viewer { grid-column: 2 / -1; min-height: calc(100vh - 152px); padding: 0; }
.bp-global-viewer-head { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; padding: 0 10px; background: #fff; }
.bp-global-viewer-head h2 { margin: 0; font-size: 14px; }
.bp-global-view-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 8px; min-height: calc(100vh - 160px); }
.bp-global-summary { min-width: 0; }
.bp-global-3d-stage { position: relative; min-height: 520px; display: grid; place-items: center; overflow: hidden; background: #e8efec; }
.bp-global-3d-stage .bp-drive-chassis-large { transform: rotate(90deg) scale(1.15); }
.bp-global-3d-caption { position: absolute; right: 16px; bottom: 16px; left: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bp-global-3d-caption strong { font-size: 14px; }
.bp-global-3d-caption span { color: var(--muted); }

/* BOM build */
.bp-ai-builder { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 8px; padding: 10px; }
.bp-ai-prompt { min-width: 0; display: grid; gap: 6px; }
.bp-ai-prompt > span, .bp-ai-options label, .bp-assembly-filter-fields label, .bp-qualitative-grid label { color: var(--muted); font-weight: 760; }
.bp-ai-prompt textarea { width: 100%; min-height: 104px; resize: vertical; padding: 10px 11px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #f9fbfa; color: var(--ink); font: inherit; line-height: 1.55; }
.bp-ai-prompt textarea:focus { border-color: #77b596; box-shadow: 0 0 0 2px #e1f1e8; }
.bp-ai-prompt small, .bp-ai-upload small { color: var(--muted); }
.bp-ai-upload { min-height: 142px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed #adc3b8; border-radius: 6px; background: #f4f8f6; color: var(--muted); }
.bp-ai-upload > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-2); font-size: 18px; }
.bp-ai-upload strong { color: var(--ink); }
.bp-ai-options { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-top: 1px solid #e6ece9; }
.bp-ai-options label { display: flex; align-items: center; gap: 7px; }
.bp-ai-options .bp-live-status { margin-left: auto; }
.bp-assembly-palette { padding: 10px; }
.bp-assembly-level + .bp-assembly-level { margin-top: 16px; }
.bp-assembly-level > strong { display: block; margin-bottom: 8px; font-size: 13px; }
.bp-assembly-tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.bp-assembly-tile-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bp-assembly-tile { min-height: 62px; display: grid; align-content: center; gap: 5px; padding: 9px 11px; border: 0; border-radius: 6px; background: #f2f5f3; color: var(--ink); text-align: left; }
.bp-assembly-tile:hover { background: #eaf3ee; }
.bp-assembly-tile.active { background: var(--green-soft); color: var(--green-2); }
.bp-assembly-tile span { font-weight: 800; }
.bp-assembly-tile b { color: var(--muted); font-weight: 650; }
.bp-config-table .select { width: 100%; min-width: 140px; }
.bp-vehicle-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.bp-vehicle-template { min-height: 132px; padding: 12px; border: 0; border-radius: 6px; background: #f2f5f3; color: var(--ink); text-align: left; }
.bp-vehicle-template.active { background: #e5f4ec; }
.bp-vehicle-template strong { display: block; font-size: 14px; }
.bp-vehicle-template > span { display: block; margin-top: 5px; color: var(--muted); }
.bp-vehicle-template dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 12px 0 0; background: #dde6e1; }
.bp-vehicle-template dl div { padding: 7px; background: rgba(255,255,255,.78); }
.bp-vehicle-template dt { color: var(--muted); }
.bp-vehicle-template dd { margin: 4px 0 0; font-weight: 800; }
.bp-vehicle-template em { display: block; margin-top: 8px; color: var(--green-2); font-style: normal; font-weight: 760; }
.bp-template-actions { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 10px 10px; padding: 0 10px; background: #edf4f0; }
.bp-template-actions strong, .bp-template-actions span { display: block; }
.bp-template-actions span { margin-top: 3px; color: var(--muted); }
.bp-assembly-count-summary { padding: 18px 12px; background: #edf4f0; }
.bp-assembly-count-summary strong { display: block; color: #173e2f; font-size: 28px; }
.bp-assembly-count-summary span, .bp-assembly-count-summary b { display: block; margin-top: 4px; }
.bp-assembly-count-summary b { color: var(--muted); font-weight: 650; }
.bp-assembly-count-list { padding: 6px 10px 12px; }
.bp-assembly-count-list > div, .bp-assembly-count-list > button { width: 100%; min-height: 42px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); text-align: left; }
.bp-assembly-count-list > div + div, .bp-assembly-count-list > button + button { border-top: 1px solid #e7edea; }
.bp-assembly-count-list > button:hover, .bp-assembly-count-list > button.active { background: #edf6f1; }
.bp-assembly-count-list b { color: var(--green-2); font-size: 14px; }
.bp-assembly-count-list small { color: var(--muted); }
.bp-assembly-filter-modal { width: min(940px, calc(100vw - 48px)); }
.bp-assembly-filter-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.bp-assembly-filter-fields label, .bp-qualitative-grid label { display: grid; gap: 5px; }
.bp-assembly-filter-fields .select { width: 100%; }

/* Node scheme editor */
.bp-scheme-editor-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 520px; }
.bp-scheme-list-panel { padding: 9px; background: #f3f6f4; }
.bp-scheme-list-head { min-height: 34px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.bp-node-scheme { width: 100%; min-height: 66px; display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: center; gap: 5px 7px; padding: 8px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; }
.bp-node-scheme + .bp-node-scheme { margin-top: 4px; }
.bp-node-scheme:hover { background: #eaf1ed; }
.bp-node-scheme.active { background: #ddf1e7; }
.bp-node-scheme strong, .bp-node-scheme small { display: block; }
.bp-node-scheme small { margin-top: 4px; color: var(--muted); }
.bp-node-scheme > b { grid-column: 2; color: var(--green-2); white-space: nowrap; }
.bp-node-scheme .bp-scheme-choice { position: static; }
.bp-node-scheme.active .bp-scheme-choice { border: 4px solid var(--green); }
.bp-add-scheme { width: 100%; min-height: 38px; margin-top: 8px; border: 1px dashed #afc2b8; border-radius: 5px; background: transparent; color: var(--green-2); }
.bp-scheme-editor { min-width: 0; padding: 10px; }
.bp-scheme-editor-head { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bp-scheme-editor-head strong { display: block; font-size: 14px; }
.bp-scheme-editor-head span:not(.bp-live-status) { display: block; margin-top: 2px; color: var(--muted); }
.bp-child-bom-builder { padding: 10px; border-radius: 6px; background: #f3f6f4; }
.bp-section-title { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bp-child-node-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 7px; }
.bp-child-node-grid label { min-height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 8px; border-radius: 4px; background: #fff; }
.bp-scheme-data-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: 8px; margin-top: 8px; }
.bp-scheme-data-section { min-width: 0; padding: 10px; border-radius: 6px; background: #f3f6f4; }
.bp-form-grid.compact { grid-template-columns: 1fr 1fr; gap: 8px; }
.bp-point-cloud-section { display: flex; flex-direction: column; }
.bp-point-cloud-preview { position: relative; min-height: 206px; display: grid; place-items: center; margin-top: 7px; overflow: hidden; background: #80b6e8; }
.bp-point-cloud-preview img { width: 92%; height: 190px; object-fit: contain; }
.bp-model-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 7px; background: #dce5e0; }
.bp-model-status div { min-width: 0; padding: 7px; background: #fff; }
.bp-model-status span, .bp-model-status b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-model-status span { color: var(--muted); }
.bp-model-status b { margin-top: 4px; }
.bp-part-visual { min-height: 180px; display: grid; place-items: center; background: #80b6e8; }
.bp-part-visual.compact { min-height: 150px; }
.bp-part-visual img { width: 92%; max-height: 165px; object-fit: contain; }
.bp-part-title { padding: 10px 12px; }
.bp-part-title strong, .bp-part-title span { display: block; }
.bp-part-title strong { font-size: 15px; }
.bp-part-title span { margin-top: 4px; color: var(--muted); }
.bp-part-facts { margin: 0; padding: 4px 12px 12px; }
.bp-part-facts div { min-height: 38px; display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 8px; border-top: 1px solid #e8eeeb; }
.bp-part-facts dt { color: var(--muted); }
.bp-part-facts dd { margin: 0; text-align: right; }
.bp-part-facts dd.bad { color: var(--bp-red); }
.bp-3d-assembly-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; min-height: 500px; }
.bp-3d-assembly-stage { position: relative; display: grid; place-items: center; background: #80b6e8; }
.bp-3d-assembly-stage > img { width: 88%; height: 430px; object-fit: contain; }
.bp-3d-stage-caption { position: absolute; right: 14px; bottom: 12px; left: 14px; display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; background: rgba(255,255,255,.9); }
.bp-3d-node-list { padding: 10px; background: #f3f6f4; }
.bp-3d-node-list > strong { display: block; margin-bottom: 7px; }
.bp-3d-node-list button { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; border: 0; border-top: 1px solid #dde5e1; background: transparent; text-align: left; }
.bp-3d-node-list button.active { background: #e2f2ea; }
.bp-3d-node-list b { color: var(--green-2); }
.bp-compare-conclusion { min-height: 66px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 10px; padding: 0 12px; background: #edf4f0; }
.bp-compare-conclusion span { color: var(--muted); line-height: 1.5; }

@media (max-width: 1440px) {
  .bp-scheme-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .bp-scheme-list-panel { display: flex; align-items: stretch; gap: 5px; overflow-x: auto; }
  .bp-scheme-list-head { flex: 0 0 84px; flex-direction: column; align-items: flex-start; justify-content: center; }
  .bp-node-scheme { flex: 0 0 190px; min-height: 68px; }
  .bp-node-scheme + .bp-node-scheme { margin-top: 0; }
  .bp-add-scheme { flex: 0 0 110px; margin-top: 0; }
}

/* Cost workflow */
.bp-target-table .input { width: 112px; }
.bp-target-table tr.active { background: #eef7f2; }
.bp-qualitative-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 12px; }
.bp-qualitative-grid .select { width: 100%; }
.bp-estimate-result, .bp-agent-result { min-height: 88px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 1px; margin: 0 12px 12px; background: #dce5e0; }
.bp-estimate-result > div, .bp-agent-result > div { height: 100%; padding: 12px; background: #eef6f2; }
.bp-estimate-result span, .bp-estimate-result strong, .bp-estimate-result small, .bp-agent-result span, .bp-agent-result strong, .bp-agent-result small { display: block; }
.bp-estimate-result span, .bp-estimate-result small, .bp-agent-result span, .bp-agent-result small { color: var(--muted); }
.bp-estimate-result strong, .bp-agent-result strong { margin-top: 5px; font-size: 15px; }
.bp-estimate-result small, .bp-agent-result small { margin-top: 4px; }
.bp-estimate-result > .btn, .bp-agent-result > .btn { margin: 0 10px; }
.bp-benchmark-estimate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(140px, 1.2fr); gap: 1px; margin: 10px; background: #dce5e0; }
.bp-benchmark-estimate > div, .bp-benchmark-estimate > label { min-height: 68px; padding: 10px; background: #f1f7f4; }
.bp-benchmark-estimate span, .bp-benchmark-estimate strong { display: block; }
.bp-benchmark-estimate span { color: var(--muted); }
.bp-benchmark-estimate strong { margin-top: 6px; font-size: 15px; }
.bp-benchmark-estimate label { display: grid; gap: 6px; color: var(--muted); }
.bp-agent-readiness { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 12px; background: #dce5e0; }
.bp-agent-readiness div { min-height: 62px; display: grid; grid-template-columns: 8px minmax(0, 1fr); align-content: center; gap: 4px 8px; padding: 10px; background: #f4f8f6; }
.bp-agent-readiness .bp-node-state { grid-row: 1 / 3; align-self: center; }
.bp-agent-readiness b { color: var(--muted); font-weight: 650; }
.bp-formula-table .input, .bp-formula-table .select { width: 100%; min-width: 96px; }
.bp-formula-table tfoot td { height: 48px; padding: 0 10px; background: #edf5f1; text-align: right; }
.bp-formula-table tfoot strong { font-size: 16px; }
.bp-cost-analysis-chart { padding: 12px; }
.bp-cost-analysis-chart > div:first-child { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bp-cost-chart-legend { display: flex; gap: 12px; color: var(--muted); }
.bp-cost-chart-legend span { display: flex; align-items: center; gap: 5px; }
.bp-cost-chart-legend i { width: 9px; height: 9px; background: var(--green); }
.bp-cost-chart-legend span + span i { background: #85a99a; }
.bp-cost-chart-row { min-height: 44px; display: grid; grid-template-columns: 72px minmax(160px, 1fr) 150px; align-items: center; gap: 10px; border-top: 1px solid #e7edea; }
.bp-cost-chart-row > i { position: relative; height: 18px; background: #edf1ef; }
.bp-cost-chart-row > i b, .bp-cost-chart-row > i em { position: absolute; left: 0; height: 8px; background: var(--green); }
.bp-cost-chart-row > i b { top: 0; }
.bp-cost-chart-row > i em { bottom: 0; background: #85a99a; }
.bp-cost-chart-row strong { text-align: right; }
.bp-reduction-plan { margin: 10px; padding: 10px; background: #f1f6f3; }
.bp-reduction-items > div { min-height: 56px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-top: 1px solid #dce5e0; }
.bp-reduction-items > div > b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-2); }
.bp-reduction-items span strong, .bp-reduction-items span small { display: block; }
.bp-reduction-items span small { margin-top: 4px; color: var(--muted); }
.bp-reduction-items em { color: var(--green-2); font-style: normal; font-weight: 800; }
.bp-reduction-total { min-height: 54px; display: flex; align-items: center; gap: 9px; margin-top: 8px; padding: 0 10px; background: #e4f3eb; }
.bp-reduction-total strong { margin-right: 16px; font-size: 16px; }
.bp-reduction-total .btn { margin-left: auto; }

/* Adjustment */
.bp-adjust-panel { padding: 10px; }
.bp-solution-list { display: grid; gap: 7px; }
.bp-solution {
  min-height: 78px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 90px 90px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 2px solid transparent;
  border-radius: 7px;
  background: #f5f7f6;
  text-align: left;
}
.bp-solution.active { border-color: #8ac6a8; background: #edf8f2; }
.bp-solution-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: var(--blue-soft); color: var(--bp-blue); font-weight: 850; }
.bp-solution strong { display: block; font-size: 12px; }
.bp-solution span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.bp-solution b { font-size: 12px; }
.bp-solution small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

.bp-drive-intro {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px 8px;
}
.bp-drive-intro > div:first-child strong { display: block; font-size: 12px; }
.bp-drive-intro > div:first-child span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.bp-drive-intro > div:last-child { min-width: 120px; text-align: right; }
.bp-drive-intro > div:last-child span { display: block; color: var(--muted); font-size: 12px; }
.bp-drive-intro > div:last-child b { display: block; margin-top: 3px; color: var(--green-2); font-size: 12px; }

.bp-drive-solution-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.bp-drive-solution {
  position: relative;
  min-width: 0;
  min-height: 150px;
  padding: 11px;
  border: 0;
  border-radius: 6px;
  background: #f3f6f4;
  color: var(--ink);
  text-align: left;
}
.bp-drive-solution:hover { background: #edf4f0; }
.bp-drive-solution.active { background: #e7f5ee; }
.bp-drive-solution:focus { outline: 0; }
.bp-drive-solution:focus-visible { box-shadow: inset 3px 0 var(--green); }
.bp-scheme-choice {
  position: absolute;
  top: 12px;
  right: 11px;
  width: 14px;
  height: 14px;
  border: 1px solid #aab8b1;
  border-radius: 50%;
  background: #fff;
}
.bp-drive-solution.active .bp-scheme-choice { border: 4px solid var(--green); }
.bp-drive-solution-head { min-height: 35px; display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.bp-drive-solution-head strong { display: block; font-size: 12px; }
.bp-drive-solution-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.bp-drive-solution-head em { padding: 2px 5px; border-radius: 3px; background: #d7ebe1; color: var(--green-2); font-size: 12px; font-style: normal; }
.bp-scheme-topology { display: flex; align-items: center; gap: 5px; margin: 9px 0; }
.bp-scheme-topology span { flex: 1; padding: 5px 4px; border-radius: 4px; background: #dcece4; color: #245943; font-size: 12px; font-weight: 760; text-align: center; }
.bp-scheme-topology span.off { background: #e6eae8; color: #99a39e; text-decoration: line-through; }
.bp-scheme-topology i { color: #8b9891; font-size: 12px; font-style: normal; }
.bp-drive-solution dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.bp-drive-solution dl div + div { padding-left: 8px; border-left: 1px solid #dbe5e0; }
.bp-drive-solution dt { color: var(--muted); font-size: 12px; }
.bp-drive-solution dd { margin: 4px 0 0; font-size: 12px; font-weight: 800; white-space: nowrap; }
.bp-drive-solution .good, .bp-drive-compare-table .good { color: var(--green-2); }

.bp-drive-structure { margin-top: 8px; overflow: hidden; border-radius: 6px; background: #f7f9f8; }
.bp-drive-structure-head { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; border-bottom: 1px solid #e3eae6; }
.bp-drive-structure-head strong { display: block; font-size: 12px; }
.bp-drive-structure-head div > span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.bp-drive-node-row { min-height: 40px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 10px; }
.bp-drive-node-row + .bp-drive-node-row { border-top: 1px solid #e6ece9; }
.bp-drive-node-row strong { display: block; font-size: 12px; }
.bp-drive-node-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.bp-drive-node-row b { color: #344d42; font-size: 12px; white-space: nowrap; }
.bp-drive-node-row.disabled { opacity: .44; }
.bp-drive-node-row.disabled .bp-node-state { background: #aab3af; }

.bp-drive-preview { min-height: 190px; display: grid; place-items: center; padding: 12px; background: #e8efec; }
.bp-drive-chassis {
  position: relative;
  width: 112px;
  height: 160px;
  border: 2px solid #95aaa0;
  border-radius: 28px 28px 22px 22px;
  background: #f5f8f6;
}
.bp-drive-chassis::before, .bp-drive-chassis::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  height: 16px;
  border: 1px solid #c6d2cc;
  border-radius: 50%;
}
.bp-drive-chassis::before { top: 13px; }
.bp-drive-chassis::after { bottom: 13px; }
.bp-drive-axle { position: absolute; z-index: 2; left: -14px; right: -14px; height: 34px; display: flex; align-items: center; justify-content: center; border-top: 2px solid #778b81; }
.bp-drive-axle.front { top: 31px; }
.bp-drive-axle.rear { bottom: 15px; }
.bp-drive-axle::before, .bp-drive-axle::after { content: ""; position: absolute; top: -8px; width: 11px; height: 22px; border-radius: 3px; background: #34463e; }
.bp-drive-axle::before { left: 0; }
.bp-drive-axle::after { right: 0; }
.bp-drive-axle b { min-width: 58px; padding: 5px 6px; border-radius: 4px; background: var(--green); color: #fff; font-size: 12px; text-align: center; }
.bp-drive-axle span { position: absolute; top: 21px; color: var(--muted); font-size: 12px; }
.bp-drive-axle.inactive { opacity: .2; }
.bp-drive-battery { position: absolute; top: 66px; right: 21px; bottom: 51px; left: 21px; display: grid; place-items: center; border-radius: 5px; background: #bfd5ca; color: #355b49; }
.bp-drive-battery span { font-size: 12px; font-weight: 760; writing-mode: vertical-rl; }
.bp-drive-layout-stage { position: relative; min-height: 350px; display: grid; place-items: center; background: #e8efec; }
.bp-drive-chassis-large { width: 180px; height: 255px; border-radius: 42px 42px 34px 34px; }
.bp-drive-chassis-large .bp-drive-axle.front { top: 48px; }
.bp-drive-chassis-large .bp-drive-axle.rear { bottom: 28px; }
.bp-drive-chassis-large .bp-drive-battery { top: 92px; right: 38px; bottom: 79px; left: 38px; }
.bp-drive-layout-caption { position: absolute; bottom: 14px; left: 16px; }
.bp-drive-layout-caption strong { display: block; font-size: 12px; }
.bp-drive-layout-caption span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

.bp-drive-compare-table { width: 100%; border-collapse: collapse; }
.bp-drive-compare-table th { height: 34px; padding: 0 10px; background: #f5f7f6; color: var(--muted); font-size: 12px; text-align: left; }
.bp-drive-compare-table td { height: 44px; padding: 6px 10px; border-top: 1px solid #e7edea; font-size: 12px; }
.bp-drive-delta { min-height: 42px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; margin: 9px 12px 0; padding: 0 10px; border-radius: 6px; background: #edf7f2; }
.bp-drive-delta span { color: var(--muted); font-size: 12px; }
.bp-drive-delta strong { color: var(--green-2); font-size: 12px; white-space: nowrap; }

.bp-parameter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bp-parameter-module { padding-top: 0; }
.bp-parameter-row { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; border-radius: 6px; background: #f5f7f6; }
.bp-parameter-row span { color: var(--muted); font-size: 12px; }
.bp-parameter-row strong { font-size: 12px; }

.bp-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bp-compare-side { overflow: hidden; border-radius: 7px; background: #eef3f0; }
.bp-compare-side img { width: 100%; height: 180px; object-fit: contain; background: #80b6e8; }
.bp-compare-side div { min-height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; background: #fff; }

/* Cost */
.bp-cost-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 7px;
  background: #e3eae6;
}
.bp-cost-summary div { min-height: 62px; padding: 10px 12px; background: #fff; }
.bp-cost-summary span { color: var(--muted); font-size: 12px; }
.bp-cost-summary strong { display: block; margin-top: 6px; font-size: 18px; }
.bp-cost-summary strong.bad { color: var(--bp-red); }

.bp-assembly-cost-list { padding: 0 10px 10px; }
.bp-assembly-cost {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 90px 90px 90px 130px;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}
.bp-assembly-cost:hover, .bp-assembly-cost.active { background: #eff7f3; }
.bp-assembly-cost strong { font-size: 12px; }
.bp-assembly-cost span { color: var(--muted); font-size: 12px; }
.bp-assembly-cost b { font-size: 12px; text-align: right; }
.bp-assembly-cost b.over { color: var(--bp-red); }
.bp-assembly-cost .bp-progress { width: 90px; }

.bp-cost-detail { margin-top: 8px; }
.bp-method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; }
.bp-method {
  min-height: 70px;
  padding: 9px 10px;
  border: 2px solid transparent;
  border-radius: 7px;
  background: #f5f7f6;
  text-align: left;
}
.bp-method.active { border-color: #8ac6a8; background: #eef8f3; }
.bp-method strong { display: block; font-size: 12px; }
.bp-method span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }

.bp-gap-list { padding: 8px 12px; }
.bp-gap-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px 0; }
.bp-gap-item + .bp-gap-item { border-top: 1px solid #edf1ef; }
.bp-gap-item strong { font-size: 12px; }
.bp-gap-item span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.bp-gap-item b { color: var(--bp-red); font-size: 12px; }

/* Dashboard */
.bp-dashboard-main { min-width: 0; min-height: 0; padding: 10px; overflow: auto; }
.bp-dashboard-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; overflow: hidden; border-radius: 7px; background: #e2e9e5; }
.bp-dashboard-summary div { min-height: 64px; padding: 10px 12px; background: #fff; }
.bp-dashboard-summary span { color: var(--muted); font-size: 12px; }
.bp-dashboard-summary strong { display: block; margin-top: 6px; font-size: 18px; }
.bp-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr); gap: 8px; margin-top: 8px; }
.bp-assembly-bars { padding: 8px 12px 12px; }
.bp-bar-row { display: grid; grid-template-columns: 92px minmax(100px, 1fr) 90px 68px; align-items: center; gap: 10px; min-height: 34px; }
.bp-bar-row > span { font-size: 12px; }
.bp-bar-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e8edea; }
.bp-bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.bp-bar-row b { text-align: right; font-size: 12px; }
.bp-bar-row em { color: var(--muted); font-size: 12px; font-style: normal; text-align: right; }

.bp-health-list { padding: 4px 12px 10px; }
.bp-health-item { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 38px; }
.bp-health-item + .bp-health-item { border-top: 1px solid #edf1ef; }
.bp-health-item i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.bp-health-item i.warn { background: var(--bp-amber); }
.bp-health-item i.bad { background: var(--bp-red); }
.bp-health-item strong { font-size: 12px; }
.bp-health-item span { color: var(--muted); font-size: 12px; }
.bp-health-item b { font-size: 12px; }

.bp-change-table { width: 100%; border-collapse: collapse; }
.bp-change-table th { height: 32px; padding: 0 10px; background: #f7f9f8; color: var(--muted); font-size: 12px; text-align: left; }
.bp-change-table td { height: 38px; padding: 5px 10px; border-top: 1px solid #edf1ef; font-size: 12px; }

.bp-data-screen { display: grid; gap: 8px; }
.bp-data-screen[hidden] { display: none; }
.bp-screen-grid { grid-template-columns: minmax(0, 1.5fr) minmax(250px, .7fr); }
.bp-screen-cost-bars { padding: 8px 12px 12px; }
.bp-screen-cost-bars > div { min-height: 37px; display: grid; grid-template-columns: 92px minmax(120px, 1fr) 86px 64px; align-items: center; gap: 10px; }
.bp-screen-cost-bars > div + div { border-top: 1px solid #edf1ef; }
.bp-screen-cost-bars span { font-size: 12px; }
.bp-screen-cost-bars i { position: relative; height: 9px; border-radius: 99px; background: #e8edea; }
.bp-screen-cost-bars i b { display: block; height: 100%; border-radius: inherit; background: #d37a72; }
.bp-screen-cost-bars i b.good { background: var(--green); }
.bp-screen-cost-bars i em { position: absolute; top: -3px; width: 2px; height: 15px; background: #263a31; }
.bp-screen-cost-bars strong { font-size: 12px; text-align: right; }
.bp-screen-cost-bars small { color: var(--bp-red); font-size: 12px; text-align: right; }
.bp-screen-status { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #e5ebe8; }
.bp-screen-status div { min-height: 82px; padding: 11px 12px; background: #fff; }
.bp-screen-status strong { display: block; font-size: 20px; }
.bp-screen-status span { display: block; margin-top: 4px; font-size: 12px; font-weight: 750; }
.bp-screen-status small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.bp-screen-changes { margin-top: 0; }

.bp-toast {
  position: fixed;
  z-index: 25000;
  right: 22px;
  bottom: 22px;
  min-width: 260px;
  padding: 11px 14px;
  border-radius: 7px;
  background: #173d30;
  color: #fff;
  box-shadow: 0 16px 40px rgba(13, 36, 27, .2);
  font-size: 12px;
}

@media (max-width: 1280px) {
  .blueprint-body .global-bar { grid-template-columns: 148px minmax(190px, 1fr) auto; gap: 8px; padding-left: 14px; }
  .bp-product-title { padding-left: 12px; }
  .bp-header-project { width: 176px; min-width: 176px; }
  .bp-flow a { min-width: 98px; padding: 0 9px; }
  .bp-flow-tools .bp-live-status { display: none; }
  .bp-inspector-head .bp-live-status { display: none; }
  .bp-cost-tabs { padding: 4px 6px 0; }
  .bp-cost-tabs nav button { padding: 0 7px; font-size: 12px; }
  .bp-workspace-grid { --bp-tree-width: 284px; grid-template-columns: var(--bp-tree-width) 7px minmax(0, 1fr) 284px; }
  .bp-workspace-grid.no-inspector { grid-template-columns: var(--bp-tree-width) 7px minmax(0, 1fr); }
  .bp-candidate { grid-template-columns: 62px minmax(140px, 1fr) repeat(3, 72px) auto; gap: 7px; }
  .bp-candidate img { width: 62px; }
  .bp-definition-grid { grid-template-columns: 210px minmax(0, 1fr) 290px; }
}
