:root { --ide-bg: #181818; --panel: #252526; --accent: #007acc; --win-gray: #f0f0f0; --border: #333; }
body { background: var(--ide-bg); color: #ccc; font-family: 'Segoe UI', Tahoma, sans-serif; height: 100vh; display: flex; flex-direction: column; overflow: hidden; margin: 0; }

.app-menu-bar { background: var(--win-gray); height: 24px; display: flex; align-items: center; padding: 0 5px; color: #000; font-size: 11px; border-bottom: 1px solid #999; flex-shrink: 0; z-index: 5000; }
.app-menu-item { padding: 0 10px; height: 100%; display: flex; align-items: center; cursor: default; position: relative; }
.app-menu-item:hover { background: #007acc; color: white; }
.dropdown-content { display: none; position: absolute; top: 24px; left: 0; background: var(--win-gray); color: #000; min-width: 180px; box-shadow: 2px 2px 5px rgba(0,0,0,0.2); border: 1px solid #999; z-index: 6000; }
.app-menu-item:hover .dropdown-content { display: block; }
.drop-item { padding: 5px 15px; display: flex; justify-content: space-between; cursor: pointer; }
.drop-item:hover { background: #007acc; color: white; }

.vcl-palette { background: var(--panel); border-bottom: 1px solid #000; flex-shrink: 0; display: flex; flex-direction: column; }
.vcl-tabs { display: flex; background: #2d2d2d; height: 24px; border-bottom: 1px solid #111; }
.vcl-tab { padding: 0 15px; font-size: 10px; display: flex; align-items: center; cursor: pointer; border-right: 1px solid #111; color: #aaa; }
.vcl-tab.active { background: var(--panel); color: white; font-weight: bold; border-top: 1px solid var(--accent); }
.vcl-items { height: 45px; display: flex; align-items: center; padding: 0 5px; gap: 15px; overflow-x: auto; }

.comp-entry { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 8px; border-radius: 3px; border: 1px solid transparent; }
.comp-entry:hover { background: #3d3d3d; border-color: #555; }
.comp-entry i { font-size: 14px; color: #007acc; width: 16px; text-align: center; }
.comp-entry span { font-size: 11px; color: #ddd; }

.main-workspace { flex: 1; display: flex; overflow: hidden; }
.sidebar { width: 320px; background: var(--panel); border-right: 1px solid #000; display: flex; flex-direction: column; }
.editor-zone { flex: 1; display: flex; flex-direction: column; background: #1e1e1e; }

.unit-strip { background: #2d2d2d; height: 35px; display: flex; border-bottom: 1px solid #000; }
.utab { min-width: 160px; padding: 0 12px; height: 100%; display: flex; align-items: center; justify-content: space-between; font-size: 11px; cursor: pointer; background: #333; border-right: 1px solid #111; color: #888; }
.utab.active { background: #1e1e1e; color: white; border-top: 2px solid var(--accent); }

.designer-container { flex: 1; position: relative; overflow: auto; background-image: radial-gradient(#333 1px, transparent 1px); background-size: 10px 10px; }

.vcl-form { background: #f0f0f0; position: absolute; border: 1px solid #007acc; box-shadow: 0 10px 40px rgba(0,0,0,0.6); touch-action: none; display: flex; flex-direction: column; }
.vcl-form-cap { background: white; height: 32px; display: flex; align-items: center; justify-content: space-between; padding: 0 0 0 12px; color: #333; font-size: 12px; cursor: move; border-bottom: 1px solid #ddd; }
.win-controls { display: flex; height: 100%; }
.win-btn { width: 45px; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 10px; transition: background 0.2s; }
.win-btn:hover { background: #e5e5e5; }
.win-btn.close-btn:hover { background: #e81123; color: white; }

.vcl-form.maximized { width: 100% !important; height: 100% !important; left: 0 !important; top: 0 !important; }
.vcl-form.minimized { width: 200px !important; height: 32px !important; left: 10px !important; top: calc(100% - 42px) !important; overflow: hidden; }

.vcl-obj { position: absolute; border: 1px solid transparent; box-sizing: border-box; touch-action: none; }
.vcl-obj:hover { border: 1px dashed #007acc; cursor: move; }
.vcl-obj.selected { border: 1px solid var(--accent); z-index: 1000; outline: 1px solid rgba(255,255,255,0.5); }
.vcl-obj-content { width: 100%; height: 100%; pointer-events: none; }
.vcl-container-body { width: 100%; height: 100%; position: relative; }

.drop-target { outline: 2px dashed #007acc !important; outline-offset: -2px; }

.insp-row { display: flex; border-bottom: 1px solid #2d2d2d; height: 28px; align-items: center; font-size: 11px; }
.insp-k { width: 45%; padding-left: 10px; color: #9cdcfe; border-right: 1px solid #2d2d2d; }
.insp-v { width: 55%; background: transparent; border: none; color: #ce9178; padding: 0 10px; outline: none; }

.insp-v-container { width: 55%; height: 100%; display: flex; align-items: center; }
.insp-v-input { flex: 1; background: transparent; border: none; color: #ce9178; padding: 0 10px; outline: none; font-size: 11px; height: 100%; }
.insp-btn-dot { width: 24px; height: 100%; background: #3e3e42; color: white; border: none; cursor: pointer; font-weight: bold; display: flex; align-items: center; justify-content: center; }
.insp-btn-dot:hover { background: #505050; }

.tree-item { padding: 4px 8px; font-size: 11px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.tree-item:hover { background: #37373d; }
.tree-item.selected { background: #094771; color: white; }
.tree-indent { margin-left: 16px; border-left: 1px solid #444; }

.hidden { display: none !important; }
.empty-splash { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #666; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9000; display: flex; align-items: center; justify-content: center; }
.vcl-dialog { background: #f0f0f0; border: 1px solid #999; box-shadow: 0 10px 30px rgba(0,0,0,0.5); width: 450px; display: flex; flex-direction: column; position: absolute; touch-action: none; }
.vcl-dialog-cap { background: #007acc; color: white; padding: 6px 10px; font-size: 12px; display: flex; justify-content: space-between; cursor: move; user-select: none; }

/* CSS Designer Specific Styles */
.css-field-group { border-bottom: 1px solid #ddd; padding: 10px; }
.css-field-label { font-size: 10px; font-weight: bold; color: #555; margin-bottom: 5px; display: block; text-transform: uppercase; }
.css-input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 5px; }
.css-designer-input { width: 100%; border: 1px solid #ccc; padding: 4px; font-size: 11px; border-radius: 2px; }
