.ide-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 26px 28px 39px minmax(0, 1fr) 24px;
  background: #26313a;
  color: #dce7ee;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.titlebar {
  display: grid;
  grid-template-columns: 22px minmax(300px, 1fr) 214px 132px auto;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  color: #eef7fb;
  background: #1266a2;
  font-size: 12px;
}

.app-badge {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #be1e2d;
  color: #ffffff;
  font-size: 7px;
  font-weight: 700;
}

.window-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}

.titlebar input,
.titlebar select {
  height: 21px;
  border: 1px solid #8eb9d3;
  color: #f4fbff;
  background: #1b75ad;
}

.ide-search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.ide-search-container input {
  width: 100%;
}

.ide-search-popup {
  position: absolute;
  top: 100%;
  right: 0;
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  background: #252e38;
  border: 1px solid #3c4c58;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 400;
  margin-top: 4px;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  cursor: pointer;
  border-bottom: 1px solid #344050;
}

.search-result-item:hover,
.search-result-item.selected {
  background: #2978c0;
}

.search-cat {
  font-size: 10px;
  color: #8ab0c4;
  margin-bottom: 2px;
}

.search-result-item:hover .search-cat,
.search-result-item.selected .search-cat {
  color: #cfe1f3;
}

.search-lbl {
  font-size: 12px;
  color: #d8e4eb;
}

.search-result-item:hover .search-lbl,
.search-result-item.selected .search-lbl {
  color: #ffffff;
}

.app-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.app-actions button {
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #eef7fb;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 9px;
  font-size: 11px;
}

.app-actions button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.menubar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 0 10px;
  color: #d8e4eb;
  background: #2a3440;
  border-bottom: 1px solid #1a232b;
  z-index: 100;
}

.menu-item {
  position: relative;
}

.menubar button[data-menu] {
  height: 24px;
  border: 0;
  padding: 0 9px;
  color: #d8e4eb;
  background: transparent;
  font-size: 12px;
}

.menubar button[data-menu]:hover,
.menu-item.open button[data-menu] {
  background: #344050;
}

.menu-item.open button[data-menu] {
  background: #3a4a5a;
}

.menu-popup {
  position: absolute;
  top: 24px;
  left: 0;
  min-width: 260px;
  padding: 4px 0;
  background: #252e38;
  border: 1px solid #3c4c58;
  box-shadow: 2px 3px 12px rgba(0, 0, 0, 0.55);
  z-index: 200;
}

.menu-popup button {
  width: 100%;
  display: flex;
  align-items: center;
  border: 0;
  padding: 3px 14px 3px 2px;
  gap: 0;
  color: #d8e4eb;
  background: transparent;
  font-size: 12px;
  text-align: left;
}

.menu-lbl {
  flex: 1;
  padding-left: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-popup button:hover:not(:disabled) {
  background: #2978c0;
  color: #ffffff;
}

.menu-popup button:disabled {
  color: #4a5d6b;
  cursor: default;
}

.menu-popup button:disabled kbd {
  color: #354450;
}

.menu-icon {
  width: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-icon i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 15px;
  border-radius: 2px;
  font-size: 9px;
  font-style: normal;
  line-height: 1;
}

.menu-popup button:disabled .menu-icon i {
  opacity: 0.28;
}

.menu-popup button:hover:not(:disabled) .menu-icon i {
  opacity: 0.9;
}

.menu-arrow {
  color: #6a8898;
  font-size: 10px;
  flex-shrink: 0;
}

.menu-info {
  padding: 3px 14px 3px 31px;
  color: #4a5d6b;
  font-size: 12px;
  font-style: italic;
  pointer-events: none;
}

.menu-popup button kbd {
  font: inherit;
  color: #6a8898;
  margin-left: 18px;
  flex-shrink: 0;
}

.menu-popup button:hover kbd {
  color: #cfe1f3;
}

.menu-sep {
  height: 1px;
  margin: 3px 8px;
  background: #344050;
}

/* ── Nested submenu (New ▶) ─────────────────────────────────── */
.menu-sub-item {
  position: relative;
}

.menu-sub-item > button {
  width: 100%;
  display: flex;
  align-items: center;
  border: 0;
  padding: 3px 14px 3px 2px;
  color: #d8e4eb;
  background: transparent;
  font-size: 12px;
  text-align: left;
}

.menu-sub-item.sub-open > button,
.menu-sub-item > button:hover {
  background: #2978c0;
  color: #ffffff;
}

.menu-sub-popup {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 268px;
  padding: 4px 0;
  background: #252e38;
  border: 1px solid #3c4c58;
  box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.6);
  z-index: 300;
}



.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 11px;
  background: #2a3440;
  border-bottom: 1px solid #1a232b;
}

.tool-group {
  display: flex;
  gap: 3px;
  padding-right: 8px;
  border-right: 1px solid #3c4c58;
}

.tool-button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: #8ab0c4;
  font-size: 13px;
}

.tool-button:hover {
  border-color: #4a6578;
  background: #344050;
}

.toolbar select {
  height: 25px;
  min-width: 132px;
  border: 1px solid #3c4c58;
  color: #d8e4eb;
  background: #1d252d;
  padding: 0 8px;
}

.workspace {
  min-height: 0;
  display: grid;
  gap: 0;
  padding: 0 0 5px;
  background: #2a343d;
}

.left-dock,
.right-dock,
.center-dock {
  min-height: 0;
  display: grid;
  gap: 0;
  padding: 0;
}

.center-dock {
  grid-template-rows: 29px minmax(0, 1fr);
}

.dock-splitter {
  position: relative;
  background: #2a343d;
  z-index: 10;
}

