    /* 通用弹窗基线样式（保障所有 .modal-* 组件可见可交互） */
    .modal-overlay {
        position: fixed;
        inset: 0;
        z-index: 10060;
        background: rgba(0, 0, 0, 0.45);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        box-sizing: border-box;
        animation: modalFadeIn 0.18s ease-out;
    }

    .modal-container {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        width: 100%;
        max-width: 560px;
        max-height: 85vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .modal-header {
        padding: 16px 20px;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .modal-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 16px;
        font-weight: 600;
        color: #1f1f1f;
    }

    .modal-body {
        padding: 18px 20px;
        color: #333;
        font-size: 14px;
        line-height: 1.6;
    }

    .modal-message {
        margin: 0;
        white-space: pre-wrap;
    }

    .modal-footer {
        padding: 12px 20px;
        border-top: 1px solid #f0f0f0;
        display: flex;
        justify-content: flex-end;
        gap: 8px;
    }

    .modal-close {
        border: none;
        background: transparent;
        color: #999;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
    }

    .modal-btn {
        padding: 8px 14px;
        border-radius: 6px;
        border: 1px solid #d9d9d9;
        background: #fff;
        color: #333;
        cursor: pointer;
        font-size: 13px;
    }

    .modal-btn-primary {
        background: #713eff;
        border-color: #713eff;
        color: #fff;
    }

    .modal-btn-danger {
        background: #ff4d4f;
        border-color: #ff4d4f;
        color: #fff;
    }

    .modal-btn-warning {
        background: #faad14;
        border-color: #faad14;
        color: #fff;
    }

    .modal-input {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #d9d9d9;
        border-radius: 6px;
        padding: 8px 10px;
        font-size: 14px;
        outline: none;
    }

    .modal-input:focus {
        border-color: #713eff;
        box-shadow: 0 0 0 2px rgba(113, 62, 255, 0.12);
    }

    @keyframes modalFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes fadeOut {
        from { opacity: 1; }
        to { opacity: 0; }
    }

    /* 智能体实验室主容器 */
    .agent-lab-container {
        display: flex;
        flex-direction: column;
        height: 100%; /* 填满父容器 */
        overflow: hidden;
        background: #f5f5f5;
    }

    /* 顶部全局操作栏 */
    .toolbar {
        background: white;
        border-bottom: 1px solid #e0e0e0;
        padding: 4px 16px !important;
        display: flex;
        align-items: center;
        gap: 12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        z-index: 10005; /* 确保工具栏及其下拉菜单在最上层 */
        flex-shrink: 0;
        position: relative; /* 确保z-index生效 */
    }

    .toolbar-group {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 0 10px;
        border-right: 1px solid #e0e0e0;
    }

    .toolbar-group:last-child {
        border-right: none;
    }

    /* ============================================================
     * 导航栏高度统一规范 (ADR-0203)
     * 所有工具栏按钮必须显式定义 height: 36px，与 global-nav .nav-item 保持一致
     * 禁止依赖内容撑开，防止紫色下拉框比保存/刷新按钮高的顽固bug复发
     *
     * ADR-0206: 新增 min-height: 36px !important 防御层。
     * kid-ux.css 通过 ESM 注入 button { min-height: 44px } 覆盖 height，
     * 根源已在 kid-ux.css 限定到 .kid-ux-context 容器，此处为双重保险。
     * ============================================================ */
    .toolbar-btn,
    .toolbar-split-btn .main-btn,
    .toolbar-split-btn .arrow-btn {
        height: 36px !important;       /* 与 base.css .nav-item 保持一致 */
        min-height: 36px !important;   /* ADR-0206: 防止外部 min-height 覆盖 */
        line-height: 24px;             /* 文本垂直居中 */
        box-sizing: border-box;        /* 包含padding和border */
    }

    .toolbar-btn {
        padding: 6px 12px;
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        background: white;
        cursor: pointer;
        font-size: 13px;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .toolbar-btn:hover {
        background: #f5f5f5;
        border-color: #713eff;
    }

    .toolbar-btn.primary {
        background: #713eff;
        color: white;
        border-color: #713eff;
    }

    .toolbar-btn.primary:hover {
        background: #5a2fd9;
    }

    .toolbar-btn.danger {
        background: #ff4d4f;
        color: white;
        border-color: #ff4d4f;
    }

    .toolbar-btn.danger:hover {
        background: #d9363e;
    }

    .toolbar-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .toolbar-btn:disabled:hover {
        background: white;
        border-color: #d9d9d9;
    }

    /* 下拉菜单按钮样式 — 高度统一规范 (ADR-0203) + ADR-0206 min-height 防御 */
    .toolbar-dropdown-btn,
    .agent-dropdown-btn,
    .canvas-top-right-dropdown-btn,
    .right-dropdown-btn {
        height: 36px !important;       /* 与 global-nav .nav-item 保持一致 */
        min-height: 36px !important;   /* ADR-0206: 防止外部 min-height 覆盖 */
        line-height: 24px;             /* 文本垂直居中 */
        box-sizing: border-box;        /* 包含padding和border */
    }

    .toolbar-dropdown {
        position: relative;
        display: inline-block;
        z-index: 10010; /* 确保下拉菜单按钮及其菜单在最上层 */
    }

    .toolbar-dropdown-btn {
        padding: 6px 10px;
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        background: white;
        cursor: pointer;
        font-size: 13px;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .toolbar-dropdown-btn:hover {
        background: #f5f5f5;
        border-color: #713eff;
    }

    .toolbar-dropdown-btn .dropdown-arrow {
        font-size: 10px;
        margin-left: 2px;
        transition: transform 0.2s;
    }

    .toolbar-dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
    }

    .toolbar-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 4px;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        min-width: 160px;
        z-index: 10010; /* 高于智能体下拉菜单(10001)和智能体容器(10000)，确保置顶 */
        display: none;
        overflow: hidden;
    }

    .toolbar-dropdown.open .toolbar-dropdown-menu {
        display: block;
        animation: dropdownFadeIn 0.15s ease-out;
    }

    /* ADR-02XX: .workflow-selector-btn 及关联样式已移除（死代码——无对应 HTML/JS 引用） */

    .workflow-status.dirty {
        color: #ffd666;
    }

    .workflow-status.running {
        color: #52c41a;
        animation: pulse 1.5s infinite;
    }

    /* ADR-02XX: .workflow-dropdown-menu 已移除（死代码——无对应 HTML/JS 引用） */

    .workflow-list {
        max-height: 400px;
        overflow-y: auto;
        padding: 4px 0;
    }

    .workflow-item {
        padding: 10px 14px;
        cursor: pointer;
        transition: background 0.15s;
        border-bottom: 1px solid #f0f0f0;
    }

    .workflow-item:last-child {
        border-bottom: none;
    }

    .workflow-item:hover {
        background: #f5f0ff;
    }

    .workflow-item.current {
        background: #e6f7ff;
        border-left: 3px solid #1890ff;
    }

    .workflow-item-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 4px;
    }

    .workflow-item-icon {
        font-size: 16px;
        flex-shrink: 0;
    }

    .workflow-item-name {
        flex: 1;
        font-weight: 500;
        font-size: 14px;
        color: #333;
    }

    .workflow-item-badge {
        background: #1890ff;
        color: white;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 11px;
        flex-shrink: 0;
    }

    .workflow-item-shortcut {
        color: #999;
        font-size: 11px;
        flex-shrink: 0;
    }

    .workflow-item-meta {
        font-size: 11px;
        color: #999;
        margin-left: 24px;
    }

    @keyframes dropdownFadeIn {
        from { opacity: 0; transform: translateY(-4px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        font-size: 13px;
        color: #333;
        cursor: pointer;
        transition: background 0.15s;
    }

    .dropdown-item:hover {
        background: #f5f0ff;
        color: #713eff;
    }

    .dropdown-item .item-icon {
        width: 16px;
        text-align: center;
    }

    .dropdown-item .item-shortcut {
        margin-left: auto;
        font-size: 11px;
        color: #999;
    }
    .dropdown-item .item-check {
        margin-left: auto;
        font-size: 12px;
        color: #713eff;
    }

    .dropdown-divider {
        height: 1px;
        background: #e8e8e8;
        margin: 4px 0;
    }

    /* 分割按钮样式（主按钮 + 下拉箭头） */
    .toolbar-split-btn {
        display: flex;
        align-items: stretch;
    }

    .toolbar-split-btn .main-btn {
        padding: 6px 12px;
        border: 1px solid #d9d9d9;
        border-right: none;
        border-radius: 4px 0 0 4px;
        background: white;
        cursor: pointer;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 4px;
        transition: all 0.2s;
    }

    .toolbar-split-btn .main-btn:hover {
        background: #f5f5f5;
    }

    .toolbar-split-btn .main-btn.primary {
        background: #713eff;
        color: white;
        border-color: #713eff;
    }

    .toolbar-split-btn .main-btn.primary:hover {
        background: #5a2fd9;
    }

    .toolbar-split-btn .arrow-btn {
        padding: 6px 8px;
        border: 1px solid #d9d9d9;
        border-radius: 0 4px 4px 0;
        background: white;
        cursor: pointer;
        font-size: 10px;
        display: flex;
        align-items: center;
        transition: all 0.2s;
    }

    .toolbar-split-btn .arrow-btn:hover {
        background: #f5f5f5;
    }

    .toolbar-split-btn .arrow-btn.primary {
        background: #5a2fd9;
        color: white;
        border-color: #713eff;
        border-left-color: rgba(255,255,255,0.3);
    }

    .toolbar-split-btn .arrow-btn.primary:hover {
        background: #4a1fc9;
    }

    .status-indicator {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border-radius: 4px;
        background: #f5f5f5;
        font-size: 13px;
    }

    .status-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #999;
    }

    .status-dot.idle { background: #999; }
    .status-dot.running { background: #52c41a; animation: pulse 1.5s infinite; }
    .status-dot.error { background: #ff4d4f; }
    .status-dot.debugging { background: #1890ff; animation: pulse 1.5s infinite; }

    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.5; }
    }

    /* G-C-001: 边诊断徽章 */
    .edge-diagnostic-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 10px;
        border: 1px solid #faad14;
        border-radius: 12px;
        background: #fff7e6;
        color: #d48806;
        font-size: 13px;
        cursor: pointer;
        transition: background 0.2s;
        flex-shrink: 0;
    }
    .edge-diagnostic-badge:hover {
        background: #fff1b8;
    }
    @keyframes badgeAppear {
        from { opacity: 0; transform: scale(0.8); }
        to { opacity: 1; transform: scale(1); }
    }
    .edge-diagnostic-badge.animate-in {
        animation: badgeAppear 0.3s ease-out;
    }

    /* 主内容区域（三列布局） */
    .lab-main-content {
        display: flex;
        flex: 1;
        overflow: hidden;
        position: relative;
    }

    /* 智能体下拉菜单容器 */
    .agent-dropdown-container {
        position: absolute;
        left: 20px;
        top: 20px;
        z-index: 10000;
    }
    
    /* 智能体下拉菜单按钮 */
    .agent-dropdown-btn {
        position: relative;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        min-width: 120px;
        background: linear-gradient(135deg, #713eff 0%, #5a2fd9 100%);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        color: white;
        box-shadow: 0 2px 8px rgba(113, 62, 255, 0.3);
        transition: all 0.2s;
        z-index: 101;
        white-space: nowrap;
    }
    
    .agent-dropdown-btn:hover {
        background: #5a2fd9;
        border-color: #5a2fd9;
        box-shadow: 0 4px 12px rgba(113, 62, 255, 0.4);
        transform: translateY(-1px);
    }
    
    .agent-dropdown-btn.active {
        background: #5a2fd9;
        color: white;
        border-color: #5a2fd9;
        box-shadow: 0 4px 16px rgba(113, 62, 255, 0.5);
    }
    
    .agent-dropdown-icon {
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .agent-dropdown-text {
        font-size: 14px;
        flex: 1;
        text-align: left;
        white-space: nowrap;
    }
    
    .agent-dropdown-arrow {
        font-size: 12px;
        transition: transform 0.2s;
        flex-shrink: 0;
    }
    
    .agent-dropdown-btn.active .agent-dropdown-arrow {
        transform: rotate(180deg);
    }
    
    /* 智能体下拉菜单 */
    .agent-dropdown-menu {
        position: absolute;
        left: 0;
        top: calc(100% + 4px);
        width: 320px;
        max-height: 80vh;  /* 使用视口高度，自适应屏幕 */
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 0 0 8px 8px;
        border-top: 2px solid #713eff;
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        overflow: visible;  /* 允许子元素（平级列表）溢出 */
        display: none;
        z-index: 10001;
        flex-direction: column;
        animation: slideDown 0.2s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .agent-dropdown-menu.show {
        display: flex;
    }
    
    /* ========== 导航面包屑 V2 样式 ========== */
    .nav-breadcrumb-block {
        padding: 12px 16px;
        min-width: 280px;
    }
    
    .nav-breadcrumb-header {
        font-size: 12px;
        color: #999;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-breadcrumb-empty {
        color: #999;
        font-size: 13px;
        padding: 8px 0;
    }
    
    .nav-breadcrumb-item {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 4px 4px !important;
        position: relative;
        border-radius: 6px;
        transition: background 0.15s;
    }
    
    .nav-breadcrumb-item:hover {
        background: #f8f8f8;
    }
    
    .nav-breadcrumb-item.current {
        background: #f5f0ff;
    }
    
    .nav-item-prefix {
        color: #d9d9d9;
        font-size: 12px;
        width: 12px;
        flex-shrink: 0;
    }
    
    .nav-item-icon {
        font-size: 16px;
        flex-shrink: 0;
    }
    
    .nav-item-text {
        font-size: 13px;
        color: #333;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-item-text.clickable {
        cursor: pointer;
    }
    
    .nav-item-text.clickable:hover {
        color: #713eff;
        text-decoration: underline;
    }
    
    .nav-item-text.current {
        color: #713eff;
        font-weight: 500;
        cursor: default;
    }
    
    .nav-dirty-mark {
        color: #ff4d4f;
        margin-left: 2px;
    }
    
    .nav-item-expand {
        cursor: pointer;
        color: #999;
        font-size: 10px;
        padding: 4px 6px;
        border-radius: 4px;
        transition: all 0.2s;
        flex-shrink: 0;
        line-height: 1;
        align-self: center;
    }
    
    .nav-item-expand:hover {
        background: #e8e8e8;
        color: #333;
    }
    
    /* 平级选项列表 - 使用fixed定位脱离文档流，防止被画布容器裁剪 */
    .nav-siblings-list {
        position: fixed;
        left: auto;
        right: 0;
        top: auto;
        margin-left: 0;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        min-width: 220px;
        max-width: 300px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        z-index: 10020;
        margin-top: 0;
    }
    
    .nav-sibling-item {
        padding: 10px 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: background 0.15s;
    }
    
    .nav-sibling-item:first-child {
        border-radius: 8px 8px 0 0;
    }
    
    .nav-sibling-item:last-child {
        border-radius: 0 0 8px 8px;
    }
    
    .nav-sibling-item:only-child {
        border-radius: 8px;
    }
    
    .nav-sibling-item:hover {
        background: #f5f5f5;
    }
    
    .nav-sibling-item.current {
        background: #f5f0ff;
        cursor: default;
    }
    
    .nav-sibling-icon {
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .nav-sibling-name {
        font-size: 13px;
        color: #333;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-sibling-item.current .nav-sibling-name {
        color: #713eff;
        font-weight: 500;
    }
    
    .nav-sibling-current-mark {
        color: #713eff;
        font-size: 12px;
        flex-shrink: 0;
    }
    
    .nav-siblings-empty {
        padding: 12px;
        text-align: center;
        color: #999;
        font-size: 13px;
    }
    /* ========== 导航面包屑 V2 样式结束 ========== */
    
    .agent-dropdown-loading {
        padding: 20px;
        text-align: center;
        color: #999;
    }
    
    .agent-dropdown-content {
        flex: 1;
        overflow-y: auto;
        padding: 8px;
        max-height: 580px;
    }
    
    /* 下拉菜单中的分类标题 */
    .agent-dropdown-section {
        margin-bottom: 12px;
    }
    
    .agent-dropdown-section-header {
        padding: 8px 12px;
        font-weight: 600;
        font-size: 13px;
        color: #595959;
        background: #fafafa;
        border-radius: 4px;
        margin-bottom: 4px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        user-select: none;
    }
    
    .agent-dropdown-section-header:hover {
        background: #f0f0f0;
    }
    
    .agent-dropdown-section-arrow {
        font-size: 10px;
        transition: transform 0.2s;
    }
    
    .agent-dropdown-section-header.expanded .agent-dropdown-section-arrow {
        transform: rotate(90deg);
    }
    
    .agent-dropdown-section-content {
        display: none;
        padding-left: 8px;
    }
    
    .agent-dropdown-section-header.expanded + .agent-dropdown-section-content {
        display: block;
    }
    
    /* 下拉菜单中的节点项 */
    .agent-dropdown-item {
        padding: 10px 12px;
        margin: 4px 0;
        background: #fafafa;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        cursor: pointer;
        font-size: 13px;
        transition: all 0.2s;
        user-select: none;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .agent-dropdown-item:hover {
        background: #f0f0f0;
        border-color: #713eff;
        transform: translateX(2px);
    }
    
    .agent-dropdown-item:active {
        background: #e6f7ff;
        border-color: #1890ff;
    }
    
    .agent-dropdown-item-icon {
        font-size: 16px;
    }
    
    .agent-dropdown-item-text {
        flex: 1;
    }

    .sidebar-section {
        border-bottom: 1px solid #f0f0f0;
    }

    .sidebar-header {
        padding: 12px 16px;
        font-weight: 600;
        font-size: 14px;
        color: #262626;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        user-select: none;
    }

    .sidebar-header:hover {
        background: #fafafa;
    }

    .sidebar-content {
        padding: 8px;
        display: none;
    }

    .sidebar-content.expanded {
        display: block;
    }

    /* 侧边栏分组标签 */
    .import-subgroup {
        margin: 8px 0 4px 0;
        padding: 4px 8px;
    }

    .import-subgroup .subgroup-label {
        font-size: 11px;
        font-weight: 600;
        color: #8c8c8c;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .import-subgroup:first-child {
        margin-top: 0;
    }

    .asset-node {
        padding: 10px 12px;
        margin: 4px 0;
        background: #fafafa;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        cursor: grab;
        font-size: 13px;
        transition: all 0.2s;
        user-select: none;
    }

    .asset-node:hover {
        background: #f0f0f0;
        border-color: #713eff;
        transform: translateX(2px);
    }

    .asset-node:active {
        cursor: grabbing;
    }

    .asset-node-icon {
        display: inline-block;
        width: 16px;
        height: 16px;
        margin-right: 8px;
        vertical-align: middle;
    }

    /* 中央画布区域 */
    .canvas-container {
        flex: 1;
        position: relative;
        background: #fafafa;
        overflow: hidden;
    }
    
    /* 画布背景水印层 */
    .canvas-watermark-layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        pointer-events: none;
        user-select: none;
        overflow: hidden;
    }
    
    /* 画布背景水印：仅用下方 .canvas-watermark-logo 内联 SVG（避免再请求 /static/images/zensign-logo.svg） */
    .canvas-watermark-logo {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 700px;
        height: 170px;
        opacity: 0.12;
        pointer-events: none;
        user-select: none;
        z-index: 0;
    }
    
    .canvas-watermark-logo svg {
        width: 100%;
        height: 100%;
    }
    
    /* 画布背景层级提示文本 - 横排 */
    .canvas-watermark-layer::after {
        content: attr(data-canvas-level);
        position: absolute;
        top: 26%;
        left: 50%;
        transform: translateX(-50%);
        font-size: 72px;
        font-weight: 300;
        color: rgba(0, 0, 0, 0.06);
        white-space: nowrap;
        letter-spacing: 8px;
    }
    
    /* 画布版权信息 */
    .canvas-watermark-copyright {
        position: absolute;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 13px;
        color: rgba(0, 0, 0, 0.3);
        z-index: 2;
        pointer-events: none;
        user-select: none;
        white-space: nowrap;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
        font-weight: 400;
        letter-spacing: 0.5px;
    }

    /* 节点加载提示 */
    .node-loading-indicator {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1000;
        pointer-events: none;
        animation: fadeIn 0.3s ease-in;
    }

    .node-loading-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        background: rgba(255, 255, 255, 0.95);
        padding: 32px 48px;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(113, 62, 255, 0.2);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(113, 62, 255, 0.1);
    }

    .node-loading-spinner {
        width: 48px;
        height: 48px;
        border: 4px solid rgba(113, 62, 255, 0.1);
        border-top-color: #713eff;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    .node-loading-text {
        text-align: center;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
        color: #333;
        line-height: 1.6;
    }

    .node-loading-text div:first-child {
        font-size: 16px;
        font-weight: 500;
        color: #713eff;
        margin-bottom: 4px;
    }

    .node-loading-text div:last-child {
        font-size: 14px;
        color: #666;
        font-weight: 400;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.9);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }

    .node-loading-indicator.fade-out {
        animation: fadeOut 0.3s ease-out forwards;
    }

    @keyframes fadeOut {
        from {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
        to {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.9);
        }
    }

    /* 画布内导航控件（返回按钮和面包屑） */
    .canvas-navigation {
        position: absolute;
        top: 16px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 5;
        display: flex;
        align-items: center;
        gap: 8px;
        background: white;
        padding: 6px 12px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        flex-wrap: nowrap;
        -webkit-user-select: none;
        user-select: none;
    }

    /* 封死面包屑整条导航栏文本选取 — ID+通配 三层保险 */
    #canvas-navigation,
    #canvas-navigation *,
    #canvas-breadcrumb,
    #canvas-breadcrumb * {
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        user-select: none !important;
    }
    
    /* 画布右上角下拉菜单容器 */
    .canvas-top-right-dropdowns {
        position: absolute;
        top: 16px;
        right: 20px;
        display: flex;
        align-items: center;
        gap: 8px;
        z-index: 5;
    }
    
    /* 画布右上角下拉菜单容器（单个） */
    .canvas-top-right-dropdown-container {
        position: relative;
    }
    
    /* 画布右上角下拉菜单按钮 */
    .canvas-top-right-dropdown-btn {
        height: 36px !important;       /* ADR-0203: 与 .toolbar-btn 统一（冗余防御） */
        min-height: 36px !important;   /* ADR-0206: 防止外部 min-height 覆盖 */
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: linear-gradient(135deg, #713eff 0%, #5a2fd9 100%);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        color: white;
        transition: all 0.2s;
        white-space: nowrap;
    }
    
    .canvas-top-right-dropdown-btn:hover {
        background: linear-gradient(135deg, #5a2fd9 0%, #4a1fc9 100%);
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(113, 62, 255, 0.3);
    }
    
    .canvas-top-right-dropdown-btn.active {
        background: linear-gradient(135deg, #5a2fd9 0%, #4a1fc9 100%);
        box-shadow: 0 2px 6px rgba(113, 62, 255, 0.4);
    }
    
    .canvas-top-right-dropdown-icon {
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .canvas-top-right-dropdown-text {
        font-size: 13px;
        flex-shrink: 0;
    }
    
    .canvas-top-right-dropdown-arrow {
        font-size: 10px;
        transition: transform 0.2s;
        flex-shrink: 0;
    }
    
    .canvas-top-right-dropdown-btn.active .canvas-top-right-dropdown-arrow {
        transform: rotate(180deg);
    }
    
    /* 画布右上角下拉菜单 */
    .canvas-top-right-dropdown-menu {
        position: absolute;
        top: calc(100% + 4px);
        right: 0;
        width: 320px;
        max-height: 500px;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 0 0 8px 8px;
        border-top: 2px solid #713eff;
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        overflow: hidden;
        display: none;
        z-index: 1000;
        flex-direction: column;
        animation: slideDown 0.2s ease-out;
    }
    
    .canvas-top-right-dropdown-menu.show {
        display: flex;
    }
    
    .canvas-top-right-dropdown-content {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        max-height: 480px;
    }
    
    .canvas-top-right-dropdown-content .dropdown-item:hover {
        background: #f0f0ff;
    }

    .canvas-back-btn {
        display: none;
        align-items: center;
        gap: 4px;
        padding: 6px 12px;
        background: linear-gradient(135deg, #713eff 0%, #5a2fd9 100%);
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        transition: all 0.2s;
    }

    .canvas-back-btn:hover {
        background: linear-gradient(135deg, #5a2fd9 0%, #4a1fc9 100%);
        transform: translateX(-2px);
    }

    .canvas-back-btn.visible {
        display: flex;
    }

    .canvas-breadcrumb-inline {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 13px;
        padding: 4px 10px;
        background: linear-gradient(135deg, #713eff 0%, #5a2fd9 100%);
        border-radius: 6px;
        color: white;
    }

    .canvas-breadcrumb-inline .breadcrumb-item {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
        padding: 2px 6px;
        border-radius: 4px;
        transition: all 0.2s;
    }

    .canvas-breadcrumb-inline .breadcrumb-item.clickable {
        cursor: pointer;
        opacity: 0.85;
    }

    .canvas-breadcrumb-inline .breadcrumb-item.clickable:hover {
        background: rgba(255, 255, 255, 0.2);
        opacity: 1;
    }

    .canvas-breadcrumb-inline .breadcrumb-item.current {
        font-weight: 600;
        background: rgba(255, 255, 255, 0.15);
    }

    .canvas-breadcrumb-inline .breadcrumb-separator {
        color: rgba(255, 255, 255, 0.6);
        font-weight: bold;
        margin: 0 2px;
    }

    .canvas-breadcrumb-inline .dirty-mark {
        color: #ffd666;
        font-weight: bold;
        margin-left: 2px;
    }

    /* 增强版面包屑（带展开按钮和平级切换） */
    .canvas-breadcrumb-enhanced {
        display: flex;
        align-items: center;
        gap: 2px;
        font-size: 13px;
        padding: 4px 8px;
        background: linear-gradient(135deg, #713eff 0%, #5a2fd9 100%);
        border-radius: 6px;
        color: white;
        flex: 1;
        min-width: 0;
        -webkit-user-select: none;
        user-select: none;
    }

    .breadcrumb-level {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        position: relative;
        white-space: nowrap;
    }

    .breadcrumb-level-content {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 3px 8px;
        border-radius: 4px;
        transition: all 0.2s;
    }

    .breadcrumb-level-content.clickable {
        cursor: pointer;
        opacity: 0.85;
    }

    .breadcrumb-level-content.clickable:hover {
        background: rgba(255, 255, 255, 0.2);
        opacity: 1;
    }

    .breadcrumb-level-content.current {
        font-weight: 600;
        background: rgba(255, 255, 255, 0.15);
    }

    .breadcrumb-level-icon {
        font-size: 14px;
    }

    .breadcrumb-level-name {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .breadcrumb-dirty-mark {
        color: #ffd666;
        font-weight: bold;
        margin-left: 2px;
    }

    .breadcrumb-expand-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        border-radius: 3px;
        color: white;
        cursor: pointer;
        font-size: 10px;
        transition: all 0.2s;
        margin-left: 2px;
    }

    .breadcrumb-expand-btn:hover {
        background: rgba(255, 255, 255, 0.35);
    }

    .breadcrumb-expand-btn.expanded {
        background: rgba(255, 255, 255, 0.4);
    }

    .breadcrumb-separator {
        color: rgba(255, 255, 255, 0.6);
        font-weight: bold;
        margin: 0 4px;
        font-size: 12px;
    }

    /* 面包屑平级切换下拉列表 */
    .breadcrumb-siblings-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 4px;
        min-width: 200px;
        max-width: 280px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        overflow: hidden;
        display: none;
    }

    .breadcrumb-siblings-dropdown.show {
        display: block;
    }

    .breadcrumb-siblings-list {
        max-height: 300px;
        overflow-y: auto;
        padding: 4px 0;
    }

    .breadcrumb-sibling-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        cursor: pointer;
        transition: all 0.15s;
        color: #333;
        font-size: 13px;
    }

    .breadcrumb-sibling-item:hover {
        background: #f5f5f5;
    }

    .breadcrumb-sibling-item.current {
        background: #f0e6ff;
        color: #713eff;
        font-weight: 500;
    }

    .breadcrumb-sibling-item .sibling-icon {
        font-size: 14px;
    }

    .breadcrumb-sibling-item .sibling-name {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .breadcrumb-sibling-item .sibling-check {
        color: #52c41a;
        font-size: 12px;
    }

    .breadcrumb-siblings-divider {
        height: 1px;
        background: #f0f0f0;
        margin: 4px 0;
    }

    .breadcrumb-siblings-action {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        cursor: pointer;
        transition: all 0.15s;
        color: #713eff;
        font-size: 13px;
    }

    .breadcrumb-siblings-action:hover {
        background: #f0e6ff;
    }

    /* 流水线右键菜单 */
    .pipeline-context-menu {
        position: fixed;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        z-index: 10010;
        min-width: 120px;
        padding: 4px 0;
        display: none;
    }

    .pipeline-context-menu.show {
        display: block;
    }

    .pipeline-context-menu-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        cursor: pointer;
        font-size: 13px;
        color: #333;
        transition: all 0.15s;
    }

    .pipeline-context-menu-item:hover {
        background: #f5f5f5;
    }

    .pipeline-context-menu-item.danger {
        color: #ff4d4f;
    }

    .pipeline-context-menu-item.danger:hover {
        background: #fff1f0;
    }

    /* 居中弹窗遮罩 */
    .center-dialog-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 10020;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .center-dialog {
        background: white;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        min-width: 360px;
        max-width: 480px;
        padding: 24px;
        animation: dialogFadeIn 0.2s ease-out;
    }

    @keyframes dialogFadeIn {
        from {
            opacity: 0;
            transform: scale(0.95) translateY(-10px);
        }
        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

    .center-dialog-title {
        font-size: 16px;
        font-weight: 600;
        color: #333;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .center-dialog-content {
        margin-bottom: 20px;
    }

    .center-dialog-input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #d9d9d9;
        border-radius: 6px;
        font-size: 14px;
        box-sizing: border-box;
        transition: border-color 0.2s;
    }

    .center-dialog-input:focus {
        outline: none;
        border-color: #713eff;
        box-shadow: 0 0 0 2px rgba(113, 62, 255, 0.1);
    }

    .center-dialog-buttons {
        display: flex;
        justify-content: flex-end;
        gap: 12px;
    }

    .center-dialog-btn {
        padding: 8px 20px;
        border-radius: 6px;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .center-dialog-btn.cancel {
        background: #f5f5f5;
        border: 1px solid #d9d9d9;
        color: #666;
    }

    .center-dialog-btn.cancel:hover {
        background: #e8e8e8;
    }

    .center-dialog-btn.confirm {
        background: #713eff;
        border: 1px solid #713eff;
        color: white;
    }

    .center-dialog-btn.confirm:hover {
        background: #5a2ecc;
    }

    .center-dialog-btn.danger {
        background: #ff4d4f;
        border: 1px solid #ff4d4f;
        color: white;
    }

    .center-dialog-btn.danger:hover {
        background: #d9363e;
    }

    /* 快捷保存按钮 — 高度统一规范 (ADR-0203) */
    .canvas-save-btn {
        height: 36px !important;           /* 与 .toolbar-btn 保持一致 */
        min-height: 36px !important;       /* ADR-0206: 防止外部 min-height 覆盖 */
        line-height: 24px;                 /* 文本垂直居中 */
        box-sizing: border-box;
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #52c41a;
        border-radius: 6px;
        cursor: pointer;
        font-size: 13px;
        color: #52c41a;
        transition: all 0.2s;
        margin-left: 8px;
    }

    .canvas-save-btn:hover {
        background: #52c41a;
        color: white;
        border-color: #52c41a;
    }

    /* 刷新配置按钮 — 高度统一规范 (ADR-0203) + ADR-0206 min-height 防御 */
    .canvas-refresh-btn {
        height: 36px !important;           /* 与 .toolbar-btn 保持一致 */
        min-height: 36px !important;       /* ADR-0206: 防止外部 min-height 覆盖 */
        line-height: 24px;                 /* 文本垂直居中 */
        box-sizing: border-box;
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #d9d9d9;
        border-radius: 6px;
        cursor: pointer;
        font-size: 13px;
        color: #666;
        transition: all 0.2s;
        margin-left: 8px;
    }

    .canvas-refresh-btn:hover {
        background: #713eff;
        color: white;
        border-color: #713eff;
    }

    .canvas-grid-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;                       /* ADR-0203: 与工具栏按钮保持一致 */
        height: 36px !important;           /* ADR-0203: 与工具栏按钮保持一致 */
        min-height: 36px !important;       /* ADR-0206: 防止外部 min-height 覆盖 */
        line-height: 24px;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.2s;
        margin-left: 8px;
    }

    .canvas-grid-btn:hover {
        background: #f0f0f0;
        border-color: #713eff;
    }

    .canvas-grid-btn.active {
        background: #713eff;
        color: white;
        border-color: #713eff;
    }

    #react-flow-container {
        width: 100%;
        height: 100%;
        position: relative;
        z-index: 1;
    }
    
    /* 画布浮动控制按钮 - 位于画布正下方，与底边保持距离 */
    .canvas-floating-controls {
        position: absolute;
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        display: flex;
        flex-direction: row;
        gap: 8px;
        background: white;
        padding: 8px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .canvas-floating-dropdown {
        position: relative;
        display: flex;
    }
    
    .canvas-floating-btn {
        padding: 8px 16px;
        border: 1px solid #d9d9d9;
        border-radius: 6px;
        background: white;
        cursor: pointer;
        font-size: 13px;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }
    
    .canvas-floating-btn:hover {
        background: #f5f5f5;
        border-color: #713eff;
    }
    
    .canvas-floating-btn.primary {
        background: #713eff;
        color: white;
        border-color: #713eff;
    }
    
    .canvas-floating-btn.primary:hover {
        background: #5a2fd9;
    }
    
    .canvas-floating-btn.danger {
        background: #ff4d4f;
        color: white;
        border-color: #ff4d4f;
    }
    
    .canvas-floating-btn.danger:hover {
        background: #d9363e;
    }
    
    .canvas-floating-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
    
    .canvas-floating-arrow-btn {
        padding: 8px 8px;
        border: 1px solid #713eff;
        border-left: none;
        border-radius: 0 6px 6px 0;
        background: #5a2fd9;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        transition: all 0.2s;
    }
    
    .canvas-floating-arrow-btn:hover {
        background: #4a1fc9;
    }
    
    .canvas-floating-dropdown-menu {
        position: absolute;
        bottom: 100%;
        right: 0;
        margin-bottom: 4px;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        min-width: 180px;
        z-index: 1000;
        display: none;
        overflow: hidden;
    }
    
    .canvas-floating-dropdown.open .canvas-floating-dropdown-menu {
        display: block;
        animation: dropdownFadeIn 0.15s ease-out;
    }

    /* React Flow Controls 样式覆盖 - 确保不被浏览器缩放裁切 */
    .react-flow__controls {
        position: absolute !important;
        left: 16px !important;
        bottom: max(24px, 3vh) !important;
        top: auto !important;
        z-index: 5;
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: white;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        padding: 4px;
    }

    .react-flow__controls-button {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: transparent;
        cursor: pointer;
        border-radius: 4px;
        transition: background 0.2s;
    }

    .react-flow__controls-button:hover {
        background: #f0f0f0;
    }

    .react-flow__controls-button svg {
        width: 16px;
        height: 16px;
        fill: #666;
    }

    /* React Flow MiniMap 样式覆盖 - 确保不被浏览器缩放裁切 */
    .react-flow__minimap {
        position: absolute !important;
        right: 16px !important;
        bottom: max(24px, 3vh) !important;
        top: auto !important;
        z-index: 5;
        background: white;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        overflow: hidden;
        /* 限制最大尺寸以适应小屏幕 */
        max-width: min(200px, 25vw);
        max-height: min(150px, 20vh);
    }

    .react-flow__minimap svg {
        width: 100%;
        height: 100%;
    }

    /* 确保画布容器有正确的 overflow 处理 */
    .canvas-container {
        position: relative;
        overflow: hidden;
    }

    /* 响应式调整 - 小屏幕或高缩放比时 */
    @media screen and (max-height: 600px) {
        .react-flow__controls {
            bottom: 12px !important;
            padding: 2px;
        }
        
        .react-flow__controls-button {
            width: 24px;
            height: 24px;
        }
        
        .react-flow__minimap {
            bottom: 12px !important;
            max-width: 150px;
            max-height: 100px;
        }
    }

    @media screen and (max-height: 400px) {
        .react-flow__minimap {
            display: none; /* 极小高度时隐藏小地图 */
        }
    }

    /* 右侧下拉菜单容器 */
    .right-dropdowns-container {
        position: absolute;
        right: 20px;
        top: 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        z-index: 100;
        align-items: flex-end;
        min-width: 140px;
    }
    
    /* 右侧下拉菜单容器（单个） */
    .right-dropdown-container {
        position: relative;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
    
    /* 右侧下拉菜单按钮 */
    .right-dropdown-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 20px;
        min-width: 140px;
        width: 100%;
        background: #713eff;
        border: 1px solid #713eff;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        color: white;
        box-shadow: 0 2px 8px rgba(113, 62, 255, 0.3);
        transition: all 0.2s;
        white-space: nowrap;
        justify-content: space-between;
    }
    
    .right-dropdown-btn:hover {
        background: #5a2fd9;
        border-color: #5a2fd9;
        box-shadow: 0 4px 12px rgba(113, 62, 255, 0.4);
        transform: translateY(-1px);
    }
    
    .right-dropdown-btn.active {
        background: #5a2fd9;
        color: white;
        border-color: #5a2fd9;
        box-shadow: 0 4px 16px rgba(113, 62, 255, 0.5);
    }
    
    .right-dropdown-icon {
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .right-dropdown-text {
        font-size: 14px;
        flex: 1;
        text-align: left;
        white-space: nowrap;
    }
    
    .right-dropdown-arrow {
        font-size: 12px;
        transition: transform 0.2s;
        flex-shrink: 0;
    }
    
    .right-dropdown-btn.active .right-dropdown-arrow {
        transform: rotate(180deg);
    }
    
    /* 右侧下拉菜单 */
    .right-dropdown-menu {
        position: absolute;
        right: 0;
        top: calc(100% + 4px);
        width: 320px;
        max-height: 500px;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 0 0 8px 8px;
        border-top: 2px solid #713eff;
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        overflow: hidden;
        display: none;
        z-index: 99;
        flex-direction: column;
        animation: slideDown 0.2s ease-out;
    }
    
    .right-dropdown-menu.show {
        display: flex;
    }
    
    .right-dropdown-content {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        max-height: 480px;
    }
    
    .right-dropdown-content .dropdown-item:hover {
        background: #f0f0ff;
    }

    .config-panel-section {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .config-panel-section-header {
        padding: 12px 16px;
        font-weight: 600;
        font-size: 14px;
        color: #262626;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        user-select: none;
        transition: background 0.2s;
    }
    
    .config-panel-section-header:hover {
        background: #fafafa;
    }
    
    .config-panel-section-content {
        padding: 8px;
        display: none;
        overflow: hidden;
    }
    
    .config-panel-section-content.expanded {
        display: block;
    }

    .config-panel-header {
        padding: 12px 16px;
        border-bottom: 1px solid #e0e0e0;
        font-weight: 600;
        font-size: 14px;
        color: #262626;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        user-select: none;
        transition: background 0.2s;
        margin: 0;
        flex-shrink: 0;
    }
    
    .config-panel-header:hover {
        background: #fafafa;
    }
    
    .config-panel-header-arrow {
        transition: transform 0.2s;
    }
    
    .config-panel-header.expanded .config-panel-header-arrow {
        transform: rotate(90deg);
    }

    .config-panel-content {
        padding: 0 !important;
        margin: 0 !important;
        flex: 0 0 0 !important;
        display: none !important;
        overflow: hidden;
        max-height: 0 !important;
        opacity: 0;
        height: 0 !important;
        min-height: 0 !important;
        transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease, height 0.3s ease;
    }
    
    .config-panel-content.expanded {
        display: block !important;
        padding: 16px !important;
        margin: 0 !important;
        flex: 1 !important;
        max-height: 1000px !important;
        height: auto !important;
        opacity: 1;
        overflow-y: auto;
    }
    
    /* 配置面板可折叠区块 */
    .config-panel-section {
        border-bottom: 1px solid #e0e0e0;
    }
    
    .config-panel-section-header {
        padding: 12px 16px;
        font-weight: 600;
        font-size: 14px;
        color: #262626;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: background 0.2s;
    }
    
    .config-panel-section-header:hover {
        background: #f5f5f5;
    }
    
    .config-panel-section-content {
        padding: 8px 12px 12px;
        background: #fafafa;
    }
    
    /* 模板项样式 */
    .template-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s;
        margin-bottom: 6px;
        background: white;
        border: 1px solid #e8e8e8;
    }
    
    .template-item:hover {
        background: #f0f0ff;
        border-color: #713eff;
    }
    
    .template-item:last-child {
        margin-bottom: 0;
    }
    
    .template-icon {
        font-size: 20px;
        line-height: 1;
    }
    
    .template-info {
        flex: 1;
        min-width: 0;
    }
    
    .template-name {
        display: block;
        font-size: 13px;
        font-weight: 500;
        color: #333;
        margin-bottom: 2px;
    }
    
    .template-desc {
        display: block;
        font-size: 11px;
        color: #999;
        line-height: 1.3;
    }

    .config-form-group {
        margin-bottom: 20px;
    }

    .config-form-label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        font-size: 14px;
        color: #262626;
    }

    .config-form-input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        font-size: 14px;
        box-sizing: border-box;
    }

    .config-form-input:focus {
        outline: none;
        border-color: #713eff;
        box-shadow: 0 0 0 2px rgba(113, 62, 255, 0.1);
    }

    .config-form-textarea {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        font-size: 14px;
        font-family: 'Courier New', monospace;
        resize: vertical;
        min-height: 120px;
        box-sizing: border-box;
    }

    .config-form-slider {
        width: 100%;
    }

    .config-form-slider-value {
        display: inline-block;
        margin-left: 8px;
        font-weight: 600;
        color: #713eff;
    }

    .empty-state {
        text-align: center;
        padding: 40px 20px;
        color: #999;
    }

    .empty-state-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }

    /* 自定义节点样式 — 所有 wrapper 层级通用重置 */
    .react-flow__node {
        border-radius: 8px;
        padding: 0 !important;      /* 覆盖 React Flow CDN 的 padding: 10px */
        font-size: 12px;
        width: auto !important;     /* 覆盖 React Flow CDN 的 width: 150px */
        background: transparent !important;  /* 覆盖 CDN background-color: white */
        border: none !important;    /* 覆盖 CDN border */
        box-shadow: none !important;
    }

    /* react-flow__node-default: 彻底覆盖 React Flow CDN v11.11.4 的默认节点样式
       CDN 原始样式: padding:10px; border-radius:3px; width:150px; border:1px solid #1a192b; background-color:white;
       本项目所有节点（含 default fallback）均由 CustomNodeWithPins 内部 inline style 控制外观 */
    .react-flow__node-default,
    .react-flow__node-input,
    .react-flow__node-output {
        padding: 0 !important;
        width: auto !important;
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        transition: all 0.3s ease;
    }

    /* 选中态：wrapper 不加边框，由内部组件 inline style 控制 */
    .react-flow__node.selected,
    .react-flow__node-default.selectable.selected,
    .react-flow__node-default.selectable:focus,
    .react-flow__node-default.selectable:focus-visible {
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
    }
    
    /* hover 态也清除 CDN 默认 box-shadow */
    .react-flow__node-default.selectable:hover,
    .react-flow__node-input.selectable:hover,
    .react-flow__node-output.selectable:hover {
        box-shadow: none !important;
    }
    
    /* 节点执行状态样式（ComfyUI风格） */
    .react-flow__node[data-execution-status="pending"] {
        border-color: #d9d9d9;
        background: #fafafa;
    }
    
    .react-flow__node[data-execution-status="running"] {
        border-color: #1890ff;
        background: #e6f7ff;
        animation: nodeRunningPulse 1.5s ease-in-out infinite;
        box-shadow: 0 0 8px rgba(24, 144, 255, 0.4);
    }
    
    .react-flow__node[data-execution-status="success"] {
        border-color: #52c41a;
        background: #f6ffed;
    }
    
    .react-flow__node[data-execution-status="error"] {
        border-color: #ff4d4f;
        background: #fff2f0;
    }
    
    .react-flow__node[data-execution-status="paused"] {
        border-color: #faad14;
        background: #fffbe6;
    }

    .react-flow__node[data-execution-status="skipped"] {
        border-color: #bfbfbf;
        background: #f5f5f5;
        border-style: dashed;
        opacity: 0.65;
    }
    
    @keyframes nodeRunningPulse {
        0%, 100% {
            box-shadow: 0 0 8px rgba(24, 144, 255, 0.4);
        }
        50% {
            box-shadow: 0 0 16px rgba(24, 144, 255, 0.6);
        }
    }
    
    /* 节点状态指示器（左上角小圆点） */
    .node-status-indicator {
        position: absolute;
        top: 4px;
        left: 4px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        border: 2px solid white;
        z-index: 10;
    }
    
    .node-status-indicator.pending {
        background: #d9d9d9;
    }
    
    .node-status-indicator.running {
        background: #1890ff;
        animation: statusPulse 1s ease-in-out infinite;
    }
    
    .node-status-indicator.success {
        background: #52c41a;
    }
    
    .node-status-indicator.error {
        background: #ff4d4f;
    }
    
    .node-status-indicator.paused {
        background: #faad14;
    }

    .node-status-indicator.skipped {
        background: #bfbfbf;
    }
    
    @keyframes statusPulse {
        0%, 100% {
            opacity: 1;
            transform: scale(1);
        }
        50% {
            opacity: 0.7;
            transform: scale(1.2);
        }
    }
    
    /* 节点进度条（执行中时显示） */
    .node-progress-bar {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: rgba(24, 144, 255, 0.2);
        border-radius: 0 0 8px 8px;
        overflow: hidden;
    }
    
    .node-progress-bar-fill {
        height: 100%;
        background: linear-gradient(90deg, #1890ff, #40a9ff);
        animation: progressMove 2s linear infinite;
        width: 60%;
    }
    
    @keyframes progressMove {
        0% {
            transform: translateX(-100%);
        }
        100% {
            transform: translateX(200%);
        }
    }
    
    /* 智能体节点分组框样式 */
    .agent-node-group {
        position: absolute;
        border: 2px dashed rgba(113, 62, 255, 0.4);
        background: rgba(113, 62, 255, 0.03);
        border-radius: 12px;
        pointer-events: none;
        z-index: -1;
        transition: all 0.3s ease;
    }
    
    .agent-node-group:hover {
        border-color: rgba(113, 62, 255, 0.6);
        background: rgba(113, 62, 255, 0.05);
    }
    
    .agent-node-group-label {
        position: absolute;
        top: -12px;
        left: 12px;
        background: white;
        padding: 2px 8px;
        font-size: 11px;
        color: #713eff;
        font-weight: 500;
        border-radius: 4px;
        border: 1px solid rgba(113, 62, 255, 0.3);
    }
    

/* ── 右键菜单 (context menu) ── W44-CSS-FIX */
.canvas-context-menu,
.node-context-menu,
.edge-context-menu,
.pin-context-menu {
  position: fixed;
  z-index: 1000;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 4px 0;
  min-width: 160px;
  max-width: 280px;
  overflow: visible; /* 必须 visible，子菜单才能向右弹出 */
  font-size: 13px;
  color: #333;
  user-select: none;
}

.canvas-context-menu .context-menu-item,
.node-context-menu .context-menu-item,
.edge-context-menu .context-menu-item,
.pin-context-menu .context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.canvas-context-menu .context-menu-item:hover,
.node-context-menu .context-menu-item:hover,
.edge-context-menu .context-menu-item:hover,
.pin-context-menu .context-menu-item:hover {
  background: #f5f5f5;
}

.canvas-context-menu .context-menu-separator,
.node-context-menu .context-menu-separator,
.edge-context-menu .context-menu-separator {
  height: 1px;
  background: #f0f0f0;
  margin: 4px 0;
}

.canvas-context-menu .context-menu-section-title,
.node-context-menu .context-menu-section-title {
  padding: 4px 16px 2px;
  font-size: 11px;
  color: #999;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* flat-context-menu 布局 */
.flat-context-menu {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.flat-context-menu-section {
  padding: 0;
}

/* ── flat-menu 内部样式 (W44-CSS-FIX-2) ── */

/* 菜单列表容器：portal 方案下子菜单挂 body，此处可安全滚动 */
.flat-context-menu {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: none;
  overflow-y: visible;
}

/* 分隔线 */
.flat-menu-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 4px 0;
}

/* 每个菜单项 */
.flat-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  color: #262626;
  position: relative;
  transition: background 0.12s;
  user-select: none;
  border-radius: 4px;
  margin: 1px 4px;
}

.flat-menu-item:hover {
  background: #f0f0ff;
  color: #6b3aed;
}

.flat-menu-item.disabled {
  color: #bfbfbf;
  cursor: not-allowed;
  pointer-events: none;
}

.flat-menu-item.danger {
  color: #cf1322;
}

.flat-menu-item.danger:hover {
  background: #fff1f0;
  color: #a8071a;
}

/* 图标 */
.menu-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
}

/* 文字 */
.menu-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 子菜单箭头 */
.menu-arrow {
  margin-left: auto;
  font-size: 9px;
  color: #8c8c8c;
  flex-shrink: 0;
  padding-left: 8px;
  transition: color 0.12s;
}

.flat-menu-item:hover .menu-arrow {
  color: #6b3aed;
}

/* L2 面板展开时父项激活态（click 触发，非 hover 浮条） */
.flat-menu-item.has-submenu:has(.flat-submenu.show) {
  background: #f0f0ff;
  color: #6b3aed;
}
.flat-menu-item.has-submenu:has(.flat-submenu.show) .menu-arrow {
  color: #6b3aed;
  transform: rotate(90deg);
}

/* 子菜单容器：portal 模式，挂 document.body，position:fixed 由 JS 坐标定位 */
.flat-submenu {
  display: none;
  position: fixed;
  min-width: 180px;
  max-width: 280px;
  max-height: none;
  overflow-y: visible;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  padding: 4px 0;
  z-index: 10020;
  list-style: none;
}

.flat-submenu.show {
  display: block;
}

/* 子菜单项 */
.flat-submenu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  color: #262626;
  position: relative;
  transition: background 0.12s;
  user-select: none;
  border-radius: 4px;
  margin: 1px 4px;
}

.flat-submenu-item:hover {
  background: #f0f0ff;
  color: #6b3aed;
}

.flat-submenu-item.disabled {
  color: #bfbfbf;
  cursor: not-allowed;
  pointer-events: none;
}

.flat-submenu-item.danger {
  color: #cf1322;
}

.flat-submenu-item.danger:hover {
  background: #fff1f0;
  color: #a8071a;
}

/* 节点/连线菜单头部 */
.node-context-menu-header {
  padding: 8px 16px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #8c8c8c;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-context-menu-content {
  padding: 0;
}

/* 当前激活的子菜单入口高亮 */
.flat-menu-item.submenu-open {
  background: #f0f0ff;
  color: #6b3aed;
}

/* 平铺分组标题（替代 hover 子菜单，直接在菜单内展示分区名） */
.flat-menu-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 3px;
  font-size: 11px;
  font-weight: 700;
  color: #8c8c8c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
  user-select: none;
  margin-top: 4px;
}
.flat-menu-section-title .menu-icon {
  font-size: 12px;
  width: 16px;
}

/* 滚动条美化 */
.canvas-context-menu::-webkit-scrollbar,
.flat-submenu::-webkit-scrollbar {
  width: 4px;
}
.canvas-context-menu::-webkit-scrollbar-thumb,
.flat-submenu::-webkit-scrollbar-thumb {
  background: #d9d9d9;
  border-radius: 2px;
}

/* Phase 6–7 轮询列表 / API 视频节点（与 custom-node polling-list-node、冒烟 test_css_styles 对齐） */
.polling-list-node {
  min-width: 400px;
}

.polling-list-node .node-content {
  padding: 8px;
}

.polling-task-list {
  font-size: 11px;
  border-collapse: collapse;
  width: 100%;
}

.polling-task-list th {
  background: rgba(114, 46, 209, 0.1);
  padding: 4px 6px;
  text-align: left;
  font-weight: 500;
  border-bottom: 1px solid rgba(114, 46, 209, 0.2);
}

.polling-task-list td {
  padding: 4px 6px;
  border-bottom: 1px solid #f0f0f0;
}

.api-video-node .progress-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0;
}

@keyframes pollPulse {
  0% { box-shadow: 0 0 0 0 rgba(24, 144, 255, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(24, 144, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(24, 144, 255, 0); }
}

/* ========== execution-progress-hud（与 src/features/execution/execution-progress-hud.css 保持同步）==========
   顶距：约 = 全局顶栏(64) + sub-nav(~48) + 画布工具栏(~54) + 画布内「自动布局」行(16+~44) + 间隙 — 避免被工具栏 z-index 压住 */
.execution-progress-hud {
  position: fixed;
  top: 228px;
  right: 18px;
  z-index: 200;
  width: 320px;
  max-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #262626;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-size: 12px;
}

.execution-progress-hud.hidden {
  display: none;
}

.execution-progress-hud__header,
.execution-progress-hud__footer {
  padding: 10px 12px;
}

.execution-progress-hud__header {
  border-bottom: 1px solid #f0f0f0;
}

.execution-progress-hud__title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 600;
  color: #262626;
}

.execution-progress-hud__meta,
.execution-progress-hud__footer {
  color: #8c8c8c;
}

.execution-progress-hud__bar {
  height: 6px;
  border-radius: 999px;
  background: #f0f0f0;
  overflow: hidden;
}

.execution-progress-hud__bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #713eff 0%, #9254de 100%);
}

.execution-progress-hud__body {
  max-height: 190px;
  overflow: auto;
  padding: 8px 12px;
  background: #fafafa;
}

.execution-progress-hud__item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.execution-progress-hud__item:last-child {
  border-bottom: none;
}

.execution-progress-hud__step {
  color: #713eff;
  font-weight: 700;
}

.execution-progress-hud__node {
  font-weight: 600;
  color: #262626;
}

.execution-progress-hud__msg,
.execution-progress-hud__sub {
  color: #595959;
  margin-top: 2px;
}

.execution-progress-hud__status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  white-space: nowrap;
}

.execution-progress-hud__status.running {
  color: #1890ff;
  background: #e6f7ff;
  border-color: #91d5ff;
}

.execution-progress-hud__status.success {
  color: #52c41a;
  background: #f6ffed;
  border-color: #b7eb8f;
}

.execution-progress-hud__status.partial,
.execution-progress-hud__status.error {
  color: #ff4d4f;
  background: #fff2f0;
  border-color: #ffccc7;
}

.execution-progress-hud__status.paused {
  color: #d48806;
  background: #fffbe6;
  border-color: #ffe58f;
}
