    .agent-console-root {
        display: flex;
        flex-direction: row;
        height: 100%;
        overflow: hidden;
    }
    .agent-console-left {
        width: 240px;
        min-width: 200px;
        border-right: 1px solid #e8e8e8;
        background: #fafafa;
        overflow-y: auto;
        padding: 12px;
    }
    /* 主内容区：上下分割 */
    .agent-console-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    /* 上半部分：中列+右列 */
    .agent-console-top {
        display: flex;
        flex-direction: row;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
    .agent-console-mid {
        flex: 1;
        min-width: 280px;
        display: flex;
        flex-direction: column;
        overflow: auto;
        padding: 12px;
        background: #fff;
    }
    .agent-console-right {
        width: 300px;
        min-width: 260px;
        border-left: 1px solid #e8e8e8;
        background: #fafafa;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        padding: 12px;
    }
    /* 下半部分：入参设置区 */
    .agent-console-bottom {
        border-top: 1px solid #e8e8e8;
        background: #fafbfc;
        padding: 12px;
        overflow-y: auto;
        /* V06-11: 默认紧凑高度，按钮贴底；JS resize handle 用 px 控制 max-height */
        flex: 0 0 auto;
        min-height: 80px;
        max-height: 45vh;  /* §7.6: 手动拖拽后最大不超过 45% */
    }
    .params-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
    .params-section-title {
        font-size: 13px;
        font-weight: 600;
        color: #262626;
    }
    .params-section-toggle {
        font-size: 12px;
        color: #713eff;
        cursor: pointer;
        user-select: none;
    }
    .params-section-toggle:hover {
        text-decoration: underline;
    }
    .params-content {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .params-content.collapsed {
        display: none;
    }
    .params-row {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
    }
    .params-row .param-group {
        flex: 1;
        min-width: 200px;
    }
    /* A/B 入参对比 */
    .params-ab-wrap {
        display: none;
    }
    .params-ab-wrap.show {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .params-ab-side {
        border: 1px solid #e8e8e8;
        border-radius: 8px;
        padding: 12px;
        background: #fff;
    }
    .params-ab-side.side-a {
        border-color: #713eff;
    }
    .params-ab-side.side-b {
        border-color: #52c41a;
    }
    .params-ab-title {
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 10px;
        padding-bottom: 6px;
        border-bottom: 1px solid #e8e8e8;
    }
    .params-ab-title.title-a {
        color: #713eff;
    }
    .params-ab-title.title-b {
        color: #52c41a;
    }
    .param-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 8px;
    }
    .param-label {
        font-size: 12px;
        color: #595959;
        font-weight: 500;
    }
    .param-input {
        padding: 8px 10px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        font-size: 13px;
        background: #fff;
        box-sizing: border-box;
        width: 100%;
        transition: none;
    }
    select.param-input {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23595959' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        padding-right: 30px;
    }
    select.param-input option {
        background: #fff;
        color: #262626;
    }
    .param-input:focus {
        border-color: #713eff;
        outline: none;
    }
    .param-disabled {
        opacity: 0.45;
    }
    .param-disabled .param-input,
    .param-disabled .prompt-edit-btn,
    .param-disabled .btn-refresh,
    .param-disabled .image-picker-trigger,
    .param-disabled .media-select {
        background: #f5f5f5 !important;
        color: #bfbfbf !important;
        border-color: #e8e8e8 !important;
        cursor: not-allowed !important;
        pointer-events: none;
    }
    .param-disabled .param-label {
        color: #bfbfbf;
    }
    .param-textarea {
        min-height: 50px;
        resize: vertical;
        font-family: Consolas, monospace;
    }
    .params-actions {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #e8e8e8;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 24px;
        justify-content: center;
    }
    .params-actions .action-group { display: flex; gap: 8px; align-items: center; }
    .advanced-params-toggle {
        font-size: 12px;
        color: #713eff;
        cursor: pointer;
        user-select: none;
        margin-top: 8px;
    }
    .advanced-params-toggle:hover {
        text-decoration: underline;
    }
    .advanced-params {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px dashed #e0e0e0;
    }
    .advanced-params.collapsed {
        display: none;
    }
    #advanced-dynamic-params {
    }
    .thinking-indicator {
        display: none;
        align-items: center;
        gap: 4px;
        padding: 16px 12px;
        color: #8c8c8c;
        font-size: 13px;
        font-style: italic;
        justify-content: center;
    }
    .thinking-indicator.show { display: flex; }
    .thinking-dots span {
        animation: thinkingBlink 1.5s infinite;
        opacity: 0;
        font-size: 18px;
        line-height: 1;
    }
    .thinking-dots span:nth-child(1) { animation-delay: 0s; }
    .thinking-dots span:nth-child(2) { animation-delay: 0.3s; }
    .thinking-dots span:nth-child(3) { animation-delay: 0.6s; }
    @keyframes thinkingBlink {
        0%, 60%, 100% { opacity: 0; }
        30% { opacity: 1; }
    }
    .agent-list-title { font-size: 13px; font-weight: 600; color: #262626; margin-bottom: 12px; }
    .agent-list-tree { list-style: none; margin: 0; padding: 0; }
    .agent-list-tree .cluster-block { list-style: none; margin: 0 0 8px 0; }
    .agent-list-tree .cluster { 
        font-weight: 600; 
        color: #262626; 
        cursor: pointer; 
        user-select: none; 
        display: block; 
        padding: 8px 10px; 
        border-radius: 6px;
        font-size: 13px;
        background: #f0f0f0;
        margin-bottom: 4px;
    }
    .agent-list-tree .cluster:hover { background: #e8e8e8; }
    .agent-list-tree .cluster::before { content: '▼ '; font-size: 10px; color: #8c8c8c; }
    .agent-list-tree .cluster.collapsed::before { content: '▶ '; }
    .agent-list-tree .cluster.collapsed + .agent-group { display: none; }
    .agent-list-tree .agent-group { list-style: none; margin: 0; padding: 0 0 0 4px; }
    /* 智能体类型：仅作分组标题，无选中态，颜色偏灰 */
    .agent-list-tree .agent-type { 
        padding: 8px 12px;
        margin: 2px 0;
        cursor: pointer; 
        border-radius: 6px; 
        font-size: 13px; 
        color: #8c8c8c;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        border: 1px solid transparent;
        transition: all 0.15s ease;
        display: block;
        background: transparent;
        font-family: inherit;
        font-weight: 600;
    }
    .agent-list-tree .agent-type:hover { 
        background: #f5f5f5; 
        color: #595959;
        border-color: transparent;
    }
    /* 禁用状态（如剪辑合成） */
    .agent-list-tree .agent-type.disabled { 
        color: #bfbfbf;
        background: #f5f5f5;
        cursor: not-allowed;
        pointer-events: none;
    }
    .agent-list-tree .agent-type.disabled:hover { 
        background: #f5f5f5;
        color: #bfbfbf;
        border-color: transparent;
    }
    /* 左侧 Tab：集群 / 智能体 */
    .agent-console-left-tabs {
        display: flex;
        gap: 0;
        margin-bottom: 10px;
        border-bottom: 1px solid #e8e8e8;
    }
    .agent-console-workflow-crumb {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 10px;
        padding: 10px;
        border: 1px solid #ebe6ff;
        border-radius: 8px;
        background: linear-gradient(180deg, #fcfbff 0%, #f7f5ff 100%);
    }
    .workflow-crumb-label {
        font-size: 12px;
        font-weight: 600;
        color: #713eff;
    }
    .workflow-crumb-select {
        width: 100%;
        padding: 8px 10px;
        font-size: 12px;
        color: #262626;
        border: 1px solid #d9d9ff;
        border-radius: 6px;
        background: #fff;
        box-sizing: border-box;
    }
    .workflow-crumb-row {
        display: flex;
        gap: 6px;
        align-items: center;
    }
    .workflow-search-btn {
        width: 34px;
        height: 34px;
        border: 1px solid #d9d9ff;
        border-radius: 6px;
        background: #fff;
        color: #713eff;
        cursor: pointer;
        flex: 0 0 auto;
    }
    .workflow-search-btn:hover {
        background: #f5f1ff;
    }
    .workflow-search-input {
        display: none;
        width: 100%;
        padding: 7px 10px;
        font-size: 12px;
        color: #262626;
        border: 1px solid #d9d9ff;
        border-radius: 6px;
        background: #fff;
        box-sizing: border-box;
    }
    .workflow-search-input.visible {
        display: block;
    }
    .workflow-crumb-hint {
        font-size: 11px;
        color: #8c8c8c;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .media-upload-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 6px;
        margin-bottom: 4px;
        flex-wrap: wrap;
    }
    .media-selector-toolbar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 6px 0 4px 0;
        flex-wrap: nowrap;
    }
    .media-selector-main {
        flex: 1 1 auto;
        min-width: 0;
    }
    .media-upload-row-inline {
        margin: 0;
        flex: 0 0 auto;
    }
    .media-toolbar-refresh {
        flex: 0 0 auto;
    }
    .media-selector-toolbar .media-select,
    .media-selector-toolbar .image-picker-dropdown {
        width: 100%;
        margin-top: 0;
    }
    .media-shell-host {
        width: 100%;
    }
    .btn-upload-local {
        font-size: 11px;
        padding: 4px 10px;
        border: 1px solid #d9d9ff;
        border-radius: 6px;
        background: #fafafa;
        color: #713eff;
        cursor: pointer;
    }
    .btn-upload-local:hover:not(:disabled) {
        background: #f0f0ff;
    }
    .btn-upload-local:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }
    .agent-console-left-tabs .tab-btn {
        flex: 1;
        padding: 8px 10px;
        font-size: 12px;
        font-weight: 600;
        color: #8c8c8c;
        background: transparent;
        border: none;
        border-bottom: 2px solid transparent;
        cursor: pointer;
        transition: color 0.15s, border-color 0.15s;
    }
    .agent-console-left-tabs .tab-btn:hover { color: #262626; }
    .agent-console-left-tabs .tab-btn.active {
        color: #713eff;
        border-bottom-color: #713eff;
    }
    .agent-console-tab-pane { display: none; }
    .agent-console-tab-pane.active { display: block; }
    .cluster-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
    .cluster-list-header .agent-list-title { margin-bottom: 0; }
    .cluster-list-tree { list-style: none; margin: 0; padding: 0; }
    .cluster-list-tree .cluster-type-block { margin-bottom: 8px; }
    .cluster-list-tree .cluster-type-label { font-weight: 600; color: #262626; font-size: 12px; padding: 6px 8px; background: #f0f0f0; border-radius: 6px; margin-bottom: 4px; user-select: none; }
    .cluster-list-tree .cluster-preset-item { padding: 6px 10px; margin: 2px 0; cursor: pointer; border-radius: 6px; font-size: 12px; color: #595959; border: 1px solid transparent; user-select: none; list-style: none; }
    .cluster-list-tree .cluster-preset-item:hover { background: #f0f0ff; color: #713eff; border-color: #d9d9ff; }
    .cluster-list-tree .cluster-preset-item:focus { outline: none; }
    .agent-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
    .agent-list-header .agent-list-title { margin-bottom: 0; }
    /* 智能体模板：可选中，hover 高亮，选中态紫色 */
    .agent-list-tree .agent-template-item { 
        padding: 6px 10px; 
        margin: 2px 0; 
        cursor: pointer; 
        border-radius: 6px; 
        font-size: 12px; 
        color: #262626; 
        border: 1px solid transparent; 
        user-select: none; 
        list-style: none; 
        padding-left: 16px;
        background: #fafafa;
        transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    }
    .agent-list-tree .agent-template-item:hover { 
        background: linear-gradient(135deg, #e6f0ff 0%, #e8e4ff 100%); 
        color: #713eff; 
        border-color: #b8a8ff; 
        box-shadow: 0 2px 8px rgba(113, 62, 255, 0.18);
    }
    .agent-list-tree .agent-template-item.active { 
        background: linear-gradient(135deg, #f0f0ff 0%, #e6e0ff 100%); 
        color: #713eff; 
        border-color: #713eff; 
        font-weight: 500;
        box-shadow: 0 2px 6px rgba(113, 62, 255, 0.2);
    }
    .agent-list-tree .agent-template-item.disabled {
        color: #bfbfbf;
        background: #f5f5f5;
        border-color: transparent;
        cursor: not-allowed;
    }
    .agent-list-tree .agent-template-item.disabled:hover {
        color: #bfbfbf;
        background: #f5f5f5;
        border-color: transparent;
        box-shadow: none;
    }
    .agent-list-tree .agent-templates { list-style: none; margin: 0; padding: 0; }
    /* 入参设置：模板/系统提示词并列卡片 */
    .param-system-prompt-large .param-textarea { min-height: 90px; }
    .param-template-prompt .param-textarea { min-height: 90px; }
    .prompt-card {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 10px;
        background: #fff;
        box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);
    }
    .advanced-prompt-wrap {
        margin-bottom: 12px;
    }
    .param-label-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }
    .prompt-edit-btn {
        background: none;
        border: none;
        color: #713eff;
        font-size: 12px;
        cursor: pointer;
        padding: 0;
    }
    .prompt-edit-btn:hover {
        text-decoration: underline;
    }
    .prompt-history-btn {
        background: none; border: none; cursor: pointer; font-size: 14px;
        padding: 0 4px; line-height: 1; opacity: 0.6; transition: opacity 0.15s;
    }
    .prompt-history-btn:hover { opacity: 1; }
    .prompt-history-panel {
        position: absolute; top: 100%; right: 0; z-index: 500;
        background: #fff; border: 1px solid #e0e0e0; border-radius: 6px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.12); min-width: 280px; max-width: 360px;
        display: none;
    }
    .prompt-history-panel.open { display: block; }
    .prompt-history-item {
        display: flex; align-items: center; justify-content: space-between;
        padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f0f0f0;
        font-size: 12px; color: #595959;
    }
    .prompt-history-item:hover { background: #f5f5f5; }
    .prompt-history-item:last-child { border-bottom: none; }
    .prompt-history-item-text {
        flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px;
    }
    .prompt-history-item-del {
        color: #bfbfbf; cursor: pointer; font-size: 14px; flex-shrink: 0;
        padding: 0 4px; line-height: 1;
    }
    .prompt-history-item-del:hover { color: #ff4d4f; }
    .prompt-history-empty { padding: 12px; text-align: center; color: #bfbfbf; font-size: 12px; }
    .params-row-two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
    @media (max-width: 720px) { .params-row-two-cols { grid-template-columns: 1fr; } }
    .test-input-frame-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; align-items: start; }
    .test-input-frame-row .media-input-group { min-width: 0; }
    /* V06-11: image 和 ref-images 自然落入 2 列网格，各占一列并列（§7.2） */
    /* Seedance 2.x: 参考图 gridColumn:1/-1 全宽单独一行，首尾帧同行，参考音频视频同行（grid auto-placement） */
    /* 桌面端显式 2 列保底：防止未来 grid-template 变更破坏 Seedance 布局意图 */
    .test-input-frame-row.seedance2-mode { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    @media (max-width: 800px) { .test-input-frame-row { grid-template-columns: 1fr; } .test-input-frame-row.seedance2-mode { grid-template-columns: 1fr; } }
    .test-input-extra-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: flex-start; }
    .test-input-extra-row .media-input-group { flex: 1; min-width: 180px; }

    /* V06-11: 图像URL缩略图预览 - 替代纯URL粘贴框 */
    .image-url-thumb {
        display: inline-flex; align-items: center; gap: 6px;
        margin-bottom: 6px; position: relative;
    }
    .image-url-thumb img {
        width: 56px; height: 56px; object-fit: cover;
        border-radius: 6px; border: 1px solid #d9d9d9;
        cursor: pointer; background: #f5f5f5;
    }
    .image-url-thumb img:hover { border-color: #713eff; }
    .image-url-thumb .thumb-remove-btn {
        position: absolute; top: -6px; right: -6px;
        width: 20px; height: 20px; border-radius: 50%;
        background: #ff4d4f; color: #fff; border: none;
        font-size: 14px; line-height: 18px; text-align: center;
        cursor: pointer; padding: 0; opacity: 0.85;
    }
    .image-url-thumb .thumb-remove-btn:hover { opacity: 1; background: #cf1322; }

    /* 任务进度：放在预览/输出下方，A/B 时两栏并排 */
    .execution-progress-wrap { margin-top: 10px; padding: 10px; background: #fafafa; border-radius: 8px; border: 1px solid #e8e8e8; }
    .execution-progress-wrap.execution-progress-ab { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .execution-progress-col { min-width: 0; }
    .execution-progress-title { font-size: 12px; font-weight: 600; color: #262626; margin-bottom: 8px; }
    .execution-progress-title.title-a { color: #713eff; }
    .execution-progress-title.title-b { color: #52c41a; }
    .execution-progress-list-row { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 4px 0; align-items: center; -webkit-overflow-scrolling: touch; }
    .execution-progress-list-row::-webkit-scrollbar { height: 4px; }
    .execution-progress-list-row::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 2px; }
    .execution-node-item { font-size: 12px; padding: 4px 8px; border-radius: 4px; flex-shrink: 0; white-space: nowrap; cursor: default; position: relative; }
    .execution-node-item.pending { color: #8c8c8c; background: #f5f5f5; }
    .execution-node-item.running { color: #1890ff; background: #e6f7ff; }
    .execution-node-item.success { color: #52c41a; background: #f6ffed; }
    .execution-node-item.error { color: #ff4d4f; background: #fff2f0; }
    .execution-node-item .node-error-msg { font-size: 11px; color: #ff4d4f; margin-top: 2px; }
    .execution-progress-tooltip { position: fixed; z-index: 3000; padding: 8px 12px; background: #262626; color: #fff; font-size: 12px; border-radius: 6px; white-space: pre-wrap; max-width: 320px; box-shadow: 0 4px 12px rgba(0,0,0,0.25); pointer-events: none; display: none; line-height: 1.5; }
    .execution-progress-tooltip.show { display: block; }
    /* 最近任务列表（轮询窗口增强） */
    .recent-tasks-wrap { margin-top: 10px; background: #fafafa; border-radius: 12px; border: 1px solid #e8e8e8; }
    .recent-tasks-wrap.overlay-floating { position: fixed; left: auto; top: auto; right: 16px; bottom: 16px; width: min(700px, calc(100vw - 32px)); max-width: calc(100vw - 32px); margin-top: 0; z-index: 10000; box-shadow: 0 8px 24px rgba(0,0,0,0.15); background: rgba(255,255,255,0.98); backdrop-filter: blur(8px); }
    .recent-tasks-wrap.overlay-floating[data-expanded="false"] { width: min(300px, calc(100vw - 32px)); }
    .recent-tasks-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; cursor: grab; user-select: none; }
    .recent-tasks-header:active { cursor: grabbing; }
    .recent-tasks-header:hover { background: #f5f5f5; }
    .recent-tasks-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #262626; }
    .recent-tasks-toggle-icon { font-size: 10px; transition: transform 0.2s; }
    .recent-tasks-toggle-icon.collapsed { transform: rotate(-90deg); }
    .recent-tasks-count { font-size: 11px; color: #8c8c8c; font-weight: normal; }
    .recent-tasks-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
    .btn-small { padding: 4px 8px; font-size: 11px; border-radius: 4px; border: 1px solid #d9d9d9; background: #fff; cursor: pointer; }
    .btn-small:hover { border-color: #1890ff; color: #1890ff; }
    .recent-tasks-content { border-top: 1px solid #e8e8e8; background: rgba(255,255,255,0.98); }
    .recent-tasks-list { max-height: min(60vh, 460px); overflow-y: auto; }
    .recent-task-item { display: grid; grid-template-columns: 26px 24px 48px 90px 64px 68px 56px 68px auto; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #f0f0f0; font-size: 11px; align-items: center; transition: background 0.15s; }
    .recent-task-type { font-size: 14px; text-align: center; }
    .recent-task-thumbnail { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: #f0f0f0; cursor: pointer; }
    .recent-task-thumbnail-placeholder { width: 40px; height: 40px; border-radius: 4px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #ccc; }
    .recent-task-thumbnail-placeholder.loading { background: #f0f5ff; }
    .thumbnail-spinner { width: 14px; height: 14px; border: 2px solid #e0e0e0; border-top-color: #1890ff; border-radius: 50%; animation: thumbnail-spin 0.8s linear infinite; display: inline-block; }
    .thumbnail-type-icon { font-size: 14px; }
    @keyframes thumbnail-spin { to { transform: rotate(360deg); } }
    .recent-task-item:hover { background: #f5f5f5; }
    .recent-task-item.completed { cursor: pointer; }
    .recent-task-item.completed:hover { background: #e6f7ff; }
    .recent-task-id { font-family: monospace; font-size: 10px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .recent-task-status { display: flex; align-items: center; gap: 4px; font-weight: 500; }
    .recent-task-status.polling { color: #1890ff; }
    .recent-task-status.completed { color: #52c41a; }
    .recent-task-status.failed { color: #ff4d4f; }
    .recent-task-progress { display: flex; align-items: center; gap: 6px; }
    .recent-task-progress-bar { width: 50px; height: 5px; background: #f0f0f0; border-radius: 3px; overflow: hidden; }
    .recent-task-progress-bar-fill { height: 100%; background: #1890ff; transition: width 0.3s; }
    .recent-task-progress-bar-fill.completed { background: #52c41a; }
    .recent-task-progress-bar-fill.failed { background: #ff4d4f; }
    .recent-task-progress-text { font-family: monospace; font-size: 10px; color: #666; min-width: 35px; }
    .recent-task-time { font-family: monospace; font-size: 10px; color: #999; }
    .recent-task-created { font-size: 10px; color: #999; }
    .recent-task-action { display: flex; gap: 4px; white-space: nowrap; }
    .recent-task-action-btn { padding: 2px 6px; font-size: 10px; border-radius: 3px; border: 1px solid #d9d9d9; background: #fff; cursor: pointer; }
    .recent-task-action-btn:hover { border-color: #1890ff; color: #1890ff; }
    .recent-tasks-empty { padding: 40px 20px; text-align: center; color: #bfbfbf; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
    .recent-tasks-empty.loading { color: #8c8c8c; }
    .recent-tasks-empty.error { color: #cf1322; }
    .recent-tasks-inline-retry { padding: 4px 10px; font-size: 11px; }
    .recent-tasks-batch-btn { background: #f6ffed; border-color: #b7eb8f; color: #237804; }
    .recent-tasks-batch-btn:hover { border-color: #52c41a; color: #135200; }
    .recent-tasks-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.24); z-index: 10045; display: none; }
    .recent-tasks-backdrop.show { display: block; }
    .recent-tasks-batch-modal { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(1040px, calc(100vw - 32px)); max-height: min(82vh, 860px); display: none; flex-direction: column; background: #fff; border: 1px solid #e8e8e8; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.22); z-index: 10050; overflow: hidden; }
    .recent-tasks-batch-modal.show { display: flex; }

    /* 浮动批量操作栏 */
    .recent-tasks-batch-bar { display: none; align-items: center; gap: 8px; padding: 8px 12px; background: #f6f8fa; border: 1px solid #e0e0e0; border-top: none; border-radius: 0 0 12px 12px; font-size: 13px; flex-wrap: wrap; }
    .recent-tasks-batch-bar.show { display: flex; }
    .recent-tasks-batch-bar .recent-batch-bar-count { color: #713eff; font-weight: 700; }
    .recent-tasks-batch-bar button.btn-small { font-size: 12px; padding: 4px 10px; white-space: nowrap; }
    .recent-tasks-batch-bar button.btn-small:disabled { opacity: 0.4; cursor: not-allowed; }
    .recent-tasks-batch-bar .recent-batch-bar-manager { margin-left: auto; }
    .recent-tasks-batch-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #f0f0f0; background: #fafafa; }
    .recent-tasks-batch-title { font-size: 16px; font-weight: 600; color: #262626; }
    .recent-tasks-batch-subtitle { font-size: 12px; color: #8c8c8c; margin-top: 4px; }
    .recent-tasks-batch-toolbar { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(140px, 1fr)) auto; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #f0f0f0; background: #fff; }
    .recent-tasks-batch-toolbar input,
    .recent-tasks-batch-toolbar select { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 12px; }
    .recent-tasks-batch-summary { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 18px 12px; }
    .recent-tasks-batch-metric { min-width: 132px; padding: 10px 12px; border: 1px solid #f0f0f0; border-radius: 10px; background: #fafafa; }
    .recent-tasks-batch-metric-label { font-size: 11px; color: #8c8c8c; margin-bottom: 4px; }
    .recent-tasks-batch-metric-value { font-size: 18px; font-weight: 600; color: #262626; }
    .recent-tasks-batch-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
    .recent-tasks-batch-actions .btn-small[disabled] { cursor: not-allowed; color: #bfbfbf; border-color: #f0f0f0; background: #fafafa; }
    .recent-tasks-batch-table-wrap { flex: 1; min-height: 0; overflow: auto; padding: 0 18px 18px; }
    .recent-tasks-batch-table { width: 100%; border-collapse: collapse; min-width: 880px; }
    .recent-tasks-batch-table th,
    .recent-tasks-batch-table td { padding: 10px 8px; border-bottom: 1px solid #f0f0f0; text-align: left; font-size: 12px; vertical-align: middle; }
    .recent-tasks-batch-table th { position: sticky; top: 0; background: #fff; z-index: 1; color: #595959; font-weight: 600; }
    .recent-tasks-batch-table tr:hover td { background: #fafafa; }
    .recent-batch-status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #f5f5f5; color: #595959; white-space: nowrap; }
    .recent-batch-status-badge.completed { background: #f6ffed; color: #237804; }
    .recent-batch-status-badge.failed,
    .recent-batch-status-badge.timeout,
    .recent-batch-status-badge.cancelled { background: #fff2f0; color: #a8071a; }
    .recent-batch-status-badge.processing,
    .recent-batch-status-badge.submitted { background: #e6f7ff; color: #0958d9; }
    .recent-batch-empty { padding: 32px 20px; text-align: center; color: #8c8c8c; font-size: 12px; }
    .recent-tasks-batch-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid #f0f0f0; background: #fafafa; }
    .recent-tasks-batch-pagination { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .recent-tasks-batch-selection-note { font-size: 12px; color: #595959; }
    @media (max-width: 960px) {
        .recent-tasks-wrap.overlay-floating { right: 16px; bottom: 16px; width: calc(100vw - 32px); }
        .recent-task-item { grid-template-columns: 32px 32px 90px 68px 72px 60px 72px auto; }
        .recent-tasks-batch-toolbar { grid-template-columns: 1fr 1fr; }
    }
    @media (max-width: 720px) {
        .recent-tasks-actions { width: 100%; justify-content: flex-start; }
        .recent-tasks-batch-toolbar { grid-template-columns: 1fr; }
        .recent-tasks-batch-footer { flex-direction: column; align-items: stretch; }
    }
    .mid-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
    .mid-toolbar select { padding: 6px 10px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px; min-width: 180px; }
    .mid-prompt-label { font-size: 12px; color: #8c8c8c; margin-bottom: 4px; }
    .mid-actions { display: flex; gap: 8px; margin-top: 10px; }
    .btn { padding: 8px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; border: 1px solid #e0e0e0; background: #fff; }
    .btn:hover { border-color: #713eff; color: #713eff; }
    .btn-primary { background: linear-gradient(135deg, #713eff 0%, #5a2fd9 100%); color: #fff; border: none; }
    .btn-primary:hover { opacity: 0.9; }
    .btn-success { background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%); color: #fff; border: none; }
    .btn-success:hover { opacity: 0.9; }
    .btn-debug { background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%); color: #fff; border: none; padding: 10px 24px; font-size: 14px; }
    .btn-debug:hover { opacity: 0.9; }
    .btn-ab { padding: 10px 24px; font-size: 14px; }
    .right-section { margin-bottom: 12px; }
    .right-section-title { font-size: 12px; font-weight: 600; color: #595959; margin-bottom: 6px; }
    .right-input { width: 100%; min-height: 60px; padding: 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 12px; font-family: Consolas, monospace; resize: vertical; box-sizing: border-box; }
    /* min-height:0 + overflow 约束：flex 缩小时视频/媒体不「飞出」预览框 */
    .right-preview { flex: 1; min-height: 80px; min-width: 0; padding: 10px; border: 1px solid #e0e0e0; border-radius: 6px; background: #fff; font-size: 12px; overflow: auto; display: flex; flex-direction: column; position: relative; z-index: 1; }
    .preview-resize-handle { height: 6px; cursor: ns-resize; background: #f0f0f0; border-radius: 3px; margin: 0 12px; flex-shrink: 0; position: relative; transition: background 0.15s; }
    .preview-resize-handle:hover, .preview-resize-handle.active { background: #713eff; }
    .preview-resize-handle::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 2px; background: #ccc; border-radius: 1px; }
    .preview-resize-handle:hover::after, .preview-resize-handle.active::after { background: #fff; }
    .right-preview img { max-width: 100%; }
    /* 视频预览：占满可用高度并在框内 contain（勿用 overflow:visible + min-height:200px 顶破父级） */
    .right-preview .preview-video-wrapper { flex: 1; min-height: 0; min-width: 0; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
    .right-preview .preview-video-wrapper video { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; display: block; background: #000; }
    /* 单图：与视频一致，约束在预览框内 contain 缩放 */
    .preview-images-wrap.preview-single { display: flex; align-items: center; justify-content: center; min-height: 200px; flex: 1; min-width: 0; overflow: hidden; }
    .preview-images-wrap.preview-single img { width: 100%; height: 100%; object-fit: contain; max-width: 100%; max-height: 100%; display: block; }
    /* 双图：并列铺满预览框 */
    .preview-images-wrap.preview-dual { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; gap: 8px; flex: 1; min-height: 200px; min-width: 0; }
    .preview-images-wrap.preview-dual img { width: 100%; height: 100%; object-fit: contain; display: block; }
    /* 多图(3+)：并列或换行 */
    .preview-images-wrap.preview-multi { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; flex: 1; }
    .preview-images-wrap.preview-multi img { flex: 1; min-width: 120px; max-width: 240px; max-height: 240px; object-fit: contain; }
    /* 预览文本：JSON 结构化显示、自动换行 */
    .preview-text.preview-json-wrap { white-space: pre-wrap; word-break: break-word; margin: 0; font-family: Consolas, "Monaco", monospace; line-height: 1.5; }
    /* 预览区右键菜单 */
    .preview-context-menu { position: fixed; z-index: 2000; min-width: 140px; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); padding: 4px 0; display: none; }
    .preview-context-menu.show { display: block; }
    .preview-context-menu button { display: block; width: 100%; padding: 8px 14px; border: none; background: none; text-align: left; font-size: 13px; cursor: pointer; color: #262626; }
    .preview-context-menu button:hover { background: #f5f5f5; }
    .preview-context-menu button:disabled { color: #bfbfbf; cursor: not-allowed; }
    .empty-hint { color: #bfbfbf; font-size: 12px; }
    /* A/B 预览区 */
    .ab-header-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
    }
    .ab-header-row .right-section-title {
        margin-bottom: 0;
    }
    /* 所有弹窗：窗口正中 */
    .agent-console-modal { 
        position: fixed; 
        inset: 0; 
        background: rgba(0,0,0,0.45); 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        z-index: 1000;
        animation: modalFadeIn 0.2s ease-out;
    }
    @keyframes modalFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    .agent-console-modal-inner { 
        background: #fff; 
        padding: 24px; 
        border-radius: 12px; 
        min-width: 360px; 
        max-width: 90vw; 
        box-shadow: 0 8px 32px rgba(0,0,0,0.2);
        animation: modalSlideIn 0.2s ease-out;
    }
    @keyframes modalSlideIn {
        from { transform: translateY(-20px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    .agent-console-modal-title { 
        font-size: 16px; 
        font-weight: 600; 
        margin-bottom: 16px; 
        color: #262626;
        padding-bottom: 12px;
        border-bottom: 1px solid #f0f0f0;
    }
    .agent-console-modal-inner textarea { 
        width: 100%; 
        padding: 10px 12px; 
        border: 1px solid #e0e0e0; 
        border-radius: 8px; 
        font-size: 13px; 
        resize: vertical; 
        box-sizing: border-box;
        transition: border-color 0.2s;
    }
    .agent-console-modal-inner textarea:focus {
        border-color: #713eff;
        outline: none;
    }
    .agent-console-modal-inner input[type="text"] {
        width: 100%; 
        padding: 10px 12px; 
        border: 1px solid #e0e0e0; 
        border-radius: 8px; 
        font-size: 13px; 
        box-sizing: border-box;
        transition: border-color 0.2s;
    }
    .agent-console-modal-inner input[type="text"]:focus {
        border-color: #713eff;
        outline: none;
    }
    .agent-console-modal-actions { 
        margin-top: 20px; 
        display: flex; 
        gap: 10px; 
        justify-content: flex-end;
    }
    .agent-console-modal-actions .btn {
        min-width: 80px;
    }
    /* Toast 提示 */
    .agent-toast-container {
        position: fixed;
        top: 70px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9999;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        pointer-events: none;
    }
    .agent-toast {
        padding: 12px 24px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        animation: toastSlideIn 0.3s ease-out;
        pointer-events: auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    @keyframes toastSlideIn {
        from { transform: translateY(-20px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    .agent-toast.toast-out {
        animation: toastSlideOut 0.3s ease-in forwards;
    }
    @keyframes toastSlideOut {
        from { transform: translateY(0); opacity: 1; }
        to { transform: translateY(-20px); opacity: 0; }
    }
    .agent-toast.toast-success {
        background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
        color: #fff;
    }
    .agent-toast.toast-error {
        background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%);
        color: #fff;
    }
    .agent-toast.toast-warning {
        background: linear-gradient(135deg, #faad14 0%, #d48806 100%);
        color: #fff;
    }
    .agent-toast.toast-info {
        background: linear-gradient(135deg, #713eff 0%, #5a2fd9 100%);
        color: #fff;
    }
    .agent-toast-icon {
        font-size: 16px;
    }
    /* 多媒体输入区域 */
    .media-inputs {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .media-input-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .media-input-group .param-label {
        font-size: 12px;
        color: #595959;
        font-weight: 500;
    }
    .media-input-group .param-input {
        padding: 8px 10px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        font-size: 13px;
    }
    .media-input-group .param-textarea {
        min-height: 60px;
        resize: vertical;
    }
    .media-input-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .btn-refresh {
        background: none;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        padding: 2px 6px;
        cursor: pointer;
        font-size: 12px;
        transition: all 0.2s;
    }
    .btn-refresh:hover {
        border-color: #713eff;
        background: #f0f0ff;
    }
    .btn-refresh.loading {
        opacity: 0.5;
        pointer-events: none;
        animation: spin 1s linear infinite;
    }
    @keyframes spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
    .media-select {
        margin-bottom: 4px;
    }
    /* 图像选择器：收起时像 select，点击展开九宫格 */
    .image-picker-dropdown {
        position: relative;
        margin-bottom: 4px;
    }
    .image-picker-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background: #fff;
        cursor: pointer;
        font-size: 13px;
        color: #262626;
        user-select: none;
        min-height: 32px;
    }
    .image-picker-trigger:hover {
        border-color: #b8a8ff;
        background: #faf9ff;
    }
    .image-picker-trigger.expanded {
        border-color: #713eff;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    .image-picker-label {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .image-picker-label.placeholder {
        color: #bfbfbf;
    }
    .image-picker-label.loading {
        color: #713eff;
        animation: image-picker-pulse 1.4s ease-in-out infinite;
    }
    @keyframes image-picker-pulse {
        0%, 100% { opacity: 0.5; }
        50% { opacity: 1; }
    }
    .image-picker-arrow {
        flex-shrink: 0;
        margin-left: 8px;
        font-size: 10px;
        color: #8c8c8c;
        transition: transform 0.2s;
    }
    .image-picker-dropdown.expanded .image-picker-arrow {
        transform: rotate(180deg);
    }
    .image-picker-panel {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 100;
        border: 1px solid #713eff;
        border-top: none;
        border-radius: 0 0 6px 6px;
        background: #fff;
        box-shadow: 0 4px 12px rgba(113, 62, 255, 0.15);
        max-height: 0;
        overflow: hidden;
        flex-direction: column;
    }
    .image-picker-dropdown.expanded .image-picker-panel {
        display: flex;
        max-height: 56vh;
    }
    .image-picker-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 12px;
        overflow-y: auto;
        flex: 1;
        min-height: 120px;
    }
    .image-picker-panel-footer {
        padding: 8px 12px;
        border-top: 1px solid #e8e8e8;
        background: #fafafa;
        flex-shrink: 0;
    }
    .image-picker-modal-btn {
        font-size: 12px;
        color: #713eff;
        cursor: pointer;
        background: none;
        border: none;
        padding: 0;
    }
    .image-picker-modal-btn:hover { text-decoration: underline; }
    /* 弹窗：图像选择器全量展示 */
    .image-picker-modal-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 5000;
        background: rgba(0,0,0,0.4);
        align-items: center;
        justify-content: center;
        padding: 24px;
    }
    .image-picker-modal-overlay.show { display: flex; }
    .image-picker-modal {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.2);
        max-width: 90vw;
        max-height: 85vh;
        width: 640px;
        display: flex;
        flex-direction: column;
    }
    .image-picker-modal-title {
        padding: 16px;
        font-size: 14px;
        font-weight: 600;
        border-bottom: 1px solid #e8e8e8;
        flex-shrink: 0;
    }
    .image-picker-modal-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
        padding: 16px;
        overflow-y: auto;
        flex: 1;
        min-height: 200px;
    }
    .image-picker-modal-grid .image-picker-item {
        min-height: 80px;
    }
    .image-picker-modal-close {
        padding: 10px 16px;
        border-top: 1px solid #e8e8e8;
        text-align: right;
        flex-shrink: 0;
    }
    .image-picker-grid::-webkit-scrollbar { width: 6px; }
    .image-picker-grid::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 3px; }
    .image-picker-item {
        aspect-ratio: 1;
        border-radius: 6px;
        position: relative;
        overflow: hidden; }
    .media-delete-btn {
        position: absolute; top: 3px; right: 3px; z-index: 10;
        width: 22px; height: 22px; border-radius: 50%;
        background: rgba(0,0,0,0.55); color: #fff; border: none;
        font-size: 13px; line-height: 22px; text-align: center; cursor: pointer;
        display: none; transition: background 0.15s;
    }
    .media-delete-btn:hover { background: #ff4d4f; }
    .image-picker-item:hover .media-delete-btn,
    .image-picker-modal-grid .image-picker-item:hover .media-delete-btn { display: block; }
        overflow: hidden;
        cursor: pointer;
        border: 2px solid transparent;
        background: #f5f5f5;
        transition: border-color 0.2s, box-shadow 0.2s;
    }
    .image-picker-item:hover {
        border-color: #b8a8ff;
        box-shadow: 0 2px 8px rgba(113, 62, 255, 0.2);
    }
    .image-picker-item.selected {
        border-color: #713eff;
        box-shadow: 0 0 0 2px rgba(113, 62, 255, 0.3);
    }
    .image-picker-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .image-picker-empty {
        grid-column: 1 / -1;
        font-size: 12px;
        color: #8c8c8c;
        padding: 12px;
        text-align: center;
    }
    /* API 配置只读显示 */
    .api-config-display {
        padding: 10px 12px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background: #fafafa;
        font-size: 13px;
    }
    .api-config-name {
        color: #595959;
    }
    .api-config-name.configured {
        color: #52c41a;
        font-weight: 500;
    }
    .api-config-name.not-configured {
        color: #bfbfbf;
        font-style: italic;
    }
