.creative-intro,
.creative-note,
.creative-tasks-table small,
.creative-fields small {
  color: #888;
  font-size: 12px;
  line-height: normal;
}
.creative-intro {
  margin: -3px 0 12px;
}
.creative-new {
  padding: 8px 16px;
  font-size: 13px;
}
.creative-tasks-table small,
.creative-fields small {
  display: block;
}
.creative-tasks-table td {
  font-size: 12px;
  vertical-align: middle;
}
.creative-tasks-table td:not(:nth-child(2)) {
  white-space: nowrap;
}
.creative-tasks-table td:nth-child(2) {
  min-width: 130px;
}
.creative-tasks-table strong {
  font-size: 13px;
}
.creative-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.creative-row-actions form {
  display: flex;
  gap: 4px;
  align-items: center;
}
.creative-row-actions output:empty {
  display: none;
}
.creative-state {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  color: #716b7e;
  background: #efedf2;
}
.creative-state.is-online {
  color: #217750;
  background: #e6f5ed;
}
.creative-link,
.creative-delete,
.creative-close {
  cursor: pointer;
  font: inherit;
}
.creative-link,
.creative-delete {
  border: 0;
  background: transparent;
  padding: 3px 0;
  color: #786ca8;
  font-size: 12px;
}
.creative-link:hover,
.creative-delete:hover {
  text-decoration: underline;
}
.server-dialog.creative-editor {
  width: min(780px, calc(100% - 24px));
  max-height: 88dvh;
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 10px 40px #0003;
  font-size: 13px;
}
.creative-editor::backdrop,
.creative-preview::backdrop {
  background: #0006;
}
.creative-editor > header,
.creative-preview > header {
  align-items: flex-start;
  padding: 18px 22px 12px;
  border-bottom: 1px solid #e1def0;
}
.creative-editor h3 {
  font-size: 16px;
  line-height: normal;
}
.creative-editor .creative-note {
  margin: 6px 0 0;
}
.server-dialog > header .creative-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #f5f4fa;
  color: #716991;
  font-size: 22px;
  line-height: 1;
  flex: none;
}
.creative-editor form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  gap: 0;
}
.creative-fields {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px 22px;
  min-height: 0;
  line-height: normal;
}
.creative-fields > :is(span, label) {
  color: #6b6494;
}
.creative-fields label {
  margin: 0;
  font-size: 13px;
  line-height: inherit;
}
.creative-fields input:not([type="checkbox"], [type="radio"], [type="file"]),
.creative-fields select,
.creative-fields textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 5px 8px;
  height: 31px;
  color: #111;
  background: white;
  font: inherit;
}
.creative-fields select {
  width: auto;
  cursor: pointer;
}
.creative-fields input:is([type="checkbox"], [type="radio"]) {
  margin: 0;
  cursor: pointer;
}
.creative-fields .creative-inline,
.creative-fields .creative-dates {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.creative-fields .creative-inline label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  cursor: pointer;
}
.creative-fields .creative-inline[hidden],
.creative-fields [hidden] {
  display: none;
}
.creative-fields .creative-fee label {
  margin-right: 0;
}
.creative-fields input[name="fee"],
.creative-tiers-table input[name="tier_reward"] {
  width: 80px;
}
.creative-fields input[name="days"] {
  width: 60px;
}
.creative-fields .creative-long-text {
  padding: 6px 0 16px;
}
.creative-fields textarea {
  display: block;
  height: 52px;
  min-height: 52px;
  resize: vertical;
  border-radius: 10px;
  border-color: #dfdbee;
  padding: 10px 12px;
}
.creative-material [data-file-status],
.creative-material .attachment-previews:not(:empty) {
  margin-top: 6px;
}
.creative-material [data-file-item] {
  width: 96px;
  max-width: 100%;
  align-items: flex-start;
}
.creative-material .attachment-thumbnail {
  width: 100%;
  height: 64px;
}
.creative-material [data-file-item] > span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
@media (min-width: 641px) {
  #creative-material-label {
    align-self: start;
    padding-top: 7px;
  }
}
.creative-material .creative-attach {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 4px 12px;
  border-color: #dcd7ea;
  border-radius: 6px;
  color: #655986;
  background: #f5f4fa;
  font-size: 12px;
  cursor: pointer;
  overflow: hidden;
}
.creative-attach input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.creative-attach:focus-within {
  outline: 2px solid #8b82be;
}
.creative-attach:has(input:disabled) {
  opacity: 0.6;
}
.creative-tiers-table {
  width: auto;
  border-collapse: collapse;
  font-size: 13px;
}
.creative-tiers-table :is(th, td) {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
}
.creative-tiers-table th {
  background: #f9f9fb;
  color: #666;
  font-weight: 700;
}
.creative-tiers-table [data-creative-tier] {
  display: table-row;
}
.creative-tiers-table input[name="tier_likes"],
.creative-tiers-table input[name="tier_upper"] {
  width: 90px;
}
.creative-delete {
  color: #c23030;
}
.creative-secondary.server-button {
  background: #eee;
  color: #333;
  border-color: #eee;
}
.creative-secondary.server-button:hover {
  background: #e4e2e8;
}
.creative-editor [data-add-tier] {
  margin: 6px 0 4px;
}
.creative-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.creative-dates label {
  display: block;
}
.creative-fields .creative-dates admin-datetime input[type="datetime-local"] {
  width: 170px;
  min-width: 0;
}
.creative-editor footer {
  padding: 12px 22px 16px;
  border-top: 1px solid #e1def0;
  gap: 8px;
}
.creative-editor footer output {
  flex: 1;
  min-width: 0;
  color: #aa3846;
  line-height: 1.35;
}
.creative-editor footer .server-button {
  padding: 8px 17px;
  font-size: 13px;
  flex: none;
}
.creative-preview {
  padding: 0;
  width: min(420px, calc(100% - 24px));
  max-height: 88dvh;
  background: #f6f5fa;
}
.creative-preview header {
  background: white;
  align-items: center;
}
.creative-preview .server-dialog-body {
  padding: 12px;
}
.creative-preview section {
  border-radius: 12px;
  background: white;
  padding: 14px;
  margin-bottom: 8px;
}
.creative-preview .creative-preview-hero {
  background: linear-gradient(130deg, #edeafb, #f7f5ff);
}
.creative-preview h3 {
  margin: 8px 0 14px;
  font-size: 19px;
}
.creative-preview h4 {
  border-left: 3px solid #968ac4;
  padding-left: 8px;
  margin: 14px 0 5px;
}
.creative-preview h4:first-child {
  margin-top: 0;
}
.creative-preview p {
  margin: 0;
  color: #686279;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.creative-amounts {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  font-size: 12px;
}
.creative-amounts b {
  display: block;
  font-size: 16px;
}
.creative-amounts span:last-child b {
  color: #bc4d50;
}
.creative-reward-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
  margin: 5px 0;
  border-radius: 4px;
  background: #f4f1fa;
  font-size: 13px;
}

