.form-schema-editor { display: grid; gap: 16px; min-width: 0; }
.form-schema-editor__toolbar, .form-schema-editor__row-header, .form-schema-editor__row-controls, .form-schema-editor__field, .form-schema-editor__field-actions { display: flex; align-items: center; gap: 10px; }
.form-schema-editor__toolbar, .form-schema-editor__row-header { justify-content: space-between; }
.form-schema-editor__hint { color: #667085; font-size: 13px; }
.form-schema-editor__canvas { display: grid; gap: 14px; }
.form-schema-editor__row { overflow: hidden; border: 1px solid #dfe5ec; border-radius: 12px; background: #fff; }
.form-schema-editor__row.is-dragging { opacity: .45; }
.form-schema-editor__row.is-dragover { border-color: #155eef; box-shadow: 0 0 0 2px rgb(21 94 239 / 12%); }
.form-schema-editor__row-header { padding: 10px 12px; border-bottom: 1px solid #e7ebf0; background: #f8fafc; }
.form-schema-editor__row-drag-handle { cursor: grab; user-select: none; }
.form-schema-editor__row-drag-handle::before { content: '⋮⋮'; margin-right: 8px; color: #98a2b3; letter-spacing: -3px; }
.form-schema-editor__row-drag-handle:not([draggable="true"]) { cursor: default; }
.form-schema-editor__row-drag-handle:not([draggable="true"])::before { display: none; }
.form-schema-editor__row-controls .select-component-wrapper { width: 180px; }
.form-schema-editor__layout-help { width: 34px; min-width: 34px; height: 34px; padding: 0; border-radius: 50%; font-weight: 700; }
.form-schema-editor__add-field { width: max-content; justify-self: center; }
.tooltip-content { white-space: pre-line; }
.form-schema-editor__grid { display: grid; grid-template-columns: repeat(var(--form-schema-columns, 12), minmax(0, 1fr)); gap: 10px; padding: 12px; }
.form-schema-editor__cell { display: grid; align-content: start; gap: 8px; min-width: 0; min-height: 92px; padding: 8px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #fbfdff; transition: border-color .15s, background .15s; }
.form-schema-editor__cell.is-dragover { border-color: #155eef; background: #eef4ff; }
.form-schema-editor__field { justify-content: space-between; min-width: 0; padding: 9px 10px; border: 1px solid #dfe5ec; border-radius: 9px; background: #fff; cursor: grab; }
.form-schema-editor__field.is-system { border-left: 3px solid #155eef; }
.form-schema-editor__field.is-hidden { border-style: dashed; opacity: .65; }
.form-schema-editor__field.is-dragging { opacity: .45; }
.form-schema-editor__field-text { display: grid; min-width: 0; }
.form-schema-editor__field-text strong, .form-schema-editor__field-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-schema-editor__field-text span { color: #667085; font-size: 12px; }
.form-schema-editor__field-actions { flex: 0 0 auto; }
.form-schema-editor__visibility { width: max-content; padding-inline: 10px; }
.form-schema-editor__empty { padding: 48px 20px; border: 1px dashed #cbd5e1; border-radius: 12px; color: #667085; text-align: center; }
.form-schema-editor__field-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 12px; }
.form-schema-editor__options { display: grid; grid-column: 1 / -1; gap: 10px; padding: 12px; border: 1px solid #dfe5ec; border-radius: 10px; background: #f8fafc; }
.form-schema-editor__options[hidden] { display: none; }
.form-schema-editor__options-title { font-size: 14px; }
.form-schema-editor__options-hint { margin: 0; color: #667085; font-size: 12px; }
.form-schema-editor__options-list { display: grid; gap: 8px; }
.form-schema-editor__option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid #dfe5ec; border-radius: 9px; background: #fff; cursor: grab; }
.form-schema-editor__option.is-dragging { opacity: .45; }
.form-schema-editor__options-empty { padding: 14px; border: 1px dashed #cbd5e1; border-radius: 8px; color: #667085; text-align: center; }

.theme-dark .form-schema-editor__hint,
.theme-dark .form-schema-editor__field-text span,
.theme-dark .form-schema-editor__options-hint,
.theme-dark .form-schema-editor__empty,
.theme-dark .form-schema-editor__options-empty,
[data-theme="dark"] .form-schema-editor__hint,
[data-theme="dark"] .form-schema-editor__field-text span,
[data-theme="dark"] .form-schema-editor__options-hint,
[data-theme="dark"] .form-schema-editor__empty,
[data-theme="dark"] .form-schema-editor__options-empty {
  color: #94a3b8;
}

.theme-dark .form-schema-editor__row,
[data-theme="dark"] .form-schema-editor__row {
  border-color: #334155;
  background: #111827;
}

.theme-dark .form-schema-editor__row-header,
.theme-dark .form-schema-editor__options,
[data-theme="dark"] .form-schema-editor__row-header,
[data-theme="dark"] .form-schema-editor__options {
  border-color: #334155;
  background: #1e293b;
  color: #e2e8f0;
}

.theme-dark .form-schema-editor__cell,
[data-theme="dark"] .form-schema-editor__cell {
  border-color: #475569;
  background: #0f172a;
}

.theme-dark .form-schema-editor__field,
.theme-dark .form-schema-editor__option,
[data-theme="dark"] .form-schema-editor__field,
[data-theme="dark"] .form-schema-editor__option {
  border-color: #334155;
  background: #182235;
  color: #e2e8f0;
}

.theme-dark .form-schema-editor__row.is-dragover,
.theme-dark .form-schema-editor__cell.is-dragover,
[data-theme="dark"] .form-schema-editor__row.is-dragover,
[data-theme="dark"] .form-schema-editor__cell.is-dragover {
  border-color: #60a5fa;
  background: #172a46;
}

.theme-dark .form-schema-editor__field.is-system,
[data-theme="dark"] .form-schema-editor__field.is-system {
  border-left-color: #60a5fa;
}

.theme-dark .form-schema-editor__row-drag-handle::before,
[data-theme="dark"] .form-schema-editor__row-drag-handle::before {
  color: #64748b;
}
.form-schema-editor__add-option { width: max-content; }
@media (max-width: 720px) {
  .form-schema-editor__toolbar { align-items: flex-start; flex-direction: column; }
  .form-schema-editor__grid { grid-template-columns: 1fr; }
  .form-schema-editor__cell { grid-column: 1 !important; }
  .form-schema-editor__field-form { grid-template-columns: 1fr; }
  .form-schema-editor__option { grid-template-columns: minmax(0, 1fr) auto; }
}
