.edge-lab-controls {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  border: 1px solid rgba(154, 98, 255, 0.28);
  background: rgba(15, 20, 28, 0.94);
  border-radius: 14px;
  padding: 14px;
}

.edge-control-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.edge-field {
  display: grid;
  gap: 6px;
}

.edge-field span {
  color: #8e98a8;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.edge-field input,
.edge-field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #f5f7fb;
  padding: 12px;
  font: inherit;
  min-height: 48px;
}

.edge-mode-row {
  display: grid;
  gap: 8px;
}

.edge-mode-row label {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  color: #d8deea;
  font-weight: 850;
}

.edge-state-roadmap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.edge-state-roadmap span {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px 10px;
  color: #cbd3df;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.035);
}

.edge-state-roadmap b {
  color: #9b63ff;
}

.edge-note {
  margin: 0;
  color: #f4bf5f;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.35;
}

.edge-results-list {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px;
}

.edge-empty-card,
.edge-result-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 20, 28, 0.94);
  border-radius: 14px;
  padding: 14px;
}

.edge-error-card {
  border-color: rgba(255, 86, 86, 0.4);
}

.edge-empty-card strong {
  display: block;
  color: #f5f7fb;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.edge-empty-card p,
.edge-result-card p {
  color: #aeb6c5;
  margin: 0 0 12px;
  line-height: 1.35;
}

.edge-result-card.trade-buy {
  border-color: rgba(98, 227, 111, 0.38);
  background: linear-gradient(145deg, rgba(20, 55, 35, 0.78), rgba(15, 20, 28, 0.95));
}

.edge-result-card.trade-sell {
  border-color: rgba(255, 86, 86, 0.38);
  background: linear-gradient(145deg, rgba(60, 28, 36, 0.78), rgba(15, 20, 28, 0.95));
}

.edge-result-card.trade-wait {
  border-color: rgba(244, 191, 95, 0.36);
  background: linear-gradient(145deg, rgba(52, 43, 28, 0.78), rgba(15, 20, 28, 0.95));
}

.edge-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.edge-result-head span {
  display: block;
  color: #9b63ff;
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.edge-result-head h3 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 1.18rem;
  line-height: 1.05;
}

.edge-result-head strong {
  color: #fff;
  font-size: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 64px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
}

.edge-state-list {
  display: grid;
  gap: 8px;
}

.edge-state-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.edge-state-row span {
  color: #f5f7fb;
  font-weight: 900;
}

.edge-state-row strong {
  font-weight: 950;
}

.edge-state-row small {
  grid-column: 1 / -1;
  color: #aeb6c5;
  line-height: 1.28;
}

.edge-state-pass strong {
  color: #62e36f;
}

.edge-state-wait strong {
  color: #f4bf5f;
}

.edge-state-fail strong {
  color: #ff5656;
}

.edge-state-learn strong {
  color: #62c9ff;
}

.edge-measure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.edge-measure-grid span {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px 10px;
  color: #f5f7fb;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.035);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edge-measure-grid b {
  display: block;
  color: #8e98a8;
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-bottom: 2px;
}

@media (min-width: 860px) {
  .edge-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edge-state-roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
