.uc-control-root { height: 100%; min-height: 0; box-sizing: border-box; }
.uc-theme-base,
.uc-theme-flat {
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 13px;
  color: #222;
  background: #fff;
}
.uc-dock-layout { display: flex; flex-direction: column; height: 100%; min-height: 520px; border: 1px solid #d8dce2; background: #fff; box-sizing: border-box; overflow: hidden; }
.uc-dock-top { flex: 0 0 auto; border-bottom: 1px solid #d8dce2; background: #fafafa; }
.uc-workbench-header { display: flex; align-items: center; min-height: 34px; border-bottom: 1px solid #e5e8ed; }
.uc-workbench-title { flex: 0 0 auto; padding: 8px 10px; font-weight: bold; }
.uc-workbench-menubar { flex: 1 1 auto; display: flex; gap: 4px; padding: 4px 6px; }
.uc-workbench-toolbar, .uc-toolbar { display: flex; gap: 4px; padding: 5px 6px; min-height: 28px; box-sizing: border-box; }
.uc-menu-group { position: relative; display: inline-block; }
.uc-menu-root, .uc-menu-item, .uc-tool-button, .uc-palette-item, .uc-palette-group-header, .uc-outline-item { border: 1px solid transparent; background: transparent; padding: 4px 8px; cursor: pointer; text-align: left; color: #1f2937; }
.uc-menu-root { min-width: 52px; text-align: center; }
.uc-menu-group:hover .uc-menu-items { display: block; }
.uc-menu-items { display: none; position: absolute; top: 25px; left: 0; min-width: 190px; background: #fff; border: 1px solid #cfd5dd; box-shadow: 0 2px 8px rgba(0,0,0,.12); z-index: 50; padding: 4px 0; }
.uc-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; white-space: nowrap; }
.uc-menu-shortcut { color: #64748b; font-size: 12px; }
.uc-tool-button { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; border-color: #d8dce2; background: #fff; border-radius: 2px; }
.uc-tool-icon { width: 8px; height: 8px; border: 1px solid #94a3b8; background: #f8fafc; display: inline-block; }
.uc-tool-button:hover, .uc-menu-root:hover, .uc-menu-item:hover, .uc-palette-item:hover, .uc-outline-item:hover { background: #eef4ff; border-color: #cbdaf4; }
.uc-tool-button:disabled, .uc-menu-item:disabled { opacity: .45; cursor: default; }
.uc-toolbar { align-items: center; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.uc-tool-button {
  width: 32px;
  height: 30px;
  min-width: 32px;
  min-height: 30px;
  padding: 0;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}
.uc-tool-label { display: none !important; }
.uc-toolbar-separator { flex: 0 0 1px; }

.uc-dock-middle { display: flex; flex: 1 1 auto; min-height: 0; }
.uc-dock-region { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #fbfbfc; }
.uc-dock-left, .uc-dock-right { flex: 0 0 250px; width: 250px; }
.uc-dock-left { border-right: 1px solid #d8dce2; }
.uc-dock-right { border-left: 1px solid #d8dce2; }
.uc-dock-center { flex: 1 1 auto; background: #f5f7fa; }
.uc-dock-bottom { flex: 0 0 150px; min-height: 72px; border-top: 1px solid #d8dce2; }
.uc-dock-left.is-empty, .uc-dock-right.is-empty { flex-basis: 0; width: 0; border-left: 0; border-right: 0; overflow: hidden; }
.uc-dock-bottom.is-empty { flex-basis: 0; min-height: 0; border-top: 0; overflow: hidden; }
.uc-dock-tabs { flex: 0 0 auto; display: flex; align-items: stretch; min-height: 29px; border-bottom: 1px solid #d8dce2; background: #f3f5f8; overflow-x: auto; overflow-y: hidden; }
.uc-dock-tab { display: inline-flex; align-items: center; gap: 6px; border: 0; border-right: 1px solid #d8dce2; border-bottom: 2px solid transparent; background: transparent; padding: 5px 8px; cursor: pointer; color: #334155; white-space: nowrap; }
.uc-dock-tab:hover { background: #fff; }
.uc-dock-tab.is-active { background: #fff; border-bottom-color: #2563eb; color: #0f172a; font-weight: bold; }
.uc-dock-tab.is-hidden { display: none; }
.uc-dock-tab-close { color: #64748b; font-weight: normal; padding: 0 2px; }
.uc-dock-tab-close:hover { color: #dc2626; }
.uc-dock-stack { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.uc-dock-panel { display: none; position: absolute; inset: 0; min-height: 0; overflow: hidden; }
.uc-dock-panel.is-active { display: flex; flex-direction: column; }
.uc-dock-panel.is-hidden { display: none !important; }
.uc-dock-panel-title, .uc-panel-title { padding: 6px 8px; font-weight: bold; background: #f1f3f6; border-bottom: 1px solid #d8dce2; }
.uc-dock-panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 6px; box-sizing: border-box; }
.uc-dock-center .uc-dock-panel-body { padding: 0; overflow: hidden; }
.uc-dock-status, .uc-statusbar { flex: 0 0 auto; min-height: 25px; box-sizing: border-box; }
.uc-statusbar { padding: 5px 8px; color: #475569; border-top: 1px solid #e5e8ed; background: #fafafa; }
.uc-palette-filter { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; padding: 5px 6px; margin-bottom: 6px; }
.uc-palette-group { margin-bottom: 4px; border: 1px solid #e2e5ea; background: #fff; }
.uc-palette-group-header { display: flex; width: 100%; align-items: center; gap: 5px; font-weight: bold; background: #f8f9fb; }
.uc-palette-group-title { flex: 1; }
.uc-palette-count { min-width: 18px; border-radius: 9px; background: #e2e8f0; color: #475569; font-size: 11px; text-align: center; }
.uc-palette-items { display: none; padding: 4px; }
.uc-palette-group.is-open .uc-palette-items { display: block; }
.uc-palette-item { display: flex; width: 100%; align-items: center; gap: 6px; margin: 2px 0; }
.uc-palette-icon { width: 12px; height: 12px; border: 1px solid #94a3b8; background: #f8fafc; }
.uc-outline-list { list-style: none; margin: 0; padding: 0; }
.uc-outline-item { display: block; width: 100%; }
.uc-outline-item.is-selected { background: #dbeafe; border-color: #93c5fd; }
.uc-designer-canvas { height: 100%; padding: 12px; box-sizing: border-box; }
.uc-canvas-surface { position: relative; height: 100%; min-height: 420px; background: #fff; border: 1px solid #cfd5dd; overflow: hidden; box-sizing: border-box; }
.uc-component { position: absolute; border: 1px solid #94a3b8; background: #fff; box-sizing: border-box; display: flex; align-items: center; padding: 4px 8px; cursor: move; }
.uc-component.is-selected { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.18); }
.uc-component-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-resize-handle { position: absolute; width: 8px; height: 8px; right: -4px; bottom: -4px; background: #2563eb; cursor: nwse-resize; display: none; }
.uc-component.is-selected .uc-resize-handle { display: block; }
.uc-property-title { padding: 6px 0; font-size: 12px; color: #475569; }
.uc-property-row { display: block; margin: 6px 0; }
.uc-property-row span { display: block; font-size: 12px; color: #475569; margin-bottom: 2px; }
.uc-property-row input, .uc-property-row textarea, .uc-property-row select { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; padding: 4px; }
.uc-log-list { font-size: 12px; }
.uc-log-row { padding: 3px 6px; border-bottom: 1px solid #edf0f4; }
.uc-log-row span { color: #64748b; margin-right: 8px; }
.uc-empty { padding: 8px; color: #64748b; }

/* dev-0.2.1 visual polish: replace placeholder square icons with CSS-only icons
   and keep demo/Host embedding layouts from clipping the Control at the viewport edge. */
.uc-tool-icon,
.uc-menu-icon,
.uc-palette-icon,
.uc-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}
.uc-menu-left { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.uc-menu-item { align-items: center; }
.uc-menu-icon { margin-left: 1px; }
.uc-palette-icon { margin-right: 1px; }
.uc-icon::before { content: '◆'; font-size: 9px; color: #64748b; }
.uc-icon-textbox::before { content: 'T'; font-family: Georgia, serif; font-size: 13px; color: #1d4ed8; }
.uc-icon-textarea::before { content: '¶'; font-size: 13px; color: #1d4ed8; }
.uc-icon-number::before { content: '#'; font-size: 12px; color: #1d4ed8; }
.uc-icon-date::before { content: '□'; font-size: 13px; color: #1d4ed8; }
.uc-icon-checkbox::before { content: '☑'; font-size: 13px; color: #1d4ed8; }
.uc-icon-select::before { content: '▾'; font-size: 13px; color: #1d4ed8; }
.uc-icon-radio::before { content: '◉'; font-size: 12px; color: #1d4ed8; }
.uc-icon-button::before { content: '▭'; font-size: 14px; color: #1d4ed8; }
.uc-icon-label::before { content: 'A'; font-size: 12px; color: #1d4ed8; }
.uc-icon-image::before { content: '▧'; font-size: 13px; color: #1d4ed8; }
.uc-icon-panel::before { content: '▣'; font-size: 13px; color: #0f766e; }
.uc-icon-group::before { content: '☷'; font-size: 13px; color: #0f766e; }
.uc-icon-tabs::before { content: '▤'; font-size: 13px; color: #0f766e; }
.uc-icon-accordion::before { content: '≡'; font-size: 14px; color: #0f766e; }
.uc-icon-columns::before { content: '▥'; font-size: 13px; color: #0f766e; }
.uc-icon-splitter::before { content: '↔'; font-size: 13px; color: #0f766e; }
.uc-icon-delete::before { content: '×'; font-size: 16px; color: #dc2626; }
.uc-icon-reset::before { content: '↺'; font-size: 14px; color: #475569; }
.uc-icon-view::before { content: '▦'; font-size: 13px; color: #475569; }
.uc-icon-outline::before { content: '☰'; font-size: 13px; color: #475569; }
.uc-icon-inspector::before { content: 'ⓘ'; font-size: 13px; color: #475569; }
.uc-icon-log::before { content: '≣'; font-size: 13px; color: #475569; }
.uc-icon-command::before { content: '•'; font-size: 14px; color: #64748b; }

/* dev-0.2.2 designer component previews.
   Layout controls are rendered with their structural affordances so the Canvas
   shows the control intent, not just a large empty rectangle with a label. */
.uc-component { overflow: hidden; }
.uc-component-layout {
  display: block;
  align-items: stretch;
  padding: 0;
  background: #fff;
}
.uc-basic-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.uc-basic-preview-textbox,
.uc-basic-preview-number,
.uc-basic-preview-date,
.uc-basic-preview-select,
.uc-basic-preview-textarea {
  align-items: stretch;
  flex-direction: column;
  gap: 2px;
}
.uc-basic-label {
  flex: 0 0 auto;
  font-size: 11px;
  color: #475569;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.uc-basic-input,
.uc-basic-textarea {
  flex: 1 1 auto;
  min-height: 16px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  padding: 2px 4px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.uc-basic-textarea { white-space: normal; }
.uc-basic-checkbox-mark,
.uc-basic-radio-mark {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border: 1px solid #94a3b8;
  background: #fff;
  box-sizing: border-box;
}
.uc-basic-radio-mark { border-radius: 50%; }
.uc-basic-button-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  box-sizing: border-box;
  font-weight: 600;
}
.uc-basic-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 1px dashed #94a3b8;
  background: linear-gradient(135deg, #f8fafc 0%, #f8fafc 48%, #e2e8f0 49%, #e2e8f0 51%, #f8fafc 52%);
  color: #475569;
  box-sizing: border-box;
}
.uc-layout-preview {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: #fff;
  box-sizing: border-box;
}
.uc-layout-preview-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 28px;
  min-height: 28px;
  padding: 4px 8px;
  border-bottom: 1px solid #cbd5e1;
  background: #f8fafc;
  box-sizing: border-box;
  font-weight: 700;
}
.uc-layout-preview-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.uc-layout-preview-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px;
  box-sizing: border-box;
  overflow: hidden;
}
.uc-layout-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  height: 100%;
  border: 1px dashed #cbd5e1;
  background: #fbfdff;
  color: #64748b;
  font-size: 12px;
  box-sizing: border-box;
}
.uc-layout-preview-group .uc-layout-preview-body { padding: 10px; }
.uc-layout-preview-group .uc-layout-placeholder { border-radius: 4px; }
.uc-layout-tabs-strip {
  display: flex;
  align-items: flex-end;
  min-height: 28px;
  border-bottom: 1px solid #cbd5e1;
  overflow: hidden;
}
.uc-layout-tab {
  flex: 0 1 auto;
  max-width: 120px;
  padding: 5px 9px;
  border: 1px solid #cbd5e1;
  border-bottom: 0;
  background: #f1f5f9;
  color: #475569;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.uc-layout-tab + .uc-layout-tab { margin-left: 2px; }
.uc-layout-tab.is-active {
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  margin-bottom: -1px;
  padding-bottom: 6px;
}
.uc-layout-preview-tabs .uc-layout-placeholder {
  height: calc(100% - 28px);
  border-top: 0;
}
.uc-layout-accordion-list {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
}
.uc-layout-accordion-section { flex: 0 0 auto; min-height: 0; }
.uc-layout-accordion-section.is-active { flex: 1 1 auto; display: flex; flex-direction: column; }
.uc-layout-accordion-header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 8px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  box-sizing: border-box;
  font-weight: 600;
}
.uc-layout-accordion-section.is-active .uc-layout-accordion-header { background: #eef4ff; }
.uc-layout-accordion-chevron::before { content: '▸'; color: #475569; }
.uc-layout-accordion-section.is-active .uc-layout-accordion-chevron::before { content: '▾'; }
.uc-layout-accordion-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.uc-layout-accordion-body {
  flex: 1 1 auto;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
}
.uc-layout-columns-preview {
  display: flex;
  height: 100%;
  gap: 8px;
}
.uc-layout-column-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  border: 1px dashed #cbd5e1;
  background: #fbfdff;
  color: #64748b;
  font-size: 12px;
  box-sizing: border-box;
}
.uc-layout-splitter-preview {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
  background: #fff;
}
.uc-layout-splitter-preview.is-vertical { flex-direction: column; }
.uc-layout-splitter-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  background: #fbfdff;
  color: #64748b;
  font-size: 12px;
  overflow: hidden;
}
.uc-layout-splitter-bar {
  flex: 0 0 6px;
  background: #e2e8f0;
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  box-sizing: border-box;
}
.uc-layout-splitter-preview.is-vertical .uc-layout-splitter-bar {
  flex-basis: 6px;
  border-left: 0;
  border-right: 0;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
}
.uc-component-accordion .uc-layout-preview-body,
.uc-component-tabs .uc-layout-preview-body,
.uc-component-splitter .uc-layout-preview-body,
.uc-component-columns .uc-layout-preview-body { padding: 8px; }

/* dev-0.3.0 Canvas editing foundation: grid snap, rubber-band multi-selection,
   nested layout children, drop target feedback and new edit/arrange icons. */
.uc-canvas-surface.is-snap-enabled {
  background-color: #fff;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, .18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, .18) 1px, transparent 1px);
  background-size: var(--uc-grid-size, 8px) var(--uc-grid-size, 8px);
}
.uc-selection-rect {
  position: absolute;
  z-index: 10000;
  border: 1px dashed #2563eb;
  background: rgba(37, 99, 235, .08);
  pointer-events: none;
  box-sizing: border-box;
}
.uc-component.is-primary-selected {
  box-shadow: 0 0 0 2px rgba(37,99,235,.24);
}
.uc-component.is-drop-target {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, .20) inset, 0 0 0 2px rgba(22, 163, 74, .12);
}
.uc-children-layer {
  position: absolute;
  left: 8px;
  top: 40px;
  right: 8px;
  bottom: 8px;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}
.uc-children-layer > .uc-component { pointer-events: auto; }
.uc-component:not(.uc-component-layout) > .uc-children-layer { display: none; }
.uc-outline-children { margin: 0; padding: 0; }
.uc-outline-node { list-style: none; }
.uc-outline-item { display: flex; align-items: center; gap: 6px; text-align: left; }
.uc-outline-type { font-weight: 700; color: #334155; }
.uc-outline-label { color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-icon-undo::before { content: '↶'; font-size: 14px; color: #475569; }
.uc-icon-redo::before { content: '↷'; font-size: 14px; color: #475569; }
.uc-icon-select-all::before { content: '▣'; font-size: 13px; color: #475569; }
.uc-icon-snap::before { content: '#'; font-size: 13px; color: #475569; }
.uc-icon-bring-front::before { content: '▴'; font-size: 14px; color: #475569; }
.uc-icon-send-back::before { content: '▾'; font-size: 14px; color: #475569; }
.uc-icon-align-left::before { content: '⇤'; font-size: 13px; color: #475569; }
.uc-icon-align-top::before { content: '↥'; font-size: 13px; color: #475569; }
.uc-icon-align-right::before { content: '⇥'; font-size: 13px; color: #475569; }
.uc-icon-align-bottom::before { content: '↧'; font-size: 13px; color: #475569; }
.uc-icon-distribute-h::before { content: '↔'; font-size: 13px; color: #475569; }
.uc-icon-distribute-v::before { content: '↕'; font-size: 13px; color: #475569; }
.uc-icon-same-width::before { content: '⇔'; font-size: 13px; color: #475569; }
.uc-icon-same-height::before { content: '⇕'; font-size: 13px; color: #475569; }
.uc-icon-nest::before { content: '⊂'; font-size: 14px; color: #475569; }
.uc-icon-unnest::before { content: '⊃'; font-size: 14px; color: #475569; }

/* dev-0.3.1 positioning aids: group selection box, palette drop marker,
   and smart guides that compare the moving group with neighboring components. */
.uc-toolbar-separator {
  display: inline-block;
  width: 1px;
  min-height: 24px;
  margin: 0 4px;
  background: #d8dce2;
  align-self: stretch;
}
.uc-selection-group-box {
  position: absolute;
  z-index: 9996;
  border: 1px dashed #2563eb;
  background: rgba(37, 99, 235, .035);
  pointer-events: none;
  box-sizing: border-box;
}
.uc-smart-guide {
  position: absolute;
  z-index: 10002;
  pointer-events: none;
  color: #db2777;
  font-size: 11px;
  font-weight: 700;
}
.uc-smart-guide-vertical {
  top: 0;
  width: 0;
  border-left: 1px solid #db2777;
}
.uc-smart-guide-horizontal {
  left: 0;
  height: 0;
  border-top: 1px solid #db2777;
}
.uc-smart-guide span {
  position: absolute;
  display: inline-block;
  padding: 1px 4px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(219, 39, 119, .35);
  border-radius: 2px;
  white-space: nowrap;
}
.uc-smart-guide-vertical span { top: 6px; left: 4px; }
.uc-smart-guide-horizontal span { top: 4px; left: 6px; }
.uc-smart-gap {
  position: absolute;
  z-index: 10001;
  pointer-events: none;
  color: #0f766e;
  font-size: 10px;
  font-weight: 700;
}
.uc-smart-gap-horizontal {
  height: 0;
  border-top: 1px dashed #0f766e;
}
.uc-smart-gap-vertical {
  width: 0;
  border-left: 1px dashed #0f766e;
}
.uc-smart-gap span {
  position: absolute;
  display: inline-block;
  padding: 1px 3px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(15, 118, 110, .35);
  border-radius: 2px;
  white-space: nowrap;
}
.uc-smart-gap-horizontal span { left: 50%; top: -18px; transform: translateX(-50%); }
.uc-smart-gap-vertical span { left: 4px; top: 50%; transform: translateY(-50%); }
.uc-drop-marker {
  position: absolute;
  z-index: 10003;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border: 1px solid #2563eb;
  background: rgba(37, 99, 235, .12);
  pointer-events: none;
  box-sizing: border-box;
}
.uc-drop-marker::before,
.uc-drop-marker::after {
  content: '';
  position: absolute;
  background: #2563eb;
}
.uc-drop-marker::before { left: 8px; top: -7px; width: 1px; height: 30px; }
.uc-drop-marker::after { top: 8px; left: -7px; height: 1px; width: 30px; }
.uc-icon-smart-guide::before { content: '⌁'; font-size: 14px; color: #db2777; }

/* DialogService fallback used only when jQuery UI Dialog is not available. */
.uc-dialog-fallback {
  position: fixed;
  z-index: 10000;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  width: 520px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border: 1px solid #ccd4dd;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.uc-dialog-fallback-header {
  position: relative;
  padding: 10px 40px 10px 12px;
  font-weight: 600;
  border-bottom: 1px solid #e3e8ef;
  background: #f8fafc;
}
.uc-dialog-fallback-close {
  position: absolute;
  right: 8px;
  top: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 20px;
  cursor: pointer;
}
.uc-dialog-fallback-body {
  padding: 12px;
  max-height: 60vh;
  overflow: auto;
}
.uc-dialog-fallback-footer {
  padding: 8px 12px;
  text-align: right;
  border-top: 1px solid #e3e8ef;
  background: #fbfcfe;
}
.uc-dialog-fallback-footer button {
  margin-left: 8px;
}

/* dev-0.3.3 File / Content commands */
.uc-icon-new::before { content: '+'; font-size: 15px; color: #2563eb; }
.uc-icon-open::before { content: '⌕'; font-size: 14px; color: #2563eb; }
.uc-icon-save::before { content: '▣'; font-size: 13px; color: #2563eb; }
.uc-icon-save-as::before { content: '▣+'; font-size: 10px; color: #2563eb; }
.uc-icon-import::before { content: '⇣'; font-size: 14px; color: #0f766e; }
.uc-icon-export::before { content: '⇡'; font-size: 14px; color: #0f766e; }
.uc-icon-properties::before { content: 'ⓘ'; font-size: 13px; color: #475569; }
.uc-content-properties-dialog dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 10px; margin: 0; }
.uc-content-properties-dialog dt { font-weight: 600; color: #475569; }
.uc-content-properties-dialog dd { margin: 0; color: #111827; word-break: break-all; }

/* dev-0.4.0 Property/Event editor foundation */
.uc-property-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #d7dee8;
  margin: 8px 0;
}
.uc-property-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}
.uc-property-tab.is-active {
  border-bottom-color: #2f6fed;
  font-weight: 600;
}
.uc-property-category-title {
  margin-top: 10px;
}
.uc-property-description {
  color: #687386;
  font-size: 11px;
  margin: -2px 0 6px 0;
}
.uc-code-lite,
.uc-handler-code {
  font-family: Consolas, Monaco, 'Courier New', monospace;
  min-height: 80px;
  white-space: pre;
}
.uc-event-row {
  display: grid;
  grid-template-columns: 84px 1fr auto auto;
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid #eef2f7;
  padding: 5px 0;
}
.uc-event-name {
  font-weight: 600;
  color: #27364a;
}
.uc-event-handler-summary {
  color: #526173;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-small-button {
  border: 1px solid #cfd8e6;
  background: #fff;
  padding: 3px 7px;
  cursor: pointer;
}
.uc-handler-dialog .uc-property-row {
  margin-bottom: 8px;
}
.uc-handler-code-row textarea {
  width: 100%;
  min-height: 300px;
  box-sizing: border-box;
}

/* dev-0.4.1 designer usability / context menu / safe preview. */
.uc-icon-copy::before { content: '⧉'; font-size: 13px; color: #475569; }
.uc-icon-cut::before { content: '✂'; font-size: 13px; color: #475569; }
.uc-icon-paste::before { content: '▣'; font-size: 13px; color: #475569; }
.uc-icon-duplicate::before { content: '⧉+'; font-size: 10px; color: #475569; }
.uc-icon-lock::before { content: '🔒'; font-size: 11px; color: #475569; }
.uc-icon-unlock::before { content: '🔓'; font-size: 11px; color: #475569; }
.uc-icon-hide::before { content: '◌'; font-size: 14px; color: #475569; }
.uc-icon-show::before { content: '●'; font-size: 12px; color: #475569; }
.uc-icon-preview::before { content: '▶'; font-size: 12px; color: #0f766e; }
.uc-component.is-locked { cursor: default; border-style: dashed; background-image: repeating-linear-gradient(45deg, rgba(148,163,184,.08) 0, rgba(148,163,184,.08) 4px, transparent 4px, transparent 8px); }
.uc-component.is-locked .uc-resize-handle { display: none !important; }
.uc-component.is-hidden-component { opacity: .38; border-style: dashed; }
.uc-context-menu { position: absolute; z-index: 2000; min-width: 170px; padding: 4px 0; background: #fff; border: 1px solid #cbd5e1; box-shadow: 0 4px 14px rgba(15, 23, 42, .16); }
.uc-context-menu-item { display: block; width: 100%; border: 0; background: transparent; padding: 6px 12px; text-align: left; cursor: pointer; color: #1f2937; }
.uc-context-menu-item:hover { background: #eef4ff; }
.uc-context-menu-item:disabled { opacity: .45; cursor: default; }
.uc-handler-security-result { margin: 6px 0; font-size: 12px; }
.uc-security-error { padding: 4px 6px; color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; margin: 3px 0; }
.uc-security-warning { padding: 4px 6px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; margin: 3px 0; }
.uc-security-ok { padding: 4px 6px; color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; margin: 3px 0; }
.uc-safe-preview-dialog { position: relative; min-height: 420px; background: #f8fafc; border: 1px solid #cbd5e1; overflow: auto; }
.uc-content-preview { position: relative; min-height: 420px; background: #fff; }
.uc-preview-component { position: absolute; box-sizing: border-box; border: 1px solid #94a3b8; background: #fff; padding: 4px 6px; overflow: hidden; }
.uc-preview-label { font-size: 12px; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-preview-children { position: absolute; left: 8px; right: 8px; top: 32px; bottom: 8px; }

/* dev-0.4.5 Test Run / runtime rendering. */
.uc-icon-run::before { content: '▶'; font-size: 13px; color: #16a34a; }
.uc-icon-stop::before { content: '■'; font-size: 12px; color: #dc2626; }
.uc-icon-export-html::before { content: '<>'; font-size: 10px; color: #7c3aed; }
.uc-test-run-dialog { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 0; }
.uc-test-run-banner { flex: 0 0 auto; padding: 7px 9px; border: 1px solid #fde68a; background: #fffbeb; color: #92400e; font-size: 12px; }
.uc-test-run-surface { flex: 1 1 auto; min-height: 420px; overflow: auto; border: 1px solid #cbd5e1; background: #f8fafc; padding: 12px; box-sizing: border-box; }
.uc-content-runtime { position: relative; min-height: 560px; background: #fff; border: 1px solid #d8dce2; box-sizing: border-box; overflow: auto; }
.uc-content-runtime.is-script-disabled { box-shadow: inset 0 0 0 2px rgba(245, 158, 11, .18); }
.uc-content-runtime.is-script-enabled { box-shadow: inset 0 0 0 2px rgba(22, 163, 74, .18); }
.uc-runtime-component { position: absolute; box-sizing: border-box; min-width: 16px; min-height: 16px; }
.uc-runtime-body { display: flex; flex-direction: column; gap: 3px; width: 100%; height: 100%; box-sizing: border-box; }
.uc-runtime-body label { flex: 0 0 auto; font-size: 12px; color: #475569; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.uc-runtime-field { box-sizing: border-box; width: 100%; min-height: 24px; border: 1px solid #cbd5e1; padding: 3px 5px; background: #fff; }
textarea.uc-runtime-field { flex: 1 1 auto; resize: none; min-height: 40px; }
.uc-runtime-button { width: 100%; height: 100%; border: 1px solid #b6c2d1; background: #f8fafc; cursor: pointer; }
.uc-runtime-button:hover { background: #eef4ff; }
.uc-runtime-check { display: inline-flex; align-items: center; gap: 6px; width: 100%; height: 100%; box-sizing: border-box; }
.uc-runtime-label { display: flex; align-items: center; width: 100%; height: 100%; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-runtime-image { width: 100%; height: 100%; object-fit: contain; }
.uc-runtime-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border: 1px dashed #94a3b8; color: #64748b; background: #f8fafc; box-sizing: border-box; }
.uc-runtime-layout-title { position: relative; z-index: 1; height: 24px; box-sizing: border-box; padding: 4px 6px; border: 1px solid #cbd5e1; background: #f8fafc; color: #334155; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.uc-runtime-panel, .uc-runtime-group, .uc-runtime-tabs, .uc-runtime-accordion, .uc-runtime-columns, .uc-runtime-splitter { border: 1px solid #cbd5e1; background: #fff; }
.uc-runtime-children { position: absolute; left: 0; right: 0; top: 24px; bottom: 0; overflow: hidden; }
.uc-runtime-textbox .uc-runtime-children,
.uc-runtime-textarea .uc-runtime-children,
.uc-runtime-number .uc-runtime-children,
.uc-runtime-date .uc-runtime-children,
.uc-runtime-select .uc-runtime-children,
.uc-runtime-checkbox .uc-runtime-children,
.uc-runtime-radio .uc-runtime-children,
.uc-runtime-button .uc-runtime-children,
.uc-runtime-label .uc-runtime-children,
.uc-runtime-image .uc-runtime-children { display: none; }

/* dev-0.4.6: Event handler persistence inspection dialog. */
.uc-content-definition-dialog { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 0; }
.uc-inspect-table { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; }
.uc-inspect-table th, .uc-inspect-table td { border: 1px solid #d7dde8; padding: 4px 6px; text-align: left; vertical-align: top; }
.uc-inspect-table th { background: #f6f8fb; font-weight: 600; }
.uc-content-json-view { flex: 1 1 240px; min-height: 220px; width: 100%; resize: vertical; font-family: Consolas, Menlo, monospace; font-size: 12px; line-height: 1.35; box-sizing: border-box; }
.uc-icon-inspect-json::before { content: "{}"; font-size: 10px; font-weight: 700; }

/* dev-0.7.0 Runtime/Designer expansion. */
.uc-icon-htmlblock::before { content: '</>'; font-size: 9px; color: #7c3aed; }
.uc-icon-hidden::before { content: '◌'; font-size: 13px; color: #64748b; }
.uc-icon-table::before { content: '▦'; font-size: 13px; color: #7c3aed; }
.uc-icon-list::before { content: '☷'; font-size: 13px; color: #7c3aed; }
.uc-icon-card::before { content: '▤'; font-size: 13px; color: #7c3aed; }
.uc-icon-tree::before { content: '├'; font-size: 14px; color: #7c3aed; }
.uc-icon-menu::before { content: '☰'; font-size: 13px; color: #7c3aed; }
.uc-icon-toolbar2::before { content: '⋯'; font-size: 16px; color: #7c3aed; }
.uc-icon-group-command::before { content: '▣'; font-size: 13px; color: #475569; }
.uc-icon-ungroup::before { content: '□'; font-size: 13px; color: #475569; }
.uc-icon-zoom-in::before { content: '+'; font-size: 14px; color: #475569; }
.uc-icon-zoom-out::before { content: '−'; font-size: 14px; color: #475569; }
.uc-icon-zoom-reset::before { content: '1:1'; font-size: 9px; color: #475569; }
.uc-icon-guide-v::before { content: '|'; font-size: 15px; color: #db2777; }
.uc-icon-guide-h::before { content: '—'; font-size: 14px; color: #db2777; }
.uc-icon-clear-guides::before { content: '×'; font-size: 14px; color: #db2777; }
.uc-icon-form-schema::before { content: 'F'; font-size: 12px; color: #0f766e; }
.uc-icon-security::before { content: '⚑'; font-size: 12px; color: #b45309; }
.uc-icon-integration::before { content: '↔'; font-size: 13px; color: #475569; }
.uc-display-preview { width: 100%; height: 100%; box-sizing: border-box; overflow: hidden; padding: 4px 6px; background: #fff; }
.uc-display-title { font-size: 11px; font-weight: 700; color: #475569; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-display-table { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; height: calc(100% - 18px); }
.uc-display-table div { border: 1px solid #d7dee8; background: #f8fafc; }
.uc-display-preview ul { margin: 0; padding-left: 18px; color: #475569; font-size: 11px; }
.uc-display-card-title { padding: 4px 6px; background: #f8fafc; border: 1px solid #d7dee8; font-weight: 700; }
.uc-display-card-body { padding: 6px; border: 1px solid #d7dee8; border-top: 0; color: #64748b; white-space: pre-wrap; height: calc(100% - 28px); box-sizing: border-box; }
.uc-display-nav { display: flex; gap: 4px; align-items: center; height: 100%; }
.uc-display-nav span { border: 1px solid #d7dee8; background: #f8fafc; padding: 3px 6px; font-size: 11px; }
.uc-display-preview pre { margin: 0; font-family: Consolas, monospace; font-size: 11px; color: #475569; white-space: pre-wrap; }
.uc-hidden-placeholder { border: 1px dashed #cbd5e1; color: #64748b; padding: 3px 6px; }
.uc-ruler { position: absolute; z-index: 10004; pointer-events: none; background: rgba(248,250,252,.84); }
.uc-ruler-top { left: 0; right: 0; top: 0; height: 16px; border-bottom: 1px solid rgba(148,163,184,.45); }
.uc-ruler-left { left: 0; top: 0; bottom: 0; width: 16px; border-right: 1px solid rgba(148,163,184,.45); }
.uc-manual-guide { position: absolute; z-index: 10005; pointer-events: none; }
.uc-manual-guide-vertical { width: 0; border-left: 1px dashed #db2777; }
.uc-manual-guide-horizontal { height: 0; border-top: 1px dashed #db2777; }
.uc-runtime-control-host { position: relative; width: 100%; height: 100%; min-height: 240px; box-sizing: border-box; }
.uc-runtime-hidden-label { display: inline-flex; align-items: center; height: 100%; color: #64748b; font-size: 12px; border: 1px dashed #cbd5e1; padding: 0 6px; box-sizing: border-box; }
.uc-runtime-htmlblock { width: 100%; height: 100%; overflow: auto; box-sizing: border-box; }
.uc-runtime-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.uc-runtime-table th, .uc-runtime-table td { border: 1px solid #cbd5e1; padding: 3px 5px; }
.uc-runtime-list { margin: 0; padding-left: 20px; }
.uc-runtime-card { height: 100%; border: 1px solid #cbd5e1; box-sizing: border-box; background: #fff; }
.uc-runtime-card-title { padding: 6px 8px; font-weight: bold; background: #f8fafc; border-bottom: 1px solid #cbd5e1; }
.uc-runtime-card-body { padding: 8px; white-space: pre-wrap; overflow: auto; }
.uc-runtime-tree { font-size: 12px; line-height: 1.5; }
.uc-runtime-nav { display: flex; align-items: center; gap: 4px; height: 100%; overflow: hidden; }
.uc-runtime-nav-item { border: 1px solid #cbd5e1; background: #fff; padding: 4px 8px; cursor: pointer; }
.uc-security-audit-dialog dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 10px; margin: 0 0 8px 0; }
.uc-security-audit-dialog dt { font-weight: 700; color: #475569; }
.uc-security-audit-dialog dd { margin: 0; }


/* dev-0.7.1 Runtime lifecycle and safety states */
.uc-runtime-component.is-disabled { opacity: .6; }
.uc-runtime-component.is-readonly { outline: 1px dashed rgba(100,116,139,.25); }
.uc-runtime-component.is-locked { pointer-events: none; }
.uc-runtime-component.is-hidden { display: none !important; }
.uc-runtime-field { box-sizing: border-box; width: 100%; }
.uc-runtime-field:disabled, .uc-runtime-button:disabled { opacity: .65; cursor: not-allowed; }
.uc-runtime-radio-group { display: flex; flex-direction: column; gap: 4px; width: 100%; height: 100%; box-sizing: border-box; }
.uc-runtime-radio-option { display: inline-flex; align-items: center; gap: 5px; min-height: 20px; }
.uc-runtime-check { display: inline-flex; align-items: center; gap: 5px; width: 100%; height: 100%; box-sizing: border-box; }
.uc-runtime-image { width: 100%; height: 100%; object-fit: contain; }
