/* YouTube Autopilot: pannello admin compatto e player link workflow. */
#autopilotPage {
  min-height: calc(100vh - 76px);
  padding: clamp(22px, 5vw, 54px) 4vw 70px;
  background: #15171d;
  color: #fff;
}

.autopilot-panel {
  width: min(980px, 100%);
  margin: 0 auto;
}

.autopilot-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.autopilot-panel h1,
.autopilot-panel h2 {
  margin: 0;
  color: #fff;
  letter-spacing: -.035em;
}

.autopilot-panel h1 { font-size: clamp(2rem, 5vw, 3.7rem); }
.autopilot-panel h2 { font-size: clamp(1.25rem, 3vw, 1.8rem); }

.autopilot-lead {
  max-width: 64ch;
  margin: 12px 0 0;
  color: #c4c8d0;
  font-size: 1rem;
  line-height: 1.6;
}

.autopilot-form,
.autopilot-result,
.autopilot-assigned {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid #ffffff18;
  border-radius: 22px;
  background: #20232b;
  box-shadow: 0 18px 48px #00000025;
}

.autopilot-form { display: grid; gap: 15px; }
.autopilot-form label { display: grid; gap: 7px; color: #f3f4f6; font-size: .8rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.autopilot-form input,
.autopilot-form select,
.autopilot-form textarea,
.autopilot-url {
  width: 100%;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  background: #101218;
  color: #fff;
  padding: 12px 13px;
  outline: 0;
}
.autopilot-form input,
.autopilot-form select { min-height: 48px; }
.autopilot-form textarea { min-height: 112px; resize: vertical; line-height: 1.45; }
.autopilot-form input:focus-visible,
.autopilot-form select:focus-visible,
.autopilot-form textarea:focus-visible,
.autopilot-url:focus-visible { outline: 3px solid #ff806966; border-color: #ff8069; }
.autopilot-form-grid { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(0, 1.35fr); gap: 15px; }
.autopilot-manual { display: grid; gap: 13px; padding: 18px; border: 1px solid #ff806955; border-radius: 16px; background: linear-gradient(145deg, #2a2528, #20232b); }
.autopilot-manual h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); }
.autopilot-manual .eyebrow-small { margin-bottom: 5px; }
.autopilot-manual .button { justify-self: start; min-height: 44px; }
.autopilot-automatic-divider { display: flex; align-items: center; gap: 12px; color: #858c98; font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.autopilot-automatic-divider::before,
.autopilot-automatic-divider::after { content: ''; flex: 1; height: 1px; background: #ffffff18; }
.autopilot-help { margin: 0; color: #aeb4bf; font-size: .82rem; line-height: 1.5; }
.autopilot-form-actions,
.autopilot-result-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.autopilot-form .button,
.autopilot-result .button,
.autopilot-panel-head .button { min-height: 44px; }
.autopilot-status { min-height: 24px; margin: 14px 3px; color: #c8ced8; font-size: .9rem; font-weight: 800; }
.autopilot-status[data-kind="error"] { color: #ff9a86; }
.autopilot-status[data-kind="success"] { color: #8fe0b4; }
.autopilot-result { display: grid; gap: 17px; margin-bottom: 24px; border-color: #ff806955; background: linear-gradient(145deg, #2a2528, #20232b); }
.autopilot-url { min-height: 48px; margin-top: 7px; color: #ffd6cb; font-size: .78rem; }
.autopilot-summary { margin: 9px 0 0; color: #f6d1c6; font-size: .9rem; font-weight: 800; }
.autopilot-embed-block { display: grid; gap: 10px; padding: 18px; border: 1px solid #ffffff24; border-radius: 16px; background: #101218; }
.autopilot-embed-block .eyebrow-small { margin: 0; }
.autopilot-embed {
  width: 100%;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  background: #0a0c11;
  color: #cfe3ff;
  padding: 12px 13px;
  outline: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
  line-height: 1.5;
  resize: vertical;
  white-space: pre;
}
.autopilot-embed:focus-visible { outline: 3px solid #ff806966; border-color: #ff8069; }
.autopilot-embed-block .button { justify-self: start; min-height: 44px; }
.autopilot-assigned { margin-top: 24px; }
.autopilot-assigned > .autopilot-help { margin: 8px 0 17px; }
.autopilot-assigned-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid #ffffff12; }
.autopilot-assigned-row strong,
.autopilot-assigned-row small { display: block; }
.autopilot-assigned-row strong { color: #fff; font-size: .92rem; }
.autopilot-assigned-row small { margin-top: 4px; color: #aeb4bf; font-size: .8rem; }
.autopilot-assigned-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.autopilot-panel .eyebrow-small { color: #ff937d; }

@media (max-width: 640px) {
  #autopilotPage { min-height: 100vh; padding-inline: 16px; }
  .autopilot-panel-head { display: grid; gap: 17px; }
  .autopilot-panel-head .button { justify-self: start; }
  .autopilot-form-grid { grid-template-columns: 1fr; }
  .autopilot-manual .button { width: 100%; }
  .autopilot-form-actions .button,
  .autopilot-result-actions .button { flex: 1 1 140px; }
  .autopilot-assigned-row { align-items: flex-start; flex-direction: column; }
  .autopilot-assigned-actions { width: 100%; }
  .autopilot-assigned-actions .button { flex: 1 1 140px; }
}
