.nest-panel {
  margin: 24px 0;
  border: 1px solid #263b43;
  border-radius: 20px;
  background: linear-gradient(120deg, #101b23, #0b1018);
  overflow: hidden;
  scroll-margin-top: 20px;
}
.nest-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
}
.nest-controls fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.nest-controls button,
.nest-download {
  border: 1px solid #37565e;
  border-radius: 9px;
  background: #152b32;
  color: #c1f5eb;
  padding: 11px 15px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.nest-controls button:disabled {
  opacity: 0.5;
}
.nest-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #afc1ca;
  font-size: 13px;
}
.nest-controls input {
  background: #0b141d;
  border: 1px solid #304350;
  border-radius: 6px;
  color: #e1eff3;
  padding: 8px;
  font: inherit;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.nest-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.nest-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px 36px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #25333c;
  padding: 10px 0;
  font-size: 13px;
}
.nest-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nest-item button {
  padding: 5px;
}
.nest-count {
  display: block;
  margin: 12px 0;
  color: #7e9da9;
  font-size: 13px;
}
.nest-rotations {
  display: flex;
  gap: 12px;
  margin: 14px 0;
}
.nest-rotations label {
  flex-direction: row;
  align-items: center;
}
.nest-rotations input {
  width: auto;
  accent-color: #77e1cd;
}
.nest-run {
  width: 100%;
  background: linear-gradient(100deg, #1c544f, #233e5c) !important;
}
.nest-stage {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #102c31aa, transparent 70%);
  border: 1px solid #26343d;
  border-radius: 12px;
  overflow: hidden;
}
.nest-stage [hidden],
.nest-panel [hidden] {
  display: none !important;
}
.nest-empty {
  color: #99b0ba;
  text-align: center;
  font-size: 15px;
  padding: 35px;
  line-height: 1.8;
}
.nest-error {
  margin: 28px;
  padding: 22px;
  max-width: 650px;
  border: 1px solid #c98770;
  border-radius: 10px;
  background: #352321;
  color: #ffd5c5;
  font-size: 17px;
  line-height: 1.6;
}
.nest-empty strong {
  color: #8ce3d6;
  font-size: 24px;
  font-weight: 400;
  display: block;
}
.nest-motion {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 30px;
  background-image:
    linear-gradient(#71dec90b 1px, transparent 1px),
    linear-gradient(90deg, #71dec90b 1px, transparent 1px);
  background-size: 32px 32px;
}
.nest-orbit {
  width: 160px;
  height: 110px;
  position: relative;
  transform: rotate(-15deg);
}
.nest-orbit i {
  position: absolute;
  width: 58px;
  height: 39px;
  border: 1px solid #7be1d4;
  background: #7be1d426;
  border-radius: 5px;
  animation: nest-drift 3s infinite alternate ease-in-out;
  box-shadow: 0 0 28px #6fe1c922;
}
.nest-orbit i:nth-child(2) {
  left: 78px;
  top: 0;
  animation-delay: -0.9s;
  border-color: #b9a2ef;
}
.nest-orbit i:nth-child(3) {
  left: 0;
  top: 60px;
  animation-delay: -1.7s;
}
.nest-orbit i:nth-child(4) {
  left: 78px;
  top: 60px;
  animation-delay: -2.4s;
  border-color: #b9a2ef;
}
.nest-motion span {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #9ad9d4;
}
.nest-motion small {
  font-size: 12px;
  color: #7e9da9;
}
@keyframes nest-drift {
  from {
    transform: translate(-12px, -8px) rotate(-8deg);
    opacity: 0.45;
  }
  to {
    transform: translate(9px, 6px) rotate(8deg);
    opacity: 1;
  }
}
.nest-sheets {
  width: 100%;
  padding: 18px;
  max-height: 650px;
  overflow: auto;
}
.nest-sheets:empty {
  display: none;
}
.nest-sheet p {
  font-size: 13px;
  color: #aec4ce;
}
.nest-sheet svg {
  display: block;
  width: 100%;
  max-height: 500px;
}
.nest-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 20px 0;
}
.nest-metrics span {
  display: block;
  font-size: 12px;
  color: #8fa9b5;
  margin-bottom: 7px;
}
.nest-metrics strong {
  font-size: 20px;
  font-weight: 450;
}
.nest-result-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
}
.nest-result-footer label {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nest-result-footer input {
  accent-color: #77e1cd;
}
.nest-status {
  font-size: 13px;
  color: #afc7d1;
  line-height: 1.7;
  margin: 18px 0 0;
}
.nest-notice {
  font-size: 12px;
  color: #cfb98a;
  margin-top: 12px;
}
.nest-progress {
  height: 2px;
  background: #1b323c;
}
.nest-progress > div {
  height: 100%;
  width: 0;
  background: #77dfce;
  transition: width 0.4s;
}
@media (max-width: 950px) {
  .nest-layout {
    grid-template-columns: 1fr;
  }
  .nest-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nest-orbit i {
    animation: none;
  }
  .nest-progress > div {
    transition: none;
  }
}

.process-switch {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 16px 0;
  font-size: 13px;
}
.process-switch input {
  width: auto !important;
}
.process-facts {
  margin-top: 15px;
  font-size: 13px;
}
.process-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
}
.process-facts dd {
  margin: 0;
  color: #c1e9e2;
}

#nestWarnings {
  padding: 12px 14px;
  border: 1px solid #8e6740;
  border-radius: 8px;
  background: #352619;
  color: #ffdda8;
  max-height: 120px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.5;
}
