.device-curve-layout {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.curve-builder {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.curve-builder > header {
  padding: 15px 16px 13px;
  border-bottom: 1px solid #edf1f5;
}

.curve-builder > header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.curve-builder > header b {
  color: #263b58;
  font-size: 11px;
}

.curve-builder > header span {
  color: var(--primary);
  font-size: 8px;
  font-weight: 650;
}

.curve-builder > header small {
  display: block;
  margin-top: 6px;
  color: #8996a7;
  font-size: 7px;
  line-height: 1.55;
}

.curve-builder section {
  padding: 12px 13px 5px;
}

.curve-builder section + section {
  padding-bottom: 13px;
  border-top: 1px solid #edf1f5;
}

.curve-builder h3 {
  margin: 0 0 8px;
  color: #65758b;
  font-size: 8px;
}

.curve-options {
  display: grid;
  gap: 6px;
}

.curve-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  color: inherit;
  text-decoration: none;
  background: #fafbfd;
  border: 1px solid #e7ebf1;
  border-radius: 8px;
}

.curve-option > i {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  border: 1px solid #cfd7e3;
  border-radius: 5px;
}

.curve-option b,
.curve-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.curve-option b {
  color: #344964;
  font-size: 8px;
}

.curve-option small {
  margin-top: 3px;
  color: #8d99aa;
  font-size: 6px;
}

.curve-option:hover,
.curve-option:focus-visible,
.curve-option.active {
  background: color-mix(in srgb, var(--series-color) 6%, white);
  border-color: color-mix(in srgb, var(--series-color) 38%, #d9e1ec);
  outline: none;
}

.curve-option.active > i {
  background: var(--series-color);
  border-color: var(--series-color);
}

.curve-option.disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.curve-workspace {
  min-width: 0;
}

.curve-workspace > .panel {
  margin-bottom: 14px;
}

.curve-workspace-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid #edf1f5;
}

.curve-workspace-head h3,
.curve-workspace-head p {
  margin: 0;
}

.curve-workspace-head h3 {
  color: #263b58;
  font-size: 12px;
}

.curve-workspace-head p {
  margin-top: 5px;
  color: #8996a7;
  font-size: 7px;
}

.curve-range {
  display: flex;
  padding: 3px;
  background: #f1f5fa;
  border-radius: 7px;
}

.curve-range a {
  padding: 6px 9px;
  color: #748399;
  font-size: 7px;
  text-decoration: none;
  border-radius: 5px;
}

.curve-range a.active {
  color: var(--primary);
  font-weight: 650;
  background: #fff;
  box-shadow: 0 2px 7px rgb(31 56 91 / 8%);
}

.curve-workspace-body {
  padding: 14px 16px 11px;
}

.device-curve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 9px;
}

.device-curve-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  background: #f7f9fc;
  border: 1px solid #e8edf3;
  border-radius: 6px;
}

.device-curve-legend i {
  width: 14px;
  height: 3px;
  background: var(--series-color);
  border-radius: 3px;
}

.device-curve-legend .formula i {
  height: 0;
  background: none;
  border-top: 3px dashed var(--series-color);
}

.device-curve-legend b,
.device-curve-legend em {
  font-size: 7px;
}

.device-curve-legend b {
  color: #465a75;
}

.device-curve-legend em {
  color: #8290a3;
  font-style: normal;
}

.device-curve-chart {
  overflow: hidden;
}

.device-curve-chart svg {
  display: block;
  width: 100%;
  height: 270px;
}

.device-curve-grid line {
  stroke: #e8edf3;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.device-curve-axis {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  color: #9aa5b4;
  font-size: 6px;
  text-align: center;
}

.device-curve-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 9px;
  margin-top: 9px;
  color: #8996a7;
  font-size: 7px;
  border-top: 1px solid #edf1f5;
}

.series-color {
  display: inline-block;
  width: 22px;
  height: 4px;
  background: var(--series-color);
  border-radius: 4px;
}


@media (max-width: 1180px) {
  .device-curve-layout { grid-template-columns: 230px minmax(0, 1fr); }
}