.creative-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0;
  margin: 10px 0 16px;
  counter-reset: step;
  list-style: none;
  font-size: 12px;
  text-align: center;
}
.creative-steps li {
  position: relative;
  counter-increment: step;
}
.creative-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  margin: 0 auto 5px;
  border-radius: 50%;
  background: #eeeafb;
  color: #6e629a;
  font-weight: 700;
}
.creative-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 100%;
  border-top: 1px solid #ded8ed;
}
.creative-ladder {
  display: flex;
  flex-direction: column-reverse;
}
.creative-reward-line {
  position: relative;
  isolation: isolate;
}
.creative-reward-line progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  appearance: none;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
}
.creative-reward-line progress::-webkit-progress-bar {
  background: #faf9fc;
}
.creative-reward-line progress::-webkit-progress-value {
  border-radius: inherit;
  background: #e6dff4;
}

@media (max-width: 640px) {
  .server-dialog.creative-editor {
    max-height: calc(100dvh - 16px);
    width: calc(100% - 16px);
  }
  .creative-editor > header,
  .creative-fields,
  .creative-editor footer {
    padding: 12px 14px;
  }
  .creative-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
  .creative-fields > :is(span, label):not(:first-child) {
    margin-top: 6px;
  }
  .creative-fields .creative-long-text {
    padding: 0;
  }
  .creative-tiers-table {
    width: 100%;
    table-layout: fixed;
  }
  .creative-tiers-table :is(td, th) {
    padding: 5px 3px;
  }
  .creative-tiers-table :is(th, td):last-child {
    width: 35px;
  }
  .creative-fields .creative-tiers-table input {
    width: 100%;
  }
  .creative-fields .creative-dates {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 3px;
  }
  .creative-dates label {
    min-width: 0;
    flex: 1;
  }
  .creative-fields .creative-dates admin-datetime input[type="datetime-local"] {
    width: 100%;
    font-size: 11px;
  }
  .creative-dates .datetime-display {
    font-size: 11px;
    padding: 0 2px;
  }
  .creative-dates admin-datetime::after {
    right: 3px;
    width: 9px;
    height: 10px;
  }
}
