.sellLabPanel {
  border: 1px solid #d7e0dc;
  background: #fff;
  color: #17221f;
}

.sellLabHeader,
.sellMarginPanel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sellLabHeader {
  padding: 18px 20px;
  border-bottom: 1px solid #d7e0dc;
}

.sellLabHeader h2,
.sellMarginPanel h3,
.sellLabReport h3 {
  margin: 0;
  letter-spacing: 0;
}

.sellLabHeader h2 {
  font-size: 22px;
}

.sellLabHeader p,
.sellMarginPanel p {
  margin: 5px 0 0;
  color: #5f6c68;
}

.sellLabTitleRow,
.sellLabActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sellLabBadge {
  border: 1px solid #d89525;
  color: #9a5b00;
  background: #fff7e8;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 700;
}

.sellLabActions {
  justify-content: flex-end;
  color: #64706d;
  font-size: 13px;
}

.sellLabActions button,
.sellMarginPanel button {
  min-height: 38px;
  border: 1px solid #b9c7c2;
  border-radius: 5px;
  background: #fff;
  color: #17221f;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.sellLabActions button:hover,
.sellMarginPanel button:hover {
  border-color: #147a5a;
  color: #0c684b;
}

.sellLabActions button:disabled,
.sellMarginPanel button:disabled {
  cursor: wait;
  opacity: .62;
}

.sellLabRuleBand,
.sellLabSummary,
.sellMarginGrid {
  display: grid;
}

.sellLabRuleBand {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid #d7e0dc;
  background: #f6f9f8;
}

.sellLabRuleBand > div,
.sellLabSummary > div,
.sellMarginGrid > div {
  min-width: 0;
  padding: 13px 15px;
  border-right: 1px solid #d7e0dc;
}

.sellLabRuleBand > div:last-child,
.sellLabSummary > div:nth-child(4n),
.sellMarginGrid > div:last-child {
  border-right: 0;
}

.sellLabRuleBand span,
.sellLabSummary span,
.sellMarginGrid span,
.sellAdaptiveDecision span {
  display: block;
  margin-bottom: 4px;
  color: #62706c;
  font-size: 12px;
}

.sellLabRuleBand strong {
  font-size: 13px;
}

.sellLabSummary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #d7e0dc;
}

.sellLabSummary > div:nth-child(-n+4) {
  border-bottom: 1px solid #d7e0dc;
}

.sellLabSummary strong,
.sellMarginGrid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 17px;
}

.sellLabPanel .profit {
  color: #087a54;
}

.sellLabPanel .loss {
  color: #c73535;
}

.sellMarginPanel {
  border-bottom: 1px solid #d7e0dc;
  background: #fbfcfc;
}

.sellMarginPanel > header {
  padding: 14px 16px 10px;
}

.sellMarginPanel h3,
.sellLabReport h3 {
  font-size: 16px;
}

.sellMarginGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #e0e7e4;
}

.sellMarginGrid small {
  display: block;
  margin-top: 4px;
  color: #707b78;
  line-height: 1.35;
}

.sellMarginNote {
  padding: 8px 15px 11px;
  border-top: 1px solid #e0e7e4;
  font-size: 12px;
}

.sellLabViews {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  border-bottom: 1px solid #cbd6d2;
  background: #f7f9f8;
  scrollbar-width: thin;
}

.sellLabViews button {
  flex: 0 0 auto;
  min-height: 43px;
  border: 0;
  border-right: 1px solid #d8e0dd;
  background: transparent;
  color: #55635f;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

.sellLabViews button[aria-selected="true"] {
  background: #263c37;
  color: #fff;
}

.sellLabReport {
  min-height: 260px;
  padding: 16px;
}

.sellLabReport[hidden] {
  display: none;
}

.sellLabOverviewGrid {
  display: grid;
  grid-template-columns: minmax(440px, .9fr) minmax(460px, 1.1fr);
  gap: 18px;
}

.sellLabOverviewGrid h3 {
  margin-bottom: 10px;
}

.sellLabCanvasWrap {
  min-height: 280px;
  border: 1px solid #dce4e1;
  background: #fff;
}

.sellLabCanvasWrap canvas {
  display: block;
  width: 100%;
  height: 280px;
}

.sellLabTableWrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #dce4e1;
}

.sellLabTable {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 13px;
}

.sellLabTable th,
.sellLabTable td {
  padding: 9px 10px;
  border-bottom: 1px solid #dfe6e3;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.sellLabTable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f8f7;
  color: #55635f;
  font-size: 12px;
}

.sellLabTable tbody tr:last-child td {
  border-bottom: 0;
}

.sellLabTable .sellCe {
  color: #b44b1b;
  font-weight: 700;
}

.sellLabTable .sellPe {
  color: #176bc0;
  font-weight: 700;
}

.sellLabEmpty {
  color: #6a7773;
  text-align: center !important;
  padding: 28px !important;
}

.sellAdaptiveDecision {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid #dce4e1;
}

.sellAdaptiveDecision > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #dce4e1;
}

.sellAdaptiveDecision > div:last-child {
  border-right: 0;
}

.sellAdaptiveDecision strong {
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .sellLabRuleBand {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sellLabRuleBand > div {
    border-bottom: 1px solid #d7e0dc;
  }

  .sellLabOverviewGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sellLabHeader,
  .sellMarginPanel > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sellLabActions {
    width: 100%;
    justify-content: space-between;
  }

  .sellLabRuleBand,
  .sellLabSummary,
  .sellMarginGrid,
  .sellAdaptiveDecision {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sellLabSummary > div:nth-child(2n),
  .sellMarginGrid > div:nth-child(2n),
  .sellAdaptiveDecision > div:nth-child(2n) {
    border-right: 0;
  }

  .sellLabSummary > div,
  .sellMarginGrid > div,
  .sellAdaptiveDecision > div {
    border-bottom: 1px solid #d7e0dc;
  }

  .sellLabReport {
    padding: 10px;
  }

  .sellLabOverviewGrid {
    display: block;
  }

  .sellLabOverviewGrid > div + div {
    margin-top: 18px;
  }
}

@media (max-width: 460px) {
  .sellLabRuleBand,
  .sellLabSummary,
  .sellMarginGrid,
  .sellAdaptiveDecision {
    grid-template-columns: 1fr;
  }

  .sellLabRuleBand > div,
  .sellLabSummary > div,
  .sellMarginGrid > div,
  .sellAdaptiveDecision > div {
    border-right: 0;
  }
}