.dock-splitter::after {
  content: '';
  position: absolute;
  background: #3f5360;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.dock-splitter:hover::after,
.dock-splitter.dragging::after {
  opacity: 1;
}

.dock-splitter.vertical {
  cursor: col-resize;
}

.dock-splitter.vertical::after {
  inset: 0 1px;
}

.dock-splitter.horizontal {
  cursor: row-resize;
}

.dock-splitter.horizontal::after {
  inset: 1px 0;
}

.is-resizing-layout,
.is-resizing-layout * {
  user-select: none;
}

.is-resizing-layout.col,
.is-resizing-layout.col * {
  cursor: col-resize !important;
}

.is-resizing-layout.row,
.is-resizing-layout.row * {
  cursor: row-resize !important;
}

.panel {
  min-height: 0;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr);
  background: #263039;
  border: 1px solid #3c4c58;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  color: #ffffff;
  background: #526978;
  font-size: 15px;
}

.panel-tools {
  display: flex;
  gap: 8px;
}

.panel-tools button {
  border: 0;
  background: transparent;
  color: #ffffff;
}

.panel-body {
  min-height: 0;
  overflow: auto;
}

.dock-search,
.palette-filter,
.project-tools {
  height: 26px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  background: #202932;
  border-bottom: 1px solid #3c4c58;
}

.dock-search input,
.palette-filter input {
  min-width: 0;
  height: 18px;
  border: 1px solid #435461;
  background: #1d252d;
  color: #d8e5ed;
}

.project-tools {
  grid-template-columns: 1fr;
  color: #adc2ce;
  font-size: 12px;
}

.structure-tree,
.project-tree,
.palette-tree {
  margin: 0;
  padding: 4px 0;
  list-style: none;
  color: #d8e4eb;
  font-size: 12px;
}

.structure-tree li,
.project-tree li,
.palette-tree li {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: calc(8px + var(--depth) * 16px);
  white-space: nowrap;
}

.structure-tree .selected,
.project-tree .selected,
.structure-tree li:hover,
.project-tree li:hover,
.palette-tree li:hover {
  background: #2b5571;
}

.tree-glyph {
  color: #91b8cc;
}

.node-icon {
  color: #65a5cf;
  font-size: 10px;
}

.object-select {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  background: #202932;
  border-bottom: 1px solid #3c4c58;
  font-size: 12px;
}

.object-select span {
  color: #95a9b5;
}

.inspector-tabs {
  height: 25px;
  display: grid;
  grid-template-columns: 72px 58px minmax(0, 1fr);
  border-bottom: 1px solid #3e4f5b;
}

.inspector-tabs button {
  border: 0;
  border-right: 1px solid #3e4f5b;
  background: #303d46;
  color: #d9e7ef;
  font-size: 12px;
}

.inspector-tabs .active {
  color: #ffffff;
  background: #3d5b70;
  font-weight: 700;
}

.inspector-tabs input {
  min-width: 0;
  border: 0;
  background: #232d35;
  color: #d8e5ed;
}

.property-grid {
  display: grid;
  font-size: 12px;
}

.property-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 21px;
  border-bottom: 1px solid #35454f;
}

.property-row label {
  display: flex;
  align-items: center;
  padding-left: 10px;
  color: #ebc260;
}

.property-row input {
  min-width: 0;
  border: 0;
  border-left: 1px solid #43545f;
  color: #dce9f0;
  background: #26313a;
  padding: 0 7px;
}

.inspector-links {
  display: flex;
  gap: 12px;
  padding: 7px 8px;
}

.inspector-links button {
  border: 0;
  padding: 0;
  color: #6dc1ff;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.inspector-links button:hover {
  text-decoration: underline;
}

.document-tabs {
  display: flex;
  align-items: end;
  background: #2f3b45;
  border-bottom: 1px solid #8d4aa5;
}

.document-tabs button {
  height: 27px;
  border: 0;
  border-right: 1px solid #4d5f6c;
  color: #dce9f0;
  background: #3a4650;
  padding: 0 12px;
  font-size: 12px;
}

.document-tabs button.active {
  color: #ffffff;
  background: #a257b4;
}

.document-host {
  min-height: 0;
  overflow: hidden;
  background: #1e252e;
}

.welcome-page {
  height: 100%;
  display: grid;
  grid-template-rows: 92px minmax(0, 1fr) 39px;
  color: #dce9f0;
  background: #1e252e;
}

.welcome-top {
  display: grid;
  grid-template-columns: 54px minmax(220px, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 0 44px;
  background: #232d38;
  border-bottom: 1px solid #2e3d4a;
}

.rad-logo,
.recent-icon {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #c9172e;
  font-weight: 800;
}

.rad-logo {
  width: 50px;
  height: 50px;
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 1px #d0d7de;
  font-size: 27px;
}

.welcome-top h1 {
  margin: 0;
  color: #dce9f0;
  font-size: 22px;
  font-weight: 400;
}

.welcome-top nav {
  display: flex;
  gap: 18px;
}

.welcome-top button,
.welcome-bottom button {
  border: 0;
  color: #95a9b5;
  background: transparent;
  font-size: 12px;
}

.welcome-top button::before {
  content: '▣';
  margin-right: 4px;
  color: #c59b2d;
}

.welcome-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(330px, 1.1fr) minmax(330px, 1.05fr) minmax(230px, 0.8fr);
  grid-template-rows: minmax(290px, 1fr) minmax(175px, 0.6fr);
  gap: 13px;
  padding: 0 23px 8px 45px;
}

.welcome-card {
  min-height: 0;
  overflow: hidden;
  background: #263039;
  border: 1px solid #3c4c58;
}

.welcome-card h2 {
  height: 39px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 12px;
  color: #c0d0db;
  font-size: 15px;
  font-weight: 400;
  border-bottom: 1px solid #344050;
}

.welcome-card ul {
  height: calc(100% - 39px);
  margin: 0;
  padding: 4px 10px 10px;
  overflow: auto;
  list-style: none;
}

.welcome-card li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 3px 0;
}

.welcome-card strong {
  display: block;
  color: #dce9f0;
  font-size: 11px;
  line-height: 1.15;
}

