/* Admin-only form contrast. Keep Unfold's spacing and responsive layout. */
#page :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="range"], [type="color"]), textarea:not(.django_ckeditor_5), select):not(.ck *) {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  background-color: #f1f5f9;
  border: 1px solid var(--ck-color-base-border, #ccced1);
  color: #111827;
}

#page :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="range"], [type="color"]), textarea:not(.django_ckeditor_5), select):not(.ck *):not([class*="max-w-"]) {
  max-width: 100%;
}

#page :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="range"], [type="color"]), textarea:not(.django_ckeditor_5), select):not(.ck *)::placeholder {
  color: #64748b;
  opacity: 1;
}

#page :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="range"], [type="color"]), textarea:not(.django_ckeditor_5), select):not(.ck *):focus {
  border-color: #2563eb;
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

html.dark #page :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="range"], [type="color"]), textarea:not(.django_ckeditor_5), select):not(.ck *) {
  background-color: #243244;
  border-color: #64748b;
  color: #f9fafb;
}

html.dark #page :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="range"], [type="color"]), textarea:not(.django_ckeditor_5), select):not(.ck *)::placeholder {
  color: #cbd5e1;
}

html.dark #page :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="range"], [type="color"]), textarea:not(.django_ckeditor_5), select):not(.ck *):focus {
  border-color: #93c5fd;
  outline-color: #93c5fd;
}

#page .ck-editor-container .ck.ck-editor__editable_inline {
  min-height: 500px;
}

html.dark #page .ck-editor-container .ck.ck-editor__editable_inline {
  background: #1f2937;
  color: #f9fafb;
  border-color: #64748b;
}

.sc-class-control {
  display: grid;
  gap: 8px;
  min-width: 280px;
  padding: 12px;
  background: #fff;
  color: #111827;
}

.sc-class-control__heading {
  font-size: 13px;
}

.sc-class-control__field {
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #fff;
  color: #111827;
}

.sc-class-control__field:focus-visible,
.sc-class-control__actions button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.sc-class-control__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sc-class-control__actions button {
  padding: 5px 8px;
  border: 1px solid #64748b;
  border-radius: 4px;
  background: #f8fafc;
  color: #111827;
  cursor: pointer;
}

.sc-class-control__status {
  min-height: 1.2em;
  font-size: 12px;
  color: #475569;
}

html.dark .sc-class-control {
  background: #1f2937;
  color: #f9fafb;
}

html.dark .sc-class-control__field,
html.dark .sc-class-control__actions button {
  background: #374151;
  border-color: #64748b;
  color: #f9fafb;
}

html.dark .sc-class-control__status {
  color: #cbd5e1;
}
