.vpc-body {
  background: #0A0A0F;
}

.vpc-heading {
  grid-template-columns: minmax(0, 820px) auto;
}

.vpc-workspace {
  grid-template-columns: minmax(320px, 0.92fr) minmax(560px, 1.3fr);
}

.vpc-form {
  position: sticky;
  top: 84px;
}

.vpc-workflow-card,
.vpc-preset-block,
.vpc-fit-card,
.vpc-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #111118;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.vpc-preset-block {
  background: #161620;
}

.vpc-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.vpc-card-header strong {
  color: #EDEDF5;
  font: 800 1rem var(--font-display);
}

.vpc-card-header span {
  color: #8888A0;
  font-size: 0.8rem;
  font-weight: 800;
}

.vpc-steps {
  display: grid;
  gap: 9px;
}

.vpc-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  background: #161620;
}

.vpc-step > span,
.action-step > span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #2A2A3A;
  color: #B8B8CC;
  font-size: 0.82rem;
  font-weight: 900;
}

.vpc-step strong {
  display: block;
  color: #B8B8CC;
  font-size: 0.9rem;
  line-height: 1.25;
}

.vpc-step em {
  display: block;
  margin-top: 2px;
  color: #8888A0;
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
}

.vpc-step.is-active {
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(37, 99, 235, 0.07);
}

.vpc-step.is-active > span {
  background: linear-gradient(135deg, #2563eb, #10b981);
  color: #ffffff;
}

.vpc-step.is-done > span {
  background: #0f766e;
  color: #ffffff;
}

.vpc-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  background: #111118;
  color: #B8B8CC;
  cursor: pointer;
  font: 800 0.82rem var(--font-sans);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.preset-chip:hover {
  border-color: rgba(37, 99, 235, 0.48);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.preset-chip.is-active {
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.1);
  color: #0f766e;
}

.vpc-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vpc-actions .action-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.vpc-actions .btn {
  width: 100%;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.vpc-output .output-header {
  align-items: flex-start;
}

.vpc-regen-control {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vpc-regen-control select {
  width: min(230px, 100%);
}

.vpc-result {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.vpc-result[hidden] {
  display: none !important;
}

.vpc-fit-card {
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: stretch;
  border-color: rgba(37, 99, 235, 0.18);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.08)),
    #ffffff;
}

.vpc-fit-card h3 {
  margin: 0 0 8px;
  color: #EDEDF5;
  font: 900 1.35rem/1.15 var(--font-display);
}

.vpc-fit-card p {
  margin: 0;
  color: #B8B8CC;
  line-height: 1.5;
}

.fit-score {
  display: grid;
  place-items: center;
  gap: 4px;
  border-radius: 8px;
  background: #111118;
  border: 1px solid rgba(255,255,255,0.08);
}

.fit-score span {
  color: #8888A0;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.fit-score strong {
  color: #EDEDF5;
  font: 900 2.2rem/1 var(--font-display);
}

.vpc-expert-row {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: #111118;
  border: 1px solid rgba(255,255,255,0.08);
}

.vpc-expert-row strong {
  color: #EDEDF5;
  font-size: 0.86rem;
}

.vpc-expert-row span {
  color: #B8B8CC;
  line-height: 1.45;
}

.vpc-canvas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.vpc-column {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #111118;
}

.vpc-block,
.vpc-mini-card,
.vpc-experiment-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #161620;
}

.vpc-block h3,
.vpc-mini-card h3,
.vpc-experiment-card h3 {
  margin: 0;
  color: #EDEDF5;
  font: 900 1rem/1.2 var(--font-display);
}

.vpc-tag {
  display: block;
  margin: 6px 0;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #111118;
  color: #B8B8CC;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.42;
}

.vpc-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vpc-experiment-list {
  display: grid;
  gap: 12px;
}

.vpc-experiment-card p {
  margin: 0;
  color: #B8B8CC;
  line-height: 1.48;
}

.vpc-loader {
  display: grid;
  gap: 16px;
  place-items: center;
  min-height: 420px;
  padding: 34px 16px;
  text-align: center;
}

.vpc-loader-canvas {
  position: relative;
  width: min(360px, 100%);
  height: 164px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vpc-loader-half {
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: #111118;
  overflow: hidden;
}

.vpc-loader-half::before,
.vpc-loader-half::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dbeafe, #d1fae5, #fef3c7);
  animation: vpc-shimmer 1.4s ease-in-out infinite;
}

.vpc-loader-half::before {
  top: 42px;
}

.vpc-loader-half::after {
  top: 86px;
  animation-delay: 0.25s;
}

.vpc-loader strong {
  color: #EDEDF5;
  font: 900 1.35rem var(--font-display);
}

.vpc-loader p {
  margin: 4px 0 0;
  color: #8888A0;
  font-weight: 700;
}

@keyframes vpc-shimmer {
  0%, 100% {
    transform: translateX(-8px);
    opacity: 0.55;
  }
  50% {
    transform: translateX(8px);
    opacity: 1;
  }
}

@media (max-width: 1040px) {
  .vpc-workspace,
  .vpc-heading {
    grid-template-columns: 1fr;
  }

  .vpc-form {
    position: static;
  }
}

@media (max-width: 760px) {
  .vpc-actions,
  .vpc-canvas-grid,
  .vpc-card-grid,
  .vpc-fit-card {
    grid-template-columns: 1fr;
  }

  .vpc-card-header,
  .vpc-output .output-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .vpc-regen-control {
    width: 100%;
    justify-content: stretch;
  }

  .vpc-regen-control select,
  .vpc-regen-control .btn {
    width: 100%;
  }
}
