/* Vision — View-Specific Styles */
/* ── Cockpit panels: ensure every tab's content area is independently scrollable ── */
        #active-cockpit-content {
            overflow-y: auto !important;
            overflow-x: hidden !important;
        }

        #active-cockpit-content > div,
        #active-cockpit-content > section {
            min-height: 0;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(6px);
            }

            to {
                opacity: 1;
                transform: none;
            }
        }

        /* Legacy header slot */
        .header {
            padding: 0;
            display: none;
        }

        .tab-title {
            font-size: 22px;
            font-weight: 800;
            color: var(--text-primary);
            letter-spacing: -0.4px;
        }

        #sidebar-auto-mode {
            display: none;
            flex-direction: column;
            gap: 4px;
            padding: 8px var(--s3);
            margin: var(--s2) 0;
            background: rgba(124, 58, 237, 0.06);
            border: 1px solid var(--border-subtle);
            border-radius: var(--r-md);
        }

        .activity-stream {
            border-left: 1px solid var(--border-subtle);
            padding: var(--s8);
            display: flex;
            flex-direction: column;
            gap: var(--s5);
        }

        /* Breadcrumb updates from JS */
        #breadcrumb-slot {
            transition: opacity 0.2s ease;
        }
        /* ── Drawflow Obsidian Theme ─── */
        .drawflow { background: var(--canvas); }
        .drawflow .drawflow-node { background: var(--surface-2); border: 1px solid var(--border-default); border-radius: var(--r-xl); box-shadow: 0 4px 20px rgba(0,0,0,0.5); padding: 15px; color: var(--text-primary); transition: border-color 0.2s; width: 250px; z-index: 100; }
        .drawflow .drawflow-node.selected { border: 1px solid var(--accent-cyan); box-shadow: 0 0 10px rgba(6,182,212,0.3); }
        .drawflow .connection .main-path { stroke: var(--accent-cyan); stroke-width: 3px; }
        .drawflow .drawflow-node .inputs .input { background: var(--surface-3); border: 2px solid var(--border-subtle); border-radius: 50%; width: 14px; height: 14px; margin-left: -22px; transition: border-color 0.2s; }
        .drawflow .drawflow-node .outputs .output { background: var(--accent); border: 2px solid var(--surface-1); border-radius: 50%; width: 14px; height: 14px; margin-right: -22px; transition: background 0.2s; }
        .drawflow .drawflow-node .inputs .input:hover, .drawflow .drawflow-node .outputs .output:hover { border-color: var(--accent-light); cursor: crosshair; }
        .drawflow-title { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08rem; margin-bottom: 10px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 8px; }
        .drawflow-custom-select, .drawflow-custom-input, .drawflow-custom-textarea { width: 100%; background: var(--surface-3) !important; color: var(--text-primary) !important; border: 1px solid var(--border-default) !important; border-radius: var(--r-md) !important; padding: 8px 12px !important; font-size: 12px !important; outline: none; margin-bottom: 8px; }
        .drawflow-custom-select:focus, .drawflow-custom-input:focus, .drawflow-custom-textarea:focus { border-color: var(--accent-cyan) !important; box-shadow: 0 0 5px var(--accent-cyan-glow); }

        /* Custom Premium Select */
        .premium-select-wrapper {
            position: relative;
            display: inline-block;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            user-select: none;
        }
        .premium-select-trigger {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 4px 8px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 6px;
            color: #cbd5e1;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .premium-select-trigger:hover {
            background: rgba(255,255,255,0.08);
            border-color: rgba(255,255,255,0.2);
        }
        .premium-select-trigger.open {
            background: rgba(6, 182, 212, 0.1);
            border-color: var(--accent-cyan);
            color: var(--accent-cyan);
        }
        .premium-select-options {
            position: absolute;
            bottom: calc(100% + 4px);
            left: 0;
            width: max-content;
            min-width: 140px;
            background: #0f172a;
            border: 1px solid var(--cockpit-border);
            border-radius: 8px;
            box-shadow: 0 -10px 25px rgba(0,0,0,0.5);
            z-index: 9999;
            overflow: hidden;
            display: none;
            flex-direction: column;
            opacity: 0;
            transform: translateY(5px);
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .premium-select-options.open {
            display: flex;
            opacity: 1;
            transform: translateY(0);
        }
        .premium-option {
            padding: 8px 12px;
            color: #94a3b8;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
        }
        .premium-option:hover, .premium-option.selected {
            background: rgba(6, 182, 212, 0.1);
            color: white;
        }

        /* Status Colors */
        .premium-option.status-green { color: #4ade80; }
        .premium-option.status-green::before { content: ''; display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:8px; background:#4ade80; box-shadow: 0 0 5px #4ade80; }
        .premium-option.status-red { color: #f87171; pointer-events: none; opacity: 0.6; }
        .premium-option.status-red::before { content: ''; display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:8px; background:#f87171; box-shadow: 0 0 5px #f87171; }
        .premium-option.status-grey { color: #64748b; opacity: 0.5; pointer-events: none; }
        .premium-option.status-grey::before { content: ''; display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:8px; background:#64748b; }

        .premium-select-trigger.status-green { color: #4ade80; border-color: rgba(74, 222, 128, 0.2); }
        .premium-select-trigger.status-red { color: #f87171; border-color: rgba(248, 113, 113, 0.2); }
        .premium-select-trigger.status-grey { color: #64748b; border-color: rgba(100, 116, 139, 0.2); }

        .segment-btn { padding: 4px 10px; cursor: pointer; transition: all 0.2s; color: #94a3b8; }
        .segment-btn:hover { background: rgba(255,255,255,0.05); }
        .segment-btn.active { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); font-weight: bold; }

        /* Premium Markdown Styles for Logs */
        .log-entry-content { color: #e2e8f0; line-height: 1.6; font-size: 0.85rem; }
        .log-entry-content p { margin: 8px 0; }
        .log-entry-content pre { background: #020617; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 12px; overflow-x: auto; margin: 12px 0; position: relative; }
        .log-entry-content code { font-family: 'JetBrains Mono', monospace; background: rgba(255,255,255,0.1); padding: 2px 4px; border-radius: 4px; color: #7dd3fc; font-size: 0.8rem; }
        .log-entry-content pre code { background: none; padding: 0; color: #e2e8f0; }
        .log-entry-content h1, .log-entry-content h2, .log-entry-content h3 { color: var(--accent-cyan); margin: 16px 0 8px 0; font-weight: 700; }
        .log-entry-content ul, .log-entry-content ol { padding-left: 20px; margin: 8px 0; }
        .log-entry-content li { margin: 4px 0; }
        .log-entry-content blockquote { border-left: 3px solid var(--accent-cyan); padding-left: 12px; color: #94a3b8; font-style: italic; margin: 12px 0; }
        
        @keyframes pulse-cyan {
            0% { opacity: 0.4; transform: scale(0.98); }
            50% { opacity: 1; transform: scale(1); }
            100% { opacity: 0.4; transform: scale(0.98); }
        }

        .pulse-ring {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            display: inline-block;
            animation: pulse-ring 2s infinite;
        }
        @keyframes pulse-ring {
            0% { transform: scale(0.8); opacity: 0.5; }
            50% { transform: scale(1.1); opacity: 1; }
            100% { transform: scale(0.8); opacity: 0.5; }
        }
        @keyframes progress-pulse {
            0% { left: -100%; }
            100% { left: 100%; }
        }

        /* --- Environment Badge --- */
        .env-badge {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 4px 12px;
            border-radius: 50px;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.1rem;
            font-family: 'JetBrains Mono', monospace;
            text-transform: uppercase;
            transition: all 0.3s ease;
            user-select: none;
        }
        .env-badge.dev {
            color: #fbbf24;
            border: 1px solid rgba(251, 191, 36, 0.3);
            background: rgba(251, 191, 36, 0.05);
            box-shadow: 0 0 10px rgba(251, 191, 36, 0.1);
        }
        .env-badge.prod {
            color: #4ade80;
            border: 1px solid rgba(74, 222, 128, 0.3);
            background: rgba(74, 222, 128, 0.05);
            box-shadow: 0 0 10px rgba(74, 222, 128, 0.1);
        }
        .env-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
        }
        .env-badge.dev .env-dot {
            background: #fbbf24;
            box-shadow: 0 0 5px #fbbf24;
            animation: pulse-amber 2s infinite;
        }
        .env-badge.prod .env-dot {
            background: #4ade80;
            box-shadow: 0 0 5px #4ade80;
        }
        @keyframes pulse-amber {
            0% { opacity: 0.5; }
            50% { opacity: 1; }
            100% { opacity: 0.5; }
        }
        .ide-loading-phase { display: flex; align-items: center; gap: 10px; color: #64748b; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; padding: 8px; }
        .ide-loading-spinner { width: 14px; height: 14px; border: 2px solid var(--accent-cyan); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
        .ide-phase-text { animation: pulse-cyan 2s infinite; }
        /* --- GitHub Explorer --- */
        .explorer-container { display: flex; flex-direction: column; height: 100%; min-height: 500px; background: rgba(2, 6, 23, 0.4); border-radius: 12px; border: 1px solid var(--border-subtle); overflow: hidden; }
        .explorer-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--border-subtle); background: rgba(255,255,255,0.02); }
        .explorer-breadcrumb { display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); }
        .breadcrumb-part { cursor: pointer; transition: color 0.2s; }
        .breadcrumb-part:hover { color: var(--accent-cyan); }
        .explorer-list { flex: 1; overflow-y: auto; padding: 8px; }
        .explorer-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
        .explorer-item:hover { background: rgba(6, 182, 212, 0.05); border-color: rgba(6, 182, 212, 0.1); }
        .item-icon { width: 16px; height: 16px; opacity: 0.7; }
        .item-name { flex: 1; font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .code-viewer-container { display: flex; flex-direction: column; height: 100%; background: #020617; border-top: 1px solid var(--border-subtle); overflow: hidden; }
        .code-viewer-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #0f172a; border-bottom: 1px solid var(--border-subtle); }
        .code-display { flex: 1; padding: 20px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #e2e8f0; line-height: 1.6; overflow: auto; white-space: pre; background: #020617; }
        .type-folder { color: #facc15; }
        .type-file { color: #3b82f6; }


