.demo-autopilot {
  position: fixed;
  z-index: 9000;
  right: 24px;
  bottom: 92px;
  width: min(390px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, .24);
  border-radius: 18px;
  background: rgba(8, 20, 42, .96);
  color: #fff;
  box-shadow: 0 24px 70px rgba(3, 12, 28, .34);
  backdrop-filter: blur(18px);
}

.demo-autopilot[hidden],
.demo-autopilot-cursor[hidden] { display: none !important; }

.demo-autopilot__top,
.demo-autopilot__meta,
.demo-autopilot__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-autopilot__top { justify-content: space-between; }
.demo-autopilot__top-actions { display: inline-flex; align-items: center; gap: 7px; }
.demo-autopilot__eyebrow {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.demo-autopilot__status {
  padding: 5px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 900;
}
.demo-autopilot__dismiss {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: #dbeafe;
  font: 800 18px/1 sans-serif;
  cursor: pointer;
}
.demo-autopilot[data-state="paused"] .demo-autopilot__status { background: #fef3c7; color: #92400e; }
.demo-autopilot[data-state="error"] .demo-autopilot__status { background: #fee2e2; color: #991b1b; }
.demo-autopilot__title { display: block; margin-top: 12px; font-size: 20px; line-height: 1.12; }
.demo-autopilot__message { min-height: 40px; margin: 7px 0 12px; color: #dbeafe; font-size: 13px; line-height: 1.45; }
.demo-autopilot__progress { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.14); }
.demo-autopilot__progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #34d399); transition: width .3s ease; }
.demo-autopilot__meta { justify-content: space-between; margin-top: 7px; color: #bfdbfe; font-size: 11px; font-weight: 800; }
.demo-autopilot__actions { flex-wrap: wrap; margin-top: 12px; }
.demo-autopilot__actions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.demo-autopilot__actions button:hover { background: rgba(255,255,255,.16); }
.demo-autopilot__actions button.danger { margin-left: auto; color: #fecaca; }

.demo-autopilot-cursor {
  position: fixed;
  z-index: 9001;
  top: 0;
  left: 0;
  pointer-events: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.demo-autopilot-cursor span {
  display: block;
  width: 20px;
  height: 20px;
  border: 4px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #2563eb;
  box-shadow: 0 6px 22px rgba(37, 99, 235, .45);
  transform: rotate(-45deg);
}
.demo-autopilot-cursor small {
  display: inline-block;
  margin: 5px 0 0 13px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font: 800 10px/1 Inter, sans-serif;
}
.demo-autopilot-cursor.is-clicking span { animation: demo-autopilot-click .55s ease; }
@keyframes demo-autopilot-click {
  0%, 100% { box-shadow: 0 6px 22px rgba(37,99,235,.45); }
  45% { box-shadow: 0 0 0 18px rgba(59,130,246,.18), 0 6px 22px rgba(37,99,235,.45); }
}

.demo-autopilot-target {
  position: relative;
  z-index: 20;
  outline: 4px solid rgba(37, 99, 235, .72) !important;
  outline-offset: 5px !important;
  box-shadow: 0 0 0 10px rgba(59, 130, 246, .12) !important;
  transition: outline-color .2s ease, box-shadow .2s ease !important;
}

.demo-control-room {
  overflow: hidden;
  border-color: rgba(37, 99, 235, .22);
  background:
    radial-gradient(circle at 88% 0%, rgba(59, 130, 246, .11), transparent 34%),
    #fff;
}
.demo-control-room__form {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
}
.demo-control-room__form .form-footer { grid-column: 1 / -1; }
.demo-control-room__cleanup {
  grid-column: 1 / -1;
  display: grid !important;
  grid-template-columns: auto minmax(210px, max-content) 1fr;
  align-items: center !important;
  gap: 8px 12px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #f7faff;
}
.demo-control-room__cleanup input[type="checkbox"] { margin: 0; }
.demo-control-room__cleanup small { color: #64748b; font-weight: 600; }
.demo-control-room__timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #dbe5f2;
}
.demo-control-room__timeline span {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #f3f7fd;
  color: #13223d;
  font-size: 12px;
}
.demo-control-room__timeline b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-control-room__timeline small { color: #64748b; font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .demo-autopilot { right: 12px; bottom: 82px; width: calc(100vw - 24px); }
  .demo-autopilot__actions button.danger { margin-left: 0; }
  .demo-control-room__form,
  .demo-control-room__timeline { grid-template-columns: 1fr; }
}

@media (min-width: 1100px) {
  .demo-autopilot[data-view="delivery"] {
    right: clamp(330px, 24vw, 430px);
    width: min(360px, calc(100vw - 680px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-autopilot-cursor,
  .demo-autopilot__progress i { transition: none; }
  .demo-autopilot-cursor.is-clicking span { animation: none; }
}