.welcome-card small {
  display: block;
  margin-top: 2px;
  color: #7a93a2;
  font-size: 10px;
  line-height: 1.2;
}

.create-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #4a6578;
  background: #344050;
  color: #95c4df;
  font-weight: 700;
}

.icon-1,
.icon-4 {
  color: #2b8dcc;
}

.recent-icon {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.recent-card {
  position: relative;
}

.recent-card button {
  border: 0;
  color: #4a5d6b;
  background: transparent;
}

.learn-card {
  grid-row: span 2;
}

.video-thumb,
.package-icon,
.round-icon {
  width: 55px;
  height: 32px;
  display: block;
  background: linear-gradient(135deg, #04070c, #d51f41 50%, #2e70d1);
}

.learn-card li,
.getit-card li,
.promoted-card li {
  grid-template-columns: 58px minmax(0, 1fr);
}

.thumb-1,
.thumb-4 {
  background: linear-gradient(135deg, #1b2240, #7948e6 48%, #e42b76);
}

.package-icon {
  background: linear-gradient(135deg, #f5f5f6, #4f99d6 52%, #f2d33a);
}

.round-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #264b57;
}

.round-1 {
  background: #e1222f;
}

.opening-toast {
  position: absolute;
  left: 50%;
  top: 53%;
  width: 224px;
  transform: translate(-50%, -50%);
  border: 1px solid #6e7f8a;
  background: #ffffff;
  color: #27323a;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  font-size: 11px;
}

.opening-toast strong {
  display: block;
  padding: 4px 7px;
  color: #ffffff;
  background: #2370a8;
}

.opening-toast p {
  margin: 7px 9px;
}

.welcome-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px 0 88px;
  background: #202932;
  border-top: 1px solid #3c4c58;
  font-size: 12px;
}

.welcome-bottom button::before {
  content: '▣';
  margin-right: 5px;
  color: #41a96b;
}

.designer-page {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 25px;
  background: #252d34;
}

.design-surface {
  position: relative;
  overflow: auto;
  padding: 18px 18px 90px;
  background: #242d34;
}

.selected-form-shell {
  position: relative;
  box-shadow: 0 0 0 2px #a6cdec;
  cursor: default;
  user-select: none;
  touch-action: none;
}

.selected-form-shell::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-right: 3px solid #6fa6cf;
  border-bottom: 3px solid #6fa6cf;
  pointer-events: none;
}

.resize-handle {
  position: absolute;
  z-index: 3;
  width: 8px;
  height: 8px;
  border: 1px solid #2d5b79;
  background: #92bad6;
}

.resize-handle:hover {
  background: #ffffff;
}

.top-left {
  left: -7px;
  top: -7px;
}

.top-right {
  right: -7px;
  top: -7px;
}

.mid-right {
  right: -7px;
  top: 50%;
}

.bottom-left {
  left: -7px;
  bottom: -7px;
}

.bottom-center {
  left: 50%;
  bottom: -7px;
}

.bottom-right {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

.top-left {
  cursor: nwse-resize;
}

.top-right,
.bottom-left {
  cursor: nesw-resize;
}

.bottom-center {
  cursor: ns-resize;
}

.mid-right {
  cursor: ew-resize;
}

.vcl-form {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 31px minmax(0, 1fr);
  border: 1px solid #7c9eb9;
  border-radius: 4px 4px 0 0;
  background: #f5f8fb;
  color: #1e2a31;
  overflow: hidden;
}

.form-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  color: #67747d;
  background: linear-gradient(#eef6fc, #d9eaf6 55%, #c8deef);
  border-bottom: 1px solid #9fb9cc;
  font-size: 12px;
  user-select: none;
}

.form-icon {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #c61a30;
  color: #ffffff;
  font-size: 8px;
  font-weight: 700;
}

.form-buttons {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.form-buttons button {
  width: 30px;
  height: 18px;
  border: 1px solid #96aebb;
  border-radius: 2px;
  color: #596b75;
  background: linear-gradient(#f8fbfd, #d4e3ee);
  font-size: 12px;
  line-height: 1;
}

.form-client {
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #f4f7fb;
}

.design-client {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle, #9b9b9b 0 1px, transparent 1.2px),
    #f8fafc;
  background-size: 8px 8px;
  cursor: default;
  touch-action: none;
}

.design-client.placing-component {
  cursor: crosshair;
}

.vcl-control {
  position: absolute;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.vcl-control:hover {
  cursor: grab;
}

.vcl-control.button {
  display: grid;
  place-items: center;
  border: 1px solid #a8a8a8;
  color: #111;
  background: linear-gradient(#f7f7f7, #e0e0e0);
  box-shadow: inset 1px 1px 0 #ffffff;
  font-size: 12px;
}

.vcl-control.memo {
  border: 1px solid #8c8c8c;
  color: #111;
  background: #ffffff;
  box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.08);
  font-size: 12px;
}

.vcl-control.memo span {
  display: block;
  padding: 5px 4px;
}

.vcl-control.selected {
  outline: 1px dotted #202020;
  outline-offset: 2px;
}

.component-handle {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid #2d5b79;
  background: #d9eefc;
  touch-action: none;
}

.component-handle.nw {
  left: -6px;
  top: -6px;
}

.component-handle.ne {
  right: -6px;
  top: -6px;
}

.component-handle.sw {
  left: -6px;
  bottom: -6px;
}

.component-handle.se {
  right: -6px;
  bottom: -6px;
}

.design-surface::after {
  content: '';
  position: absolute;
  right: 18px;
  bottom: 42px;
  width: 39px;
  height: 27px;
  border: 1px solid #6c7780;
  background:
    linear-gradient(90deg, transparent 50%, #6c7780 50% 53%, transparent 53%),
    linear-gradient(transparent 50%, #6c7780 50% 53%, transparent 53%),
    rgba(43, 52, 60, 0.08);
  opacity: 0.8;
}

.is-moving,
.is-moving * {
  cursor: grabbing !important;
  user-select: none;
}

.is-resizing,
.is-resizing * {
  user-select: none;
}

.is-resizing-ew,
.is-resizing-ew * {
  cursor: ew-resize !important;
}

.is-resizing-ns,
.is-resizing-ns * {
  cursor: ns-resize !important;
}

.is-resizing-nwse,
.is-resizing-nwse * {
  cursor: nwse-resize !important;
}

.is-resizing-nesw,
.is-resizing-nesw * {
  cursor: nesw-resize !important;
}

.designer-tabs {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1px;
  padding-right: 12px;
  color: #c3d2dc;
  background: #2a343d;
  font-size: 11px;
}

.designer-tabs button {
  border: 0;
  color: #c3d2dc;
  background: transparent;
}

.designer-tabs .active {
  color: #ffffff;
  font-weight: 700;
}

.code-page {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: 29px minmax(0, 1fr) 132px 25px;
  color: #d4d4d4;
  background: #1e252e;
}

.code-toolbar {
  background: #232a33;
  border-bottom-color: #1a232b;
}

.code-toolbar select {
  border: 1px solid #3c4c58;
  background: #2a3540;
  color: #d4d4d4;
}

.history-page {
  height: 100%;
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr) 25px;
  background: transparent;
  color: transparent;
  z-index: 2;
}

.history-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: #232a33;
  border-bottom: 1px solid #1a232b;
  font-size: 12px;
}

.history-toolbar strong {
  color: #ffffff;
}

.history-toolbar span {
  color: #95a9b5;
}

.history-body {
  overflow: auto;
  padding: 6px 0 12px;
  background: #1e252e;
}

.history-head,
.history-row {
  display: grid;
  grid-template-columns: 180px 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 5px 16px;
  font-size: 12px;
}

.history-head {
  color: #95a9b5;
  background: #232a33;
  border-bottom: 1px solid #2a3540;
}

.history-row {
  border-bottom: 1px solid #2a3540;
  color: #d4d4d4;
}

.history-row:hover {
  background: #2a3540;
}

.history-row.current {
  background: #1f4a7a;
  color: #ffffff;
  font-weight: 600;
}

.history-time {
  color: #75aedd;
}

.history-author {
  color: #95a9b5;
}

.code-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(170px, 0.7fr) minmax(220px, 1fr);
  gap: 8px;
  padding: 3px 8px;
  border-bottom: 1px solid #1a232b;
}

.code-toolbar select {
  min-width: 0;
  border: 1px solid #3c4c58;
  background: #2a3540;
  color: #d4d4d4;
}


.statusbar {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 8px;
  color: #d8e6ee;
  background: #354550;
  border-top: 1px solid #4e6474;
  font-size: 11px;
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 278px 5px minmax(520px, 1fr) !important;
  }

  .right-dock,
  [data-layout-resize="right-dock"] {
    display: none;
  }

  .welcome-top nav {
    display: none;
  }
}

.grid-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #95a9b5;
  font-size: 11px;
}

.grid-toggle input {
  accent-color: #2b7fc9;
}

.tab-close {
  margin-left: 8px;
  padding: 0 4px;
  border-radius: 2px;
  font-size: 11px;
  color: #b9c8d2;
}

.tab-close:hover {
  background: #4d2160;
  color: #ffffff;
}

.add-tab {
  width: 27px;
  border: 0;
  color: #c3d2dc;
  background: #2f3b45;
  font-size: 14px;
}

.add-tab:hover {
  background: #46566a;
  color: #ffffff;
}

.empty-state {
  padding: 18px;
  color: #95a9b5;
  font-size: 12px;
  font-style: italic;
}

.object-select select {
  flex: 1;
  height: 22px;
  border: 1px solid #43545f;
  color: #dce9f0;
  background: #2a3540;
}

.color-cell {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 4px;
  border-left: 1px solid #43545f;
  padding-left: 4px;
}

.color-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid #5b6d77;
}

.color-cell input {
  border: 0;
  background: #26313a;
  color: #dce9f0;
}

.property-row select {
  min-width: 0;
  border: 0;
  border-left: 1px solid #43545f;
  color: #dce9f0;
  background: #26313a;
  padding: 0 5px;
  height: 22px;
}

.palette-tree {
  margin: 0;
  padding: 4px 0;
  list-style: none;
  color: #d8e4eb;
  font-size: 12px;
}

.palette-tree > li.palette-section {
  height: 22px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  cursor: pointer;
  background: #2c3742;
  border-top: 1px solid #1a232b;
}

.palette-tree > li.palette-section:hover {
  background: #344554;
}

.palette-sublist {
  margin: 0;
  padding: 2px 0 6px;
  list-style: none;
  background: #1d252e;
}

.palette-component {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 28px;
  cursor: pointer;
  color: #cfdde5;
}

.palette-component:hover {
  background: #2b5571;
}

.palette-component.active {
  background: #2e6db1;
  color: #ffffff;
}

.palette-icon {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #4f6573;
  background: #344c5e;
  color: #cde2f1;
  font-size: 10px;
  border-radius: 2px;
}

.palette-component.active .palette-icon {
  background: #1f4a7a;
  border-color: #75aedd;
}

.palette-hint {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -18px -18px 12px;
  padding: 6px 14px;
  background: #1f4a7a;
  color: #ffffff;
  font-size: 12px;
}

.design-client.show-grid {
  background:
    radial-gradient(circle, #9b9b9b 0 1px, transparent 1.2px),
    #f8fafc;
  background-size: 8px 8px;
}

.design-client:not(.show-grid) {
  background: #f8fafc;
}

.marquee-rect {
  position: absolute;
  border: 1px dashed #2978c0;
  background: rgba(41, 120, 192, 0.12);
  pointer-events: none;
  z-index: 50;
}

.component-handle.n { top: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.component-handle.s { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.component-handle.e { right: -6px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.component-handle.w { left: -6px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.component-handle.nw { cursor: nwse-resize; }
.component-handle.ne { cursor: nesw-resize; }
.component-handle.sw { cursor: nesw-resize; }
.component-handle.se { cursor: nwse-resize; }

.vcl-control { font-family: "Segoe UI", Tahoma, sans-serif; box-sizing: border-box; overflow: hidden; }
.vcl-control.label { background: transparent; }
.vcl-control.label .ctl-label { color: #000; font-size: 12px; }
.vcl-control.edit, .vcl-control.combobox {
  display: flex;
  align-items: center;
  padding: 0 4px;
  border: 1px solid #7a7a7a;
  background: #ffffff;
  color: #000;
}
.vcl-control.combobox { padding-right: 18px; position: relative; }
.ctl-combo-arrow { position: absolute; right: 4px; color: #555; font-size: 9px; }
.vcl-control.checkbox, .vcl-control.radio {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: #000;
  font-size: 12px;
}
.ctl-check, .ctl-radio { display: inline-grid; place-items: center; width: 13px; height: 13px; border: 1px solid #6b6b6b; background: #ffffff; color: #000; font-size: 9px; line-height: 1; }
.ctl-radio { border-radius: 50%; }
.ctl-check.checked::before { content: '✓'; font-size: 10px; }
.ctl-radio.checked::before { content: '●'; color: #000; }
.vcl-control.listbox {
  border: 1px solid #7a7a7a;
  background: #ffffff;
}
.ctl-listbox { font-size: 12px; color: #000; padding: 2px 4px; line-height: 1.4; }
.vcl-control.groupbox {
  background: transparent;
  color: #000;
}
.ctl-group {
  margin: 0;
  width: 100%;
  height: 100%;
  border: 1px solid #a0a0a0;
  padding: 0;
}
.ctl-group legend {
  padding: 0 4px;
  color: #000;
  font-size: 12px;
}
.vcl-control.panel {
  display: grid;
  place-items: center;
  border: 1px solid #808080;
  background: #f0f0f0;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
  color: #000;
  font-size: 12px;
}
.vcl-control.progressbar {
  border: 1px solid #6b6b6b;
  background: #e6e6e6;
  padding: 1px;
}
.ctl-pb-track { width: 100%; height: 100%; background: #e6e6e6; }
.ctl-pb-fill { height: 100%; background: linear-gradient(#43c463, #1e7a37); }
.vcl-control.trackbar {
  display: flex;
  align-items: center;
  background: transparent;
  position: relative;
}
.ctl-tb-track { width: 100%; height: 4px; background: #b6c0c8; border: 1px inset #6b6b6b; }
.ctl-tb-thumb { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 11px; height: 18px; background: linear-gradient(#f6f6f6, #c4cbd2); border: 1px solid #6b6b6b; }
.vcl-control.updown {
  background: #ffffff;
  border: 1px solid #6b6b6b;
}
.ctl-updown { display: grid; grid-template-rows: 1fr 1fr; height: 100%; font-size: 7px; color: #333; }
.ctl-updown span { display: grid; place-items: center; border-bottom: 1px solid #c5c5c5; }
.ctl-updown span:last-child { border-bottom: 0; }
.vcl-control.image {
  border: 1px dashed #888;
  background: #ffffff;
  display: grid;
  place-items: center;
}
.ctl-image { font-size: 32px; opacity: 0.5; }
.vcl-control.shape {
  background: transparent;
}
.vcl-control.shape svg {
  width: 100%;
  height: 100%;
  fill: #ffffff;
  stroke: #000;
}
.vcl-control.bevel {
  border: 1px solid #ffffff;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #ffffff;
  background: transparent;
}
.vcl-control.statictext {
  display: flex;
  align-items: center;
  padding: 0 2px;
  background: transparent;
  color: #000;
  font-size: 12px;
}
.vcl-control.grid {
  border: 1px solid #6b6b6b;
  background: #ffffff;
  overflow: hidden;
}
.ctl-grid { display: flex; flex-direction: column; }
.ctl-grid-row { display: flex; }
.ctl-grid-cell { flex: 1; height: 18px; border-right: 1px solid #c5c5c5; border-bottom: 1px solid #c5c5c5; }
.ctl-grid-row:first-child .ctl-grid-cell, .ctl-grid-row .ctl-grid-cell:first-child { background: #ece9d8; }
.vcl-control.pagecontrol, .vcl-control.tabcontrol {
  border: 1px solid #919b9c;
  background: #ffffff;
}
.ctl-tabs { display: flex; gap: 1px; padding: 2px 2px 0; background: #f0f0f0; border-bottom: 1px solid #919b9c; }
.ctl-tab { padding: 2px 10px; background: #e1e1e1; border: 1px solid #aaa; border-bottom: 0; font-size: 11px; color: #000; }
.ctl-tab.active { background: #ffffff; }
.ctl-tab-body { padding: 8px; }
.vcl-control.treeview, .vcl-control.listview {
  border: 1px solid #919b9c;
  background: #ffffff;
  color: #000;
  font-size: 11px;
  padding: 4px;
}
.ctl-lv-head { background: #ece9d8; border-bottom: 1px solid #aaa; padding: 1px 4px; font-weight: 600; }
.vcl-control.statusbar {
  display: flex;
  align-items: center;
  padding: 0 6px;
  background: #f0f0f0;
  border-top: 1px solid #d0d0d0;
  color: #000;
  font-size: 11px;
}
.vcl-control.toolbar {
  background: #f0f0f0;
  border: 1px solid #c0c0c0;
}
.ctl-toolbar { display: flex; gap: 4px; padding: 4px; font-size: 12px; color: #333; }
.vcl-control.paintbox {
  background: repeating-linear-gradient(45deg, #ffffff, #ffffff 6px, #f4f4f4 6px, #f4f4f4 12px);
  border: 1px dashed #888;
}
.vcl-control.scrollbar {
  background: #d4d0c8;
  border: 1px solid #808080;
  display: flex;
  align-items: center;
  font-size: 10px;
  color: #000;
}
.ctl-scrollbar { display: flex; align-items: center; width: 100%; height: 100%; }
.ctl-scrollbar > span { width: 16px; display: grid; place-items: center; background: #d4d0c8; border-right: 1px solid #808080; }
.ctl-scrollbar > span:last-child { border-right: 0; border-left: 1px solid #808080; }
.ctl-sb-track { flex: 1; background: linear-gradient(#eaeaea, #cfcfcf); height: 100%; position: relative; }
.ctl-sb-thumb { position: absolute; top: 0; left: 30%; width: 30%; height: 100%; background: #d4d0c8; border: 1px outset #ffffff; }
.vcl-control.nonvisual {
  display: grid;
  place-items: center;
  background: #ffffe1;
  border: 1px solid #888;
  color: #444;
  font-size: 10px;
  text-align: center;
}
.ctl-nonvis { line-height: 1.2; }
.vcl-control.speedbutton {
  display: grid;
  place-items: center;
  border: 1px solid #a8a8a8;
  background: linear-gradient(#f7f7f7, #e0e0e0);
  color: #111;
  font-size: 11px;
}

.code-editor {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  font-family: "Cascadia Code", "Fira Code", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 400;
  font-style: normal;
  line-height: 22px;
  letter-spacing: 0;
}

.code-gutter {
  background: #161d24;
  color: #3d5262;
  text-align: right;
  border-right: 2px solid #1f2e3a;
  overflow: hidden;
  user-select: none;
  padding: 8px 0;
}

.code-line-num {
  padding: 0 8px 0 4px;
  white-space: nowrap;
  font-size: 12px;
  transition: color 0.1s;
}

.code-line-num.has-error  { color: #f14c4c; }
.code-line-num.has-warning { color: #cca700; }

.code-surface {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #1a2230;
}

/* Highlight pre — sits behind the textarea */
.code-highlight {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  margin: 0;
  padding: 8px;
  pointer-events: none;
  white-space: pre;
  word-wrap: normal;
  overflow: visible;
  box-sizing: border-box;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: #d4d4d4;
  min-width: 100%;
  min-height: 100%;
}

/* Search overlay — sits above highlight, below textarea */
.code-search-layer {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  margin: 0;
  padding: 8px;
  pointer-events: none;
  white-space: pre;
  word-wrap: normal;
  overflow: visible;
  box-sizing: border-box;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: transparent;
  min-width: 100%;
  min-height: 100%;
}

.code-search-mark {
  color: transparent;
  background: rgba(204, 167, 0, 0.28);
  border-radius: 2px;
}

.code-search-mark.active {
  background: rgba(86, 156, 214, 0.42);
  outline: 1px solid rgba(117, 174, 221, 0.75);
}

/* Transparent textarea sits on top — cursor and selection visible */
.code-input {
  display: block;
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 8px;
  border: 0;
  outline: none;
  resize: none;
  box-sizing: border-box;
  background: transparent;
  color: transparent;
  caret-color: #e8e8e8;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
  -moz-tab-size: 2;
}

.code-input::selection {
  background: rgba(38, 109, 180, 0.55);
  color: transparent;
}

.code-input::-moz-selection {
  background: rgba(38, 109, 180, 0.55);
  color: transparent;
}

/* ── Token classes (VS Code dark+ inspired, Object Pascal edition) ─── */
.tok-k  { color: #569cd6; }                          /* keyword   — blue         */
.tok-t  { color: #4ec9b0; }                          /* type name — teal         */
.tok-b  { color: #dcdcaa; }                          /* builtin   — yellow       */
.tok-s  { color: #ce9178; }                          /* string    — warm orange  */
.tok-c  { color: #6a9955; font-style: italic; }      /* comment   — green italic */
.tok-n  { color: #b5cea8; }                          /* number    — sage green   */
.tok-dir { color: #808080; }                          /* directive — grey         */
.tok-op  { color: #d4d4d4; }                          /* operator  — light        */
.tok-sym { color: #7a8fa0; }                          /* delimiter — muted        */
.tok-id  { color: #d4d4d4; }                          /* identifier — default     */

.tok-err {
  text-decoration: underline wavy #f14c4c;
  text-underline-offset: 3px;
}

.tok-warn {
  text-decoration: underline wavy #cca700;
  text-underline-offset: 3px;
}

.code-findbar {
  position: absolute;
  top: 29px;
  left: 52px;
  right: 0;
  z-index: 30;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: #24313b;
  border-bottom: 1px solid #344653;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
  color: #c7d5dd;
  font-size: 12px;
}

.code-findbar input {
  height: 22px;
  min-width: 120px;
  border: 1px solid #465966;
  background: #1d252e;
  color: #dce9f0;
  padding: 0 6px;
  font: 12px Consolas, "Liberation Mono", monospace;
}

.code-findbar .line-jump-input {
  width: 58px;
  min-width: 58px;
}

.code-findbar button {
  height: 22px;
  min-width: 24px;
  border: 1px solid #465966;
  background: #2f3d49;
  color: #dce9f0;
  cursor: pointer;
}

.code-findbar button:hover {
  background: #3d5060;
}

.code-param-hint {
  position: fixed;
  max-width: 420px;
  padding: 6px 9px;
  border: 1px solid #587083;
  background: #fff8dc;
  color: #1d252e;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
  z-index: 85;
  font: 12px Consolas, "Liberation Mono", monospace;
  white-space: nowrap;
}

.code-param-hint[hidden] {
  display: none;
}

.code-insight-popup {
  position: fixed;
  min-width: 240px;
  max-width: 320px;
  max-height: 220px;
  overflow: auto;
  background: #252b35;
  border: 1px solid #3a4a58;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 80;
  font: 12px Consolas, "Liberation Mono", monospace;
  color: #d4d4d4;
  padding: 2px;
}

.code-insight-popup[hidden] {
  display: none;
}

.code-insight-empty {
  padding: 8px 10px;
  color: #7f93a0;
  font-style: italic;
}

.code-insight-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.code-insight-item:hover { background: #2a3540; }
.code-insight-item.active { background: #094771; color: #ffffff; }

.code-insight-item .ci-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #1e252e;
}

.ci-kind.ci-keyword { background: #569cd6; }
.ci-kind.ci-type { background: #4ec9b0; }
.ci-kind.ci-component { background: #c586c0; }
.ci-kind.ci-property { background: #dcdcaa; }
.ci-kind.ci-event { background: #ce9178; }
.ci-kind.ci-method { background: #9cdcfe; }
.ci-kind.ci-procedure { background: #b5cea8; }
.ci-kind.ci-function { background: #b5cea8; }

.code-insight-item .ci-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-insight-item .ci-detail {
  color: #7f93a0;
  font-size: 11px;
}

.code-insight-item.active .ci-detail { color: #d4d4d4; }

.compiler-messages {
  min-height: 0;
  display: grid;
  grid-template-rows: 27px minmax(0, 1fr);
  background: #1a232b;
  border-top: 1px solid #2f3f4a;
  font-size: 12px;
}

.compiler-messages header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
  color: #d4d4d4;
  background: #232a33;
  border-bottom: 1px solid #2f3f4a;
}

.compiler-messages header span {
  color: #95a9b5;
}

.diagnostic-list {
  overflow: auto;
}

.diagnostics-empty {
  padding: 10px;
  color: #7f93a0;
}

.diagnostic-row {
  width: 100%;
  display: grid;
  grid-template-columns: 72px 70px 78px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #25323b;
  padding: 5px 10px;
  background: transparent;
  color: transparent;
  z-index: 2;
  text-align: left;
}

.diagnostic-row:hover {
  background: #2a3540;
}

.diagnostic-row.error span:first-child {
  color: #f48771;
}

.diagnostic-row.warning span:first-child {
  color: #cca700;
}

.diagnostic-row strong {
  min-width: 0;
  overflow: hidden;
  color: #d4d4d4;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 500;
}

.run-dialog {
  width: 360px;
  padding: 18px 22px;
  background: #252e38;
  border: 1px solid #4d6474;
  color: #dce9f0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
}

.run-dialog h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #dce9f0;
}

.run-progress {
  height: 14px;
  background: #1a232b;
  border: 1px solid #4a5963;
  margin-bottom: 8px;
  overflow: hidden;
}

.run-bar {
  height: 100%;
  background: linear-gradient(#43c463, #1e7a37);
  transition: width 0.35s ease;
}

.run-dialog p {
  margin: 8px 0 14px;
  font-size: 12px;
  color: #95a9b5;
}

.run-dialog button {
  padding: 4px 16px;
  border: 1px solid #4a6578;
  background: linear-gradient(#2a3540, #202932);
  color: #dce9f0;
  font-size: 12px;
}

.designer-modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
  z-index: 650;
}

.quick-edit-dialog {
  width: 360px;
  display: grid;
  grid-template-rows: 31px 28px minmax(0, 1fr) 40px;
  background: #25313a;
  border: 1px solid #6e8798;
  color: #dce9f0;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.42);
}

.quick-edit-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  background: #526978;
  color: #ffffff;
  font-size: 13px;
}

.quick-edit-dialog header button {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.quick-edit-target {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: #202932;
  border-bottom: 1px solid #3c4c58;
  color: #95a9b5;
  font-size: 12px;
}

.quick-edit-fields {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.quick-field {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.quick-field span {
  color: #ebc260;
}

.quick-field input {
  min-width: 0;
  height: 23px;
  border: 1px solid #43545f;
  background: #1f2931;
  color: #dce9f0;
  padding: 0 7px;
}

.quick-edit-dialog footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 10px;
  background: #202932;
  border-top: 1px solid #3c4c58;
}

.quick-edit-dialog footer button {
  min-width: 72px;
  height: 25px;
  border: 1px solid #657b8a;
  background: #2f414d;
  color: #eaf4fa;
  cursor: pointer;
}

.quick-edit-dialog footer button[type="submit"] {
  background: #1f6fa8;
  border-color: #4494c8;
}

.designer-context-menu {
  position: fixed;
  z-index: 700;
  width: 220px;
  padding: 4px 0;
  background: #252e38;
  border: 1px solid #3c4c58;
  box-shadow: 3px 4px 12px rgba(0, 0, 0, 0.55);
  color: #d8e4eb;
  font-size: 12px;
}

.designer-context-menu button {
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  border: 0;
  padding: 0 18px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.designer-context-menu button:hover:not(:disabled) {
  background: #2878c0;
  color: #ffffff;
}

.designer-context-menu button:disabled {
  color: #4a5d6b;
  cursor: default;
}

.context-sep {
  height: 1px;
  margin: 4px 8px;
  background: #344050;
}

.statusbar .status-msg {
  flex: 1;
}

.titlebar input {
  padding: 0 8px;
}

.titlebar input::placeholder {
  color: #c2d6e6;
}

.is-dragging .menu-popup {
  display: none;
}

/* ─── Runtime backdrop + Floating Form Window ──────────────────────────── */

/* Dim the IDE behind the running form — pointer-events none so you can
   drag the window to reveal any part of the IDE underneath */
.runtime-backdrop {
  position: fixed;
  inset: 0;
  z-index: 599;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}

.runtime-floatwin {
  position: fixed;
  z-index: 600;
  display: grid;
  grid-template-rows: 30px minmax(0, 1fr);
  background: #f0f0f0;
  border: 1px solid #0078d4;
  border-top: 2px solid #0078d4;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.08);
  overflow: visible;
  min-width: 140px;
  min-height: 62px;
  user-select: none;
}

.runtime-floatwin.minimized {
  grid-template-rows: 30px 0;
  overflow: hidden;
  border-bottom: 1px solid #0078d4;
}

/* Windows 10/11 style title bar — light grey with blue accent on active */
.runtime-floatwin-caption {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 0 0 10px;
  background: #f3f3f3;
  border-bottom: 1px solid #d0d0d0;
  color: #1a1a1a;
  font: 12px "Segoe UI", Tahoma, sans-serif;
  cursor: move;
}

.rt-form-icon {
  flex-shrink: 0;
  color: #c61a30;
  font-size: 13px;
  line-height: 1;
}

.runtime-title {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 400;
  color: #1a1a1a;
}

.rt-caption-btns {
  display: flex;
  align-self: stretch;
  margin-left: auto;
}

.rt-caption-btns button {
  width: 46px;
  height: 100%;
  border: 0;
  background: transparent;
  color: #1a1a1a;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.rt-caption-btns button:hover {
  background: rgba(0, 0, 0, 0.08);
}

.rt-caption-btns .rt-close-btn:hover {
  background: #c42b1c;
  color: #ffffff;
}

.runtime-client {
  position: relative;
  overflow: hidden;
  font: 12px "Segoe UI", Tahoma, sans-serif;
}

/* ── Resize handles ────────────────────────────────────────────────────── */
.fw-resize {
  position: absolute;
  z-index: 10;
}
.fw-n  { top: -4px;    left: 10px;   right: 10px;  height: 8px;  cursor: n-resize; }
.fw-s  { bottom: -4px; left: 10px;   right: 10px;  height: 8px;  cursor: s-resize; }
.fw-e  { right: -4px;  top: 10px;    bottom: 10px; width: 8px;   cursor: e-resize; }
.fw-w  { left: -4px;   top: 10px;    bottom: 10px; width: 8px;   cursor: w-resize; }
.fw-ne { top: -4px;    right: -4px;  width: 14px;  height: 14px; cursor: ne-resize; }
.fw-nw { top: -4px;    left: -4px;   width: 14px;  height: 14px; cursor: nw-resize; }
.fw-se { bottom: -4px; right: -4px;  width: 14px;  height: 14px; cursor: se-resize; }
.fw-sw { bottom: -4px; left: -4px;   width: 14px;  height: 14px; cursor: sw-resize; }

.rt-btn {
  border: 1px solid #a8a8a8;
  background: linear-gradient(#f7f7f7, #e0e0e0);
  color: #111;
  font-size: 12px;
  cursor: pointer;
}

.rt-btn:hover:not(:disabled) {
  background: linear-gradient(#fdfdfd, #e8eef4);
  border-color: #7eaedd;
}

.rt-btn:active:not(:disabled) {
  background: linear-gradient(#d4d4d4, #ececec);
}

.rt-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.rt-edit {
  border: 1px solid #7a7a7a;
  background: #ffffff;
  color: #111;
  padding: 0 4px;
  font: 12px "Segoe UI", Tahoma, sans-serif;
}

.rt-edit:focus,
.rt-memo:focus {
  outline: 1px solid #2978c0;
  outline-offset: -1px;
}

.rt-memo {
  border: 1px solid #7a7a7a;
  background: #ffffff;
  color: #111;
  font: 12px "Segoe UI", Tahoma, sans-serif;
  padding: 4px;
  resize: none;
}

.rt-label,
.rt-static {
  display: flex;
  align-items: center;
  background: transparent;
  color: #111;
}

.rt-check,
.rt-radio {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.rt-check input,
.rt-radio input {
  margin: 0;
}

.rt-listbox,
.rt-combo {
  border: 1px solid #7a7a7a;
  background: #ffffff;
  color: #111;
}

.rt-panel {
  display: grid;
  place-items: center;
  border: 1px solid #808080;
  background: #f0f0f0;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
  color: #111;
}

.rt-groupbox {
  margin: 0;
  padding: 0;
  border: 1px solid #a0a0a0;
  background: transparent;
}

.rt-groupbox legend {
  padding: 0 4px;
  color: #111;
}

.rt-pb {
  border: 1px solid #6b6b6b;
  background: #e6e6e6;
  padding: 1px;
}

.rt-pb-fill {
  height: 100%;
  background: linear-gradient(#43c463, #1e7a37);
}

.rt-track {
  width: 100%;
}

.rt-image {
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px dashed #888;
  color: #888;
  font-size: 32px;
}

.rt-shape {
  fill: #ffffff;
  stroke: #000;
}

.create-section-label {
  grid-column: 1 / -1;
  height: auto !important;
  min-height: unset !important;
  padding: 7px 0 2px !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a8898;
  border-top: 1px solid #344050;
  display: flex;
  align-items: center;
  gap: 6px;
}

.create-section-label:first-child {
  border-top: none;
}

.create-section-vcl {
  color: #4a5d6b;
}

.create-item-fmx:hover {
  background: #2e3d4a;
  cursor: pointer;
}

.icon-0 { color: #5bbef5; }
.icon-1 { color: #7aaddf; }
.icon-2 { color: #8ab4e0; }
.icon-3 { color: #95a9b5; }
.icon-4 { color: #c4a55d; }
.icon-5 { color: #7ec47e; }

.icon-vcl { color: #5a6d7c; }

.create-item-vcl {
  opacity: 0.4;
  cursor: not-allowed;
}

.create-item-vcl .create-icon {
  border-color: #3a4c58;
  background: #263039;
  color: #5a6d7c;
}

.coming-soon-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  background: #3a4c5e;
  color: #7a93a2;
  font-size: 9px;
  font-weight: 600;
  border-radius: 2px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
