:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-style: normal;
  background: #0f172a;
  color: #e5eefb;
}

body {
  margin: 0;
  background: #0f172a;
  font-style: normal;
  font-weight: 400;
}

*,
*::before,
*::after {
  font-style: normal;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  box-sizing: border-box;
}

.narrow {
  max-width: 760px;
  margin: 0 auto;
}

.panel {
  width: min(1040px, 100%);
  background: #111827;
  border: 1px solid #263244;
  border-radius: 8px;
  padding: 32px;
  box-sizing: border-box;
}

.eyebrow {
  color: #7dd3fc;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  max-width: 860px;
  font-size: 2.1rem;
  font-weight: 760;
  line-height: 1.14;
  margin: 0 0 16px;
}

h2 {
  font-weight: 700;
  margin-top: 0;
}

p {
  color: #b6c2d6;
  font-weight: 400;
  line-height: 1.6;
}

a {
  color: #7dd3fc;
}

.actions,
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.button {
  color: #08111f;
  background: #7dd3fc;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  line-height: 1.2;
}

.secondary {
  color: #e5eefb;
  background: #1f2937;
}

.button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ghost-button {
  color: #e5eefb;
  background: transparent;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

.compact-button {
  padding: 8px 10px;
  width: fit-content;
}

.topbar {
  align-items: center;
  border-bottom: 1px solid #1f2937;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 18px 28px;
}

.brand {
  color: #e5eefb;
  font-weight: 760;
  text-decoration: none;
}

.topbar-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.topbar-nav a {
  color: #cbd5e1;
  font-weight: 650;
  text-decoration: none;
}

.topbar-nav a:hover,
.topbar-nav a:focus-visible {
  color: #f8fafc;
}

.section-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
}

.section-nav-link {
  background: #172033;
  border: 1px solid #263244;
  border-radius: 8px;
  color: #dbeafe;
  font-weight: 700;
  padding: 10px 14px;
  text-decoration: none;
}

