/* ── Computer Node: custom body button on the workflow node ── */
.wf-computer-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 10px 8px;
    font-family: inherit;
}
.wf-computer-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wf-computer-open {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #0ea5e9, #1e3a8a);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
}
.wf-computer-open:hover { filter: brightness(1.15); }
.wf-computer-open:active { transform: scale(0.97); }

/* ── Full-screen OS overlay ── */
.vnos-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
    animation: vnos-fade-in 0.2s ease both;
}
@keyframes vnos-fade-in { from { opacity: 0; } to { opacity: 1; } }
.vnos-overlay.closing { animation: vnos-fade-out 0.15s ease both; }
@keyframes vnos-fade-out { to { opacity: 0; } }

.vnos-frame {
    width: min(1200px, 100%);
    height: min(820px, 100%);
    background: #0b1020;
    border: 1px solid #1e293b;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #e2e8f0;
    position: relative;
}
.vnos-titlebar {
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    background: linear-gradient(#0f172a, #0b1020);
    border-bottom: 1px solid #1e293b;
    font-size: 12px;
    color: #94a3b8;
    user-select: none;
}
.vnos-titlebar-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #475569;
    cursor: pointer;
}
.vnos-titlebar-dot.close { background: #ef4444; }
.vnos-titlebar-dot.min { background: #eab308; }
.vnos-titlebar-dot.max { background: #22c55e; }
.vnos-titlebar-title {
    flex: 1;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ── Splash screen ── */
.vnos-splash {
    position: absolute;
    inset: 32px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #0f172a 0%, #020617 70%);
    z-index: 10;
    animation: vnos-splash-in 0.4s ease both;
}
.vnos-splash.hide { animation: vnos-splash-out 0.4s ease both; pointer-events: none; }
@keyframes vnos-splash-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes vnos-splash-out { to { opacity: 0; transform: scale(1.02); } }

.vnos-splash-logo {
    width: 128px;
    height: 128px;
    margin-bottom: 24px;
    animation: vnos-splash-float 2.4s ease-in-out infinite;
    filter: drop-shadow(0 0 24px rgba(14, 165, 233, 0.6));
}
@keyframes vnos-splash-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.vnos-splash-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.12em;
    background: linear-gradient(90deg, #67e8f9, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.vnos-splash-sub {
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}
.vnos-splash-bar {
    width: 220px;
    height: 3px;
    margin-top: 28px;
    border-radius: 3px;
    background: #1e293b;
    overflow: hidden;
    position: relative;
}
.vnos-splash-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, #67e8f9, transparent);
    animation: vnos-splash-scan 1.2s ease-in-out infinite;
}
@keyframes vnos-splash-scan { 0% { left: -40%; } 100% { left: 100%; } }

/* ── Desktop ── */
.vnos-desktop {
    flex: 1;
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.08), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.08), transparent 50%),
        linear-gradient(160deg, #0b1020 0%, #111827 100%);
    overflow: hidden;
}
.vnos-desktop-icons {
    position: absolute;
    top: 24px;
    left: 24px;
    display: grid;
    grid-auto-flow: row;
    gap: 22px;
}
.vnos-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 82px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    user-select: none;
}
.vnos-icon:hover { background: rgba(148, 163, 184, 0.1); }
.vnos-icon:active { transform: scale(0.96); }
.vnos-icon-img {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    margin-bottom: 6px;
    color: #67e8f9;
}
.vnos-icon-img svg { width: 26px; height: 26px; }
.vnos-icon-label {
    font-size: 11px;
    color: #cbd5e1;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* ── Taskbar ── */
.vnos-taskbar {
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: linear-gradient(#111827, #0b1020);
    border-top: 1px solid #1e293b;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
    z-index: 20;
}
.vnos-start {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #0ea5e9;
    color: #0b1020;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
}
.vnos-task {
    padding: 4px 10px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid #1e293b;
    border-radius: 4px;
    cursor: pointer;
    color: #cbd5e1;
}
.vnos-task.active { background: rgba(14, 165, 233, 0.18); border-color: #0ea5e9; color: #e0f2fe; }
.vnos-clock { margin-left: auto; padding-right: 4px; font-variant-numeric: tabular-nums; }

/* ── App windows ── */
.vnos-window {
    position: absolute;
    top: 40px;
    left: 120px;
    width: 780px;
    height: 540px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 5;
    animation: vnos-win-open 0.2s ease both;
}
@keyframes vnos-win-open { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.vnos-window.active { z-index: 15; border-color: #334155; }
.vnos-window-header {
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
    background: #111827;
    border-bottom: 1px solid #1e293b;
    cursor: grab;
    user-select: none;
}
.vnos-window-title {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.vnos-window-title svg { width: 14px; height: 14px; color: #67e8f9; }
.vnos-window-controls { display: flex; gap: 6px; }
.vnos-window-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    padding: 0;
}
.vnos-window-btn.close { background: #ef4444; }
.vnos-window-btn.min   { background: #eab308; }
.vnos-window-btn.max   { background: #22c55e; }
.vnos-window-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    min-height: 0;
}

/* ── IO Manager ── */
.vnos-io {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
}
.vnos-io-col {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1e293b;
    min-width: 0;
}
.vnos-io-col:last-child { border-right: none; }
.vnos-io-col-header {
    flex: 0 0 auto;
    padding: 10px 14px;
    background: #111827;
    border-bottom: 1px solid #1e293b;
    font-size: 11px;
    font-weight: 700;
    color: #67e8f9;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.vnos-io-add {
    background: #0ea5e9;
    color: #0b1020;
    border: none;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}
.vnos-io-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}
.vnos-io-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 5px;
    margin-bottom: 2px;
}
.vnos-io-row:hover { background: rgba(148, 163, 184, 0.06); }
.vnos-io-row input {
    flex: 1;
    padding: 5px 8px;
    background: #0b1020;
    border: 1px solid #1e293b;
    color: #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
}
.vnos-io-row input:focus { outline: none; border-color: #0ea5e9; }
.vnos-io-row .vnos-io-remove {
    background: transparent;
    color: #f87171;
    border: 1px solid transparent;
    padding: 3px 7px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.vnos-io-row .vnos-io-remove:hover { border-color: #7f1d1d; background: rgba(239,68,68,0.1); }
.vnos-io-footer {
    padding: 10px 14px;
    background: #0b1020;
    border-top: 1px solid #1e293b;
    font-size: 11px;
    color: #64748b;
}

/* ── IDE ── */
.vnos-ide {
    flex: 1;
    display: grid;
    grid-template-columns: 200px 1fr;
    min-width: 0;
}
.vnos-ide-tree {
    background: #0b1020;
    border-right: 1px solid #1e293b;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.vnos-tree-header {
    padding: 10px 12px;
    background: #111827;
    border-bottom: 1px solid #1e293b;
    font-size: 11px;
    font-weight: 700;
    color: #67e8f9;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.vnos-tree-new {
    background: transparent;
    color: #67e8f9;
    border: 1px solid #0ea5e9;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
}
.vnos-tree-list { padding: 4px; flex: 1; }
.vnos-tree-file {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    color: #cbd5e1;
}
.vnos-tree-file:hover { background: rgba(148, 163, 184, 0.08); }
.vnos-tree-file.active { background: rgba(14, 165, 233, 0.18); color: #e0f2fe; }
.vnos-tree-file.entry::after {
    content: '★';
    margin-left: auto;
    color: #fbbf24;
    font-size: 11px;
}
.vnos-tree-file .vnos-tree-remove {
    margin-left: auto;
    background: transparent;
    color: #64748b;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    visibility: hidden;
}
.vnos-tree-file:hover .vnos-tree-remove { visibility: visible; }
.vnos-tree-file .vnos-tree-remove:hover { color: #f87171; }

.vnos-ide-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.vnos-ide-tabbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    background: #111827;
    border-bottom: 1px solid #1e293b;
    padding: 6px 10px;
    gap: 8px;
    font-size: 11px;
}
.vnos-ide-filename {
    flex: 1;
    color: #e2e8f0;
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    background: transparent;
    border: none;
    font-size: 12px;
    font-weight: 600;
}
.vnos-ide-filename:focus { outline: 1px solid #0ea5e9; border-radius: 3px; }
.vnos-ide-entry-toggle {
    background: transparent;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
}
.vnos-ide-entry-toggle.on { border-color: #fbbf24; color: #fbbf24; }
.vnos-ide-editor {
    flex: 1;
    position: relative;
    min-height: 0;
}
.vnos-ide-editor-host {
    position: absolute;
    inset: 0;
}
.vnos-ide-fallback {
    position: absolute;
    inset: 0;
    background: #0b1020;
    color: #e2e8f0;
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 13px;
    padding: 12px;
    border: none;
    resize: none;
    outline: none;
}
.vnos-ide-statusbar {
    flex: 0 0 auto;
    padding: 4px 10px;
    background: #0b1020;
    border-top: 1px solid #1e293b;
    font-size: 11px;
    color: #64748b;
    display: flex;
    justify-content: space-between;
}

/* ── Micro-flow ── */
.vnos-mf {
    flex: 1;
    display: grid;
    grid-template-columns: 240px 1fr;
    min-width: 0;
}
.vnos-mf-side {
    background: #0b1020;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.vnos-mf-side-header {
    padding: 10px 12px;
    background: #111827;
    border-bottom: 1px solid #1e293b;
    font-size: 11px;
    font-weight: 700;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.vnos-mf-list { flex: 1; overflow-y: auto; padding: 6px; }
.vnos-mf-project {
    padding: 8px 10px;
    border-radius: 5px;
    margin-bottom: 4px;
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.25);
    cursor: pointer;
    font-size: 12px;
    color: #ddd6fe;
}
.vnos-mf-project:hover { background: rgba(167, 139, 250, 0.14); }
.vnos-mf-main {
    padding: 14px;
    overflow: auto;
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.55;
}
.vnos-mf-main h4 {
    font-size: 13px;
    color: #e2e8f0;
    margin: 0 0 8px;
}
.vnos-mf-wire-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 6px;
    margin-bottom: 4px;
    align-items: center;
}
.vnos-mf-wire-row select,
.vnos-mf-wire-row input {
    padding: 5px 8px;
    background: #0b1020;
    border: 1px solid #1e293b;
    color: #e2e8f0;
    border-radius: 4px;
    font-size: 11px;
}
.vnos-mf-add-wire {
    background: #a78bfa;
    color: #1e1b4b;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.vnos-mf-empty {
    color: #64748b;
    font-style: italic;
    padding: 20px 0;
    text-align: center;
}

/* ── Utility ── */
.vnos-btn {
    background: #0ea5e9;
    color: #0b1020;
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.vnos-btn.ghost {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #334155;
}
.vnos-btn.ghost:hover { background: #1e293b; }
.vnos-btn:hover { filter: brightness(1.1); }
