/* Ablauf-Seite: Schritt-Panels mit animierten Mini-Oberflächen. */
.flow-steps {
  display: grid;
  gap: 22px;
}
.flow-panel {
  padding: 28px;
  border: 1px solid rgba(124, 140, 255, 0.22);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0 0, rgba(33, 142, 255, 0.12), transparent 50%),
    rgba(10, 14, 32, 0.78);
}
.flow-panel header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.flow-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #9db6ff, #5b7cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.flow-panel h2 {
  margin: 2px 0 6px;
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.flow-panel header p {
  margin: 0;
  color: var(--muted);
}
.flow-ui {
  display: grid;
  place-items: center;
  padding: 34px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(3, 6, 16, 0.6);
}
.mini-window {
  width: min(460px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(124, 140, 255, 0.28);
  border-radius: 16px;
  background: rgba(14, 20, 42, 0.95);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  font-size: 13px;
}
.mini-window.team {
  width: min(560px, 100%);
}
.mini-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.mini-head small {
  margin-left: auto;
  font-weight: 400;
  color: var(--faint);
  font-size: 11px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
}
.mini-window label {
  display: grid;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.mini-input {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  width: 0;
  animation: type 1.6s steps(28) forwards;
}
.mini-input.type-1 {
  animation-delay: 0.3s;
}
.mini-input.type-2 {
  animation-delay: 1.9s;
}
.mini-input.type-3 {
  animation-delay: 3.5s;
}
@keyframes type {
  to {
    width: 100%;
  }
}
.mini-ok {
  padding: 9px 12px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.08);
  color: #6ee7b7;
  opacity: 0;
  animation: fade-in 0.6s ease 5.2s forwards;
}
@keyframes fade-in {
  to {
    opacity: 1;
  }
}
.mini-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.mini-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #5ec8ff, #34d399);
  animation: grow 3s ease forwards 0.3s;
}
@keyframes grow {
  to {
    width: 100%;
  }
}
.mini-report {
  display: grid;
  gap: 8px;
}
.mini-report .row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 10px;
  align-items: center;
}
.mini-report .row.head {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #f87171;
  animation: grow-bar 1.4s ease forwards 1s;
}
.bar.good i {
  background: #34d399;
}
.bar.keep i {
  background: #fcd34d;
}
.w-90 {
  --w: 90%;
}
.w-64 {
  --w: 64%;
}
.w-40 {
  --w: 40%;
}
.w-30 {
  --w: 30%;
}
.w-18 {
  --w: 18%;
}
.w-12 {
  --w: 12%;
}
@keyframes grow-bar {
  to {
    width: var(--w);
  }
}
.mini-report + .mini-ok,
.mini-progress.done + .mini-actions {
  animation-delay: 3s;
}
.team-net {
  position: relative;
  height: 230px;
}
.team-net svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.net-lines line {
  stroke: rgba(124, 160, 255, 0.45);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 4 6;
  animation: dash 6s linear infinite;
}
@keyframes dash {
  to {
    stroke-dashoffset: -100;
  }
}
.member {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 6px 10px;
  border: 1px solid rgba(124, 160, 255, 0.45);
  border-radius: 10px;
  background: #121a38;
  font-size: 11px;
  white-space: nowrap;
  animation: speak 7s ease-in-out infinite;
}
.member.lead {
  left: 50%;
  top: 50%;
  border-color: #fb923c;
  background: #2a1c10;
  color: #fdba74;
  font-weight: 600;
}
.member.m1 {
  left: 17%;
  top: 20%;
  animation-delay: 1s;
}
.member.m2 {
  left: 83%;
  top: 20%;
  animation-delay: 2s;
}
.member.m3 {
  left: 13%;
  top: 68%;
  animation-delay: 3s;
}
.member.m4 {
  left: 87%;
  top: 68%;
  animation-delay: 4s;
}
.member.m5 {
  left: 32%;
  top: 92%;
  animation-delay: 5s;
}
.member.m6 {
  left: 68%;
  top: 92%;
  animation-delay: 6s;
}
@keyframes speak {
  0%,
  10%,
  100% {
    box-shadow: none;
  }
  4% {
    box-shadow: 0 0 18px rgba(94, 200, 255, 0.7);
  }
}
.bubble {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 8px;
  background: #e8f1ff;
  color: #0b1530;
  font-size: 11px;
  white-space: nowrap;
  animation: bubble 7s ease-in-out infinite;
}
@keyframes bubble {
  0%,
  100% {
    opacity: 0;
  }
  15%,
  60% {
    opacity: 1;
  }
}
.mini-tests {
  display: grid;
  gap: 6px;
  color: #6ee7b7;
}
.mini-score {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.mini-score b {
  color: #6ee7b7;
}
.mini-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mini-btn {
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  text-decoration: none;
  color: #fff;
}
.mini-btn.primary {
  border-color: rgba(52, 211, 153, 0.6);
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}
.mini-btn.wide {
  display: block;
  border-color: transparent;
  background: linear-gradient(90deg, #6d7cff, #8b5cf6);
  color: #fff;
}
.mini-wf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.mini-toggle {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--muted);
}
.mini-toggle.on {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
}
.mini-chat {
  display: grid;
  gap: 8px;
}
.mini-chat p {
  max-width: 85%;
  margin: 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  opacity: 0;
  animation: fade-in 0.5s ease forwards;
}
.mini-chat p:nth-child(2) {
  animation-delay: 1.2s;
}
.mini-chat p:nth-child(3) {
  animation-delay: 2.4s;
}
.mini-chat .me {
  justify-self: end;
  background: rgba(109, 124, 255, 0.3);
}
.mini-chat small {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 10px;
}
@media (prefers-reduced-motion: reduce) {
  .mini-input,
  .mini-ok,
  .mini-progress span,
  .bar i,
  .mini-chat p {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
  .net-lines line,
  .member,
  .bubble {
    animation: none;
  }
  .bubble {
    opacity: 1;
  }
}
@media (max-width: 700px) {
  .flow-panel {
    padding: 18px;
  }
  .flow-panel header {
    flex-direction: column;
    gap: 6px;
  }
  .team-net .member {
    font-size: 9px;
    padding: 4px 6px;
  }
}
/* Animationen erst starten, wenn das Panel sichtbar ist. */
.js .flow-panel:not(.is-visible) * {
  animation-play-state: paused;
}