.section-nav-link:hover,
.section-nav-link:focus-visible {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

.dashboard-section {
  scroll-margin-top: 96px;
}

.archive-panel {
  padding-top: 20px;
}

.archive-panel .section-heading {
  margin-bottom: 0;
}

.archive-panel .section-heading h2 {
  font-size: 1.1rem;
}

.archive-panel .muted {
  margin-top: 16px;
}

.app-shell {
  box-sizing: border-box;
  display: grid;
  gap: 24px;
  margin: 0 auto;
  max-width: 1320px;
  padding: 28px;
}

.dashboard-hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.wizard-panel {
  display: grid;
  gap: 24px;
  width: 100%;
}

.wizard-header {
  display: grid;
  gap: 16px;
}

.wizard-stepper {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.wizard-step {
  align-items: center;
  background: #172033;
  border: 1px solid #263244;
  border-radius: 8px;
  color: #dbeafe;
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 56px;
  padding: 12px 14px;
  text-align: left;
}

.wizard-step-number {
  align-items: center;
  background: #1f2937;
  border-radius: 999px;
  color: #f8fafc;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 760;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.wizard-step-label {
  font-weight: 700;
}

.wizard-step.is-active,
.wizard-step.is-complete {
  background: #1e293b;
  border-color: #7dd3fc;
}

.wizard-step.is-active .wizard-step-number,
.wizard-step.is-complete .wizard-step-number {
  background: #7dd3fc;
  color: #08111f;
}

.wizard-step.is-disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.wizard-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
}

.wizard-main {
  display: grid;
  gap: 20px;
}

.wizard-side {
  align-self: start;
  display: grid;
  gap: 16px;
  position: sticky;
  top: 92px;
  width: 100%;
}

.wizard-side-stack {
  display: grid;
  gap: 12px;
}

.wizard-side-preview,
.youtube-preview-media-card {
  --media-aspect-ratio: 16 / 9;
  background: #172033;
  border: 1px solid #263244;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: var(--media-aspect-ratio);
}

.wizard-side-preview[hidden],
.youtube-preview-media-card[hidden] {
  display: none;
}

.wizard-side-preview-video,
.youtube-preview-video {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
  background: #020617;
}

.wizard-side-card {
  background: #172033;
  border: 1px solid #263244;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.wizard-pane {
  display: none;
}

.wizard-pane.is-active {
  display: grid;
  gap: 18px;
}

.wizard-form {
  display: grid;
}

.wizard-actions-inline,
.wizard-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wizard-footer {
  align-items: center;
  justify-content: space-between;
}

.wizard-footer .button,
.wizard-footer .ghost-button {
  align-items: center;
  align-self: center;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  min-height: 44px;
  width: auto;
}

.wizard-submit {
  justify-self: start;
}

.card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.select-card {
  background: #172033;
  border: 1px solid #263244;
  border-radius: 8px;
  color: #e5eefb;
  cursor: pointer;
  display: grid;
  gap: 6px;
  padding: 16px;
  text-align: left;
}

.select-card.is-selected {
  border-color: #7dd3fc;
  box-shadow: inset 0 0 0 1px #7dd3fc;
}

.select-card strong {
  color: #f8fafc;
}

.select-card-meta {
  color: #91a1b8;
  font-size: 0.9rem;
}

.wizard-summary {
  margin-bottom: 4px;
}

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

.dashboard-grid .panel {
  width: 100%;
}

.dashboard-grid .panel:nth-child(3) {
  grid-column: 1 / -1;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  color: #dbeafe;
  display: grid;
  font-weight: 650;
  gap: 8px;
}

form .button {
  justify-self: start;
}

.upload-form {
  gap: 16px;
}

.upload-field {
  display: grid;
  gap: 10px;
}

.upload-label {
  color: #dbeafe;
  font-weight: 700;
}

.upload-dropzone {
  align-items: center;
  background: #172033;
  border: 1px dashed #334155;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-within,
.upload-dropzone.is-dragover {
  background: #1b2638;
  border-color: #7dd3fc;
  box-shadow: inset 0 0 0 1px #7dd3fc;
}

.upload-dropzone.has-file {
  background: #1a2a3f;
  border-style: solid;
}

.upload-dropzone input[type="file"] {
  display: none;
}

.upload-dropzone strong {
  color: #f8fafc;
  font-size: 1.1rem;
  font-weight: 760;
}

.upload-dropzone-icon {
  align-items: center;
  background: rgba(168, 85, 247, 0.18);
  border-radius: 999px;
  color: #c084fc;
  display: inline-flex;
  font-size: 2rem;
  height: 76px;
  justify-content: center;
  line-height: 1;
  width: 76px;
}

.upload-dropzone-subtitle,
.upload-dropzone-meta {
  color: #91a1b8;
  max-width: 360px;
}

.upload-dropzone-meta {
  font-size: 0.95rem;
}

.upload-submit {
  justify-self: start;
}

.upload-preview-card {
  align-items: start;
  background: #172033;
  border: 1px solid #263244;
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  padding: 18px;
}

.upload-preview-card[hidden] {
  display: none;
}

.upload-preview-media {
  --media-aspect-ratio: 16 / 9;
  background: #0f172a;
  border-radius: 8px;
  aspect-ratio: var(--media-aspect-ratio);
  overflow: hidden;
}

.upload-preview-video {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
  background: #020617;
}

.upload-preview-copy {
  display: grid;
  gap: 8px;
}

.upload-preview-copy strong {
  color: #f8fafc;
  font-size: 1.1rem;
}

input,
select,
textarea {
  background: #172033;
  border: 1px solid #334155;
  border-radius: 8px;
  box-sizing: border-box;
  color: #e5eefb;
  font: inherit;
  padding: 12px;
  width: 100%;
}

input[type="radio"] {
  width: auto;
}

textarea {
  resize: vertical;
}

.step-label {
  color: #7dd3fc;
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.muted {
  color: #91a1b8;
  font-size: 0.95rem;
}

.message {
  min-height: 24px;
}

.message[data-type="error"] {
  color: #fca5a5;
}

.message[data-type="success"] {
  color: #86efac;
}

.floating-message {
  margin: 0;
}

.publish-note {
  margin-bottom: 0;
}

.publish-options {
  border: 1px solid #263244;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 4px 0;
  padding: 14px;
}

.publish-options legend {
  color: #dbeafe;
  font-weight: 700;
  padding: 0 8px;
}

.choice-row {
  align-items: flex-start;
  background: #172033;
  border: 1px solid #263244;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.choice-row input {
  flex: 0 0 auto;
  margin-top: 4px;
}

.choice-row span {
  display: grid;
  gap: 4px;
}

.choice-row small,
.schedule-field small {
  color: #91a1b8;
  font-weight: 400;
  line-height: 1.45;
}

.schedule-field[hidden] {
  display: none;
}

.provider-settings {
  border-top: 1px solid #263244;
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
}

.provider-settings h3 {
  font-size: 1rem;
  margin: 0;
}

.provider-settings p {
  margin: 0;
}

.settings-subsection {
  display: grid;
  gap: 10px;
}

.settings-label {
  color: #dbeafe;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.privacy-options {
  display: grid;
  gap: 10px;
}

.choice-row-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.choice-row-disabled input {
  cursor: not-allowed;
}

.youtube-preview {
  background: #172033;
  border: 1px solid #263244;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.youtube-preview h3 {
  margin: 0;
}

.youtube-preview-media-card {
  margin-bottom: 4px;
}

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

.preview-grid > div {
  display: grid;
  gap: 4px;
}

.preview-label {
  color: #91a1b8;
  font-size: 0.82rem;
  font-weight: 650;
  text-transform: uppercase;
}

.preview-grid strong,
.preview-grid span {
  line-height: 1.45;
}

.publish-progress,
.inline-progress {
  align-items: center;
  border: 1px solid #263244;
  border-radius: 8px;
  color: #dbeafe;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.publish-progress[hidden],
.inline-progress[hidden] {
  display: none;
}

.list {
  margin-top: 18px;
}

.list-item {
  border: 1px solid #263244;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.list-item.is-selected {
  border-color: #7dd3fc;
  box-shadow: inset 0 0 0 1px #7dd3fc;
}

.list-item strong {
  color: #f8fafc;
  font-weight: 700;
}

.list-item span,
.target-row {
  color: #b6c2d6;
  font-size: 0.92rem;
}

.media-group {
  display: grid;
  gap: 12px;
}

.media-group h3 {
  margin: 0;
}

.media-status-block {
  display: grid;
  gap: 6px;
}

.muted-item {
  opacity: 0.64;
}

.job-item {
  gap: 12px;
}

.job-header {
  align-items: start;
  display: grid;
  gap: 8px;
}

.job-header-side {
  display: grid;
  gap: 8px;
}

.job-detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.job-detail-grid > div {
  display: grid;
  gap: 4px;
}

.detail-label {
  color: #91a1b8;
  font-size: 0.82rem;
  font-weight: 650;
  text-transform: uppercase;
}

.target-card {
  background: #172033;
  border: 1px solid #263244;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.target-card-header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.target-card-header > div {
  display: grid;
  gap: 6px;
}

.provider-pill {
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.job-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.job-meta-row span {
  color: #91a1b8;
  font-size: 0.86rem;
}

.job-link {
  font-weight: 700;
}

.job-error {
  background: rgba(127, 29, 29, 0.22);
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.job-error strong {
  color: #fecaca;
}

.media-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.section-heading-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
}

.target-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.status-badge {
  border-radius: 8px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 760;
  margin: 0 0 8px;
  padding: 5px 8px;
  width: fit-content;
}

.status-created,
.status-validated,
.status-scheduled,
.status-queued,
.status-uploaded,
.status-deleted {
  background: #1e293b;
  color: #bae6fd;
}

.status-processing {
  background: #312e81;
  color: #c7d2fe;
}

.status-success {
  background: #064e3b;
  color: #bbf7d0;
}

.status-failed {
  background: #7f1d1d;
  color: #fecaca;
}

@media (max-width: 960px) {
  .wizard-layout {
    grid-template-columns: 1fr;
  }

  .wizard-stepper {
    display: flex;
    gap: 10px;
    margin: 0 -4px;
    overflow-x: auto;
    padding: 0 4px 6px;
    scroll-snap-type: x proximity;
  }

  .wizard-step {
    flex: 0 0 172px;
    scroll-snap-align: start;
  }

  .wizard-side {
    gap: 12px;
    position: static;
    top: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .topbar,
  .section-heading,
  .media-row,
  .target-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .job-detail-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .upload-dropzone {
    min-height: 180px;
    padding: 20px;
  }

  .upload-dropzone-icon {
    height: 64px;
    width: 64px;
  }

  .upload-preview-card {
    grid-template-columns: 1fr;
  }

  .wizard-side-preview-video,
  .youtube-preview-video,
  .upload-preview-video {
    min-height: 260px;
  }
}

@media (max-width: 620px) {
  .shell,
  .app-shell {
    padding: 18px;
  }

  .panel {
    padding: 22px;
  }

  .wizard-step {
    flex-basis: 150px;
    gap: 8px;
    min-height: auto;
    padding: 12px;
  }

  .wizard-stepper {
    gap: 10px;
  }

  .wizard-step-label {
    font-size: 0.95rem;
  }

  .wizard-main,
  .wizard-pane.is-active {
    gap: 14px;
  }

  .wizard-side-card,
  .select-card {
    padding: 14px;
  }

  .upload-dropzone {
    min-height: 160px;
    padding: 18px;
  }

  .upload-dropzone strong {
    font-size: 1rem;
  }

  .wizard-side-preview-video,
  .youtube-preview-video,
  .upload-preview-video {
    min-height: 200px;
  }

  .wizard-footer {
    justify-content: flex-end;
  }

  h1 {
    font-size: 1.9rem;
  }
}
