.panel__section--components {
  padding-bottom: 8px;
}

.component-tree {
  max-height: min(34vh, 320px);
  overflow: auto;
  padding-right: 2px;
}

.component-tree__summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--text-faint);
  font-size: 10.5px;
}

.sheet-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.sheet-filter button {
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff08;
  color: var(--text-faint);
  font-size: 10px;
}

.sheet-filter button:hover,
.sheet-filter button.is-active {
  border-color: #e8b93c66;
  background: #e8b93c1f;
  color: var(--text);
}

.component-group {
  margin-bottom: 5px;
}

.component-types {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 3px 0 5px 10px;
}

.component-type {
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

.component-type__head {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 4px 5px 3px;
  color: var(--text-dim);
}

.component-type__head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 500;
}

.component-type__head em {
  color: var(--text-faint);
  font-family: var(--font-num);
  font-size: 10px;
  font-style: normal;
}

.component-type__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.component-children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 2px 0 5px 15px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

.component-type .component-children {
  margin-left: 0;
}

.component-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 5px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--text);
  text-align: left;
}

.component-row:hover {
  border-color: var(--line);
  background: #ffffff0a;
}

.component-row.is-active {
  border-color: #e8b93c66;
  background: #e8b93c1f;
}

.component-row--candidate {
  color: var(--text-dim);
}

.component-row__tag {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid color-mix(in srgb, var(--tag-color) 55%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--tag-color) 13%, transparent);
  color: var(--tag-color);
  font-size: 10px;
  font-weight: 600;
}

.component-row__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
}

.component-row__qty {
  color: var(--text-faint);
  font-family: var(--font-num);
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.takeoff-focus {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.takeoff-focus > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.takeoff-focus strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
}

.takeoff-focus span {
  color: var(--text-faint);
  font-size: 10.5px;
}

.calc-process {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--ink-900);
}

.calc-process__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.calc-process__head > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.calc-process__head strong {
  font-size: 16px;
  font-weight: 600;
}

.calc-process__head span {
  color: var(--text-dim);
  font-size: 11.5px;
}

.calc-process__head em {
  flex: none;
  padding: 3px 7px;
  border: 1px solid #e8b93c66;
  border-radius: 3px;
  background: #e8b93c1f;
  color: var(--light);
  font-family: var(--font-num);
  font-size: 11px;
  font-style: normal;
}

.calc-process__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 18px;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.calc-table th {
  padding: 8px 7px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-faint);
  text-align: left;
  font-size: 10.5px;
  font-weight: 500;
}

.calc-table td {
  padding: 9px 7px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.calc-table th:first-child,
.calc-table td:first-child {
  width: 18%;
}

.calc-table th:last-child,
.calc-table td:last-child {
  width: 52px;
  text-align: center;
}

.calc-table .num {
  width: 110px;
  text-align: right;
  white-space: nowrap;
}

.calc-expression {
  color: #cbd4d1;
  font-family: var(--font-num);
  line-height: 1.65;
}

.calc-process__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--line-strong);
  background: var(--ink-850);
  color: var(--text-dim);
  font-size: 11px;
}

.calc-process__footer span:first-child {
  color: var(--light);
  font-weight: 600;
}
