/* ============================================================
   STATAU Agent 实证分析工作台 - 新版界面样式
   设计目标：面向实证分析的工程型 Agent 界面
   - 顶栏只保留会话标题与面板开关，功能入口收敛到输入区
   - 输入区使用大尺寸工程化输入框，加号菜单承载数据与上下文操作
   - 右侧数据画像使用紧凑变量列表，悬停展示变量标签与统计详情
   ============================================================ */

/* ---------- 页面级：隐藏顶部导航，全屏独立 ---------- */
body.agent-page-fullscreen {
    padding-top: 0 !important;
    --statau-navbar-offset: 0px;
    /* 整页统一按 90% 缩放：容器按比例放大后由 zoom 缩回，控件观感整体缩小约 10%。 */
    --agent-zoom: 0.9;
    /* 滚动条跟随主题：暗色下用半透明灰滑块 + 透明轨道，避免原生白色滚动条突兀。 */
    --agent-scrollbar-thumb: rgba(148, 163, 184, 0.42);
    --agent-scrollbar-thumb-hover: rgba(148, 163, 184, 0.62);
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: var(--agent-scrollbar-thumb) transparent;
}

/* Chromium 对滚动条属性的继承实现不一致，显式下发给页面内所有滚动容器。 */
body.agent-page-fullscreen * {
    scrollbar-width: thin;
    scrollbar-color: var(--agent-scrollbar-thumb) transparent;
}

[data-theme="light"] body.agent-page-fullscreen {
    --agent-scrollbar-thumb: rgba(113, 128, 150, 0.35);
    --agent-scrollbar-thumb-hover: rgba(113, 128, 150, 0.55);
    color-scheme: light;
}

/* 新版 Chromium/Firefox 使用上面的 scrollbar-color；旧版 WebKit 用以下规则兜底。 */
body.agent-page-fullscreen ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body.agent-page-fullscreen ::-webkit-scrollbar-track {
    background: transparent;
}

body.agent-page-fullscreen ::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--agent-scrollbar-thumb);
}

body.agent-page-fullscreen ::-webkit-scrollbar-thumb:hover {
    background: var(--agent-scrollbar-thumb-hover);
}

body.agent-page-fullscreen ::-webkit-scrollbar-corner {
    background: transparent;
}

#agent-app {
    zoom: var(--agent-zoom);
    width: calc(100vw * 1.1111111);
    height: calc(100vh * 1.1111111);
}

.agent-page-fullscreen .modal-dialog {
    zoom: var(--agent-zoom);
}

body.agent-page-fullscreen .navbar,
body.agent-page-fullscreen .navbar-tech {
    display: none !important;
}

/* ---------- 对话参考附件：与右侧分析数据独立 ---------- */
.agent-attachment-tray, .agent-sent-attachments {
    display: flex;
    gap: 10px;
    padding: 4px 2px 12px;
    overflow-x: auto;
    max-width: 100%;
}
.agent-sent-attachments { flex-wrap: wrap; justify-content: flex-end; }
.agent-user-content { max-width: min(100%, 720px); min-width: 0; }
.agent-user-content .agent-message-bubble { max-width: 100%; }
.agent-attachment-card {
    flex: 0 0 168px;
    width: 168px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--agent-border);
    border-radius: 14px;
    background: var(--agent-surface);
}
.agent-attachment-image { display: block; height: 96px; background: var(--agent-surface-soft); }
.agent-attachment-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.agent-attachment-icon { height: 42px; padding: 12px; font-size: 23px; color: var(--agent-accent); }
.agent-attachment-caption { padding: 9px 12px 10px; font-size: 12px; min-width: 0; }
.agent-attachment-caption > a, .agent-attachment-caption > span {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--agent-text); text-decoration: none;
}
.agent-attachment-caption small { display: block; font-size: 11px; color: var(--agent-text-muted); line-height: 1.5; margin-top: 3px; }
.agent-attachment-remove {
    position: absolute; right: 5px; top: 5px; border: 1px solid var(--agent-border);
    border-radius: 50%; width: 24px; height: 24px; padding: 0; font-size: 11px;
    color: var(--agent-text-secondary); background: var(--agent-surface); cursor: pointer;
}
.agent-attachment-retry { margin: 0 12px 10px; border: 0; background: none; color: var(--agent-accent); padding: 0; font-size: 12px; cursor: pointer; }
.agent-attachment-card.is-error { border-color: #ef4444; }
.agent-attachment-card.is-error small { color: #ef4444; }
.agent-composer-box.is-dragging { outline: 2px dashed var(--agent-accent); outline-offset: 3px; }
.agent-data-upload { margin: 0 0 16px; width: 100%; }

/* ---------- 根容器 ---------- */
.agent-shell {
    --agent-panel-width: 340px;
    --agent-sidebar-width: 264px;
    --agent-content-width: 920px;
    --agent-radius-lg: 18px;
    --agent-radius-md: 12px;
    --agent-radius-sm: 8px;
    --agent-surface: var(--bg-primary);
    --agent-surface-muted: var(--bg-secondary);
    --agent-surface-soft: var(--bg-tertiary);
    --agent-border: var(--border-color);
    --agent-text: var(--text-primary);
    --agent-text-secondary: var(--text-secondary);
    --agent-text-muted: var(--text-muted);
    --agent-accent: var(--accent-primary);
    --agent-accent-soft: color-mix(in srgb, var(--accent-primary) 12%, transparent 88%);
    --agent-hairline: color-mix(in srgb, var(--border-color) 72%, transparent 28%);
    display: flex;
    width: 100vw;
    height: 100vh;
    background: var(--agent-surface);
    color: var(--agent-text);
    overflow: hidden;
}

.agent-shell *,
.agent-column-tooltip * {
    box-sizing: border-box;
}

.agent-shell [hidden],
.agent-column-tooltip[hidden] {
    display: none !important;
}

/* 访客使用相同工作台，空消息区不占上传引导的空间。 */
[data-agent-guest] .agent-messages:empty {
    display: none;
}

.agent-sidebar,
.agent-main,
.agent-info-panel {
    min-height: 0;
}

/* ---------- 拖动调整条（保留视觉提示） ---------- */
.agent-resize-handle {
    flex: 0 0 3px;
    background: transparent;
    cursor: col-resize;
    transition: background 0.15s ease;
    position: relative;
    z-index: 6;
}

.agent-resize-handle:hover {
    background: color-mix(in srgb, var(--agent-accent) 55%, transparent 45%);
}

/* ============================================================
   左侧会话栏
   ============================================================ */
.agent-sidebar {
    display: flex;
    flex-direction: column;
    width: var(--agent-sidebar-width);
    flex-shrink: 0;
    background: var(--agent-surface-muted);
    border-right: 1px solid var(--agent-hairline);
}

.agent-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 14px 12px;
}

.agent-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--agent-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    min-width: 0;
}

.agent-brand:hover {
    color: var(--agent-accent);
}

.agent-brand-logo {
    width: 30px;
    height: 30px;
    display: block;
    /* 复用主站透明标志，只展示左侧图形，避免 favicon 自带的白底。 */
    background: url('../images/logo.png') left center / auto 110% no-repeat;
    flex-shrink: 0;
}

[data-theme="dark"] .agent-brand-logo {
    background-image: url('../images/logo-dark.png');
}

.agent-brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-session-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 10px 10px;
}

.agent-session-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 6px 36px 6px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--agent-text-secondary);
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.agent-session-row + .agent-session-row {
    margin-top: 2px;
}

/* 会话菜单独立于选择按钮，触屏与键盘均可直接操作。 */
.agent-session-row { position: relative; }
.agent-session-more {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 28px; height: 28px;
    padding: 0; border: 0; border-radius: 6px; background: transparent;
    color: var(--agent-text-muted); cursor: pointer;
}
.agent-session-more:hover, .agent-session-more:focus-visible { background: var(--agent-accent-soft); color: var(--agent-text); }
.agent-session-menu {
    position: fixed; inset: auto; margin: 0; padding: 5px; width: 170px;
    border: 1px solid var(--agent-hairline); border-radius: 10px;
    background: var(--agent-surface); color: var(--agent-text);
    box-shadow: 0 8px 26px rgba(15, 23, 42, .16);
}
.agent-session-menu button {
    display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px;
    border: 0; border-radius: 6px; background: transparent; color: inherit;
    text-align: left; font: inherit; font-size: .82rem; cursor: pointer;
}
.agent-session-menu button:hover, .agent-session-menu button:focus-visible { background: var(--agent-accent-soft); }
.agent-session-menu .is-danger, .agent-session-dialog-error { color: #dc3545; }
.agent-session-dialog {
    width: min(440px, calc(100vw - 32px)); padding: 24px;
    border: 1px solid var(--agent-hairline); border-radius: 16px;
    color: var(--agent-text); background: var(--agent-surface);
    box-shadow: 0 18px 70px rgba(0, 0, 0, .2);
}
.agent-session-dialog::backdrop { background: rgba(15, 23, 42, .38); }
.agent-session-dialog h2 { font-size: 1.1rem; margin: 0 0 20px; }
.agent-session-dialog label { display: block; font-size: .88rem; }
.agent-session-dialog input {
    display: block; width: 100%; margin-top: 8px; padding: 10px 12px;
    border: 1px solid var(--agent-hairline); border-radius: 8px;
    color: var(--agent-text); background: var(--agent-surface-soft); font: inherit;
}
.agent-session-dialog p { font-size: .88rem; overflow-wrap: anywhere; }
.agent-session-dialog-error:empty { display: none; }
.agent-session-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.agent-session-dialog .is-danger { background: #dc3545; border-color: #dc3545; color: white; }
.agent-shell.is-sidebar-collapsed .agent-session-more { display: none; }

/* 先切换会话外壳，再以骨架屏等待历史；保留减少动态效果的系统偏好。 */
.agent-session-loading { width: 100%; max-width: 820px; margin: 16px auto; padding: 0 20px; }
.agent-skeleton-message { position: relative; margin: 0 0 38px; padding-left: 44px; }
.agent-skeleton-message span, .agent-skeleton-message i {
    display: block; height: 13px; margin: 12px 0; border-radius: 6px;
    background: linear-gradient(90deg, var(--agent-surface-soft) 20%, var(--agent-hairline) 50%, var(--agent-surface-soft) 80%);
    background-size: 240% 100%; animation: agent-skeleton-sweep 1.6s ease-in-out infinite;
}
.agent-skeleton-message i { position: absolute; top: 0; left: 0; width: 28px; height: 28px; margin: 0; border-radius: 50%; }
.agent-skeleton-message span:nth-of-type(2) { width: 88%; }
.agent-skeleton-message span:last-child { width: 60%; }
.agent-skeleton-message.is-user { width: 48%; margin-left: auto; padding: 12px 18px; background: var(--agent-surface-soft); border-radius: 16px; }
.agent-session-error { text-align: center; margin: 60px auto; padding: 20px; color: var(--agent-text-secondary); }
.agent-session-error small { display: block; margin-bottom: 20px; }
.agent-session-creating { text-align: center; margin: 32px auto; color: var(--agent-text-secondary); font-size: .88rem; }
.is-session-loading .agent-composer, .is-session-loading .agent-info-body { opacity: .5; }
@keyframes agent-skeleton-sweep { from { background-position: 180% 0; } to { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) {
    .agent-skeleton-message span, .agent-skeleton-message i { animation: none; }
}

.agent-session-item:hover {
    background: color-mix(in srgb, var(--agent-surface) 72%, transparent 28%);
    color: var(--agent-text);
}

.agent-session-item.is-active {
    background: var(--agent-surface);
    border-color: var(--agent-hairline);
    color: var(--agent-text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.agent-session-item.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}

.agent-session-title {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-session-icon {
    flex: 0 0 auto;
    font-size: 0.78rem;
    color: var(--agent-text-muted);
}

.agent-session-time {
    flex: 0 0 auto;
    margin-left: 2px;
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--agent-text-muted);
    white-space: nowrap;
}

.agent-session-empty {
    padding: 22px 12px;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--agent-text-muted);
}

.agent-sidebar-foot {
    padding: 10px 12px 14px;
    border-top: 1px solid var(--agent-hairline);
}

/* ---------- 左下角个人中心 ---------- */
.agent-profile {
    position: relative;
}

.agent-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--agent-text-secondary);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.agent-profile-trigger:hover,
.agent-profile.is-open .agent-profile-trigger {
    background: var(--agent-surface);
    border-color: var(--agent-hairline);
}

.agent-profile-trigger:focus-visible,
.agent-profile-actions a:focus-visible,
.agent-profile-actions button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-primary) 62%, transparent 38%);
    outline-offset: 2px;
}

.agent-profile-avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.agent-profile-avatar-guest {
    background: var(--agent-surface-soft);
    color: var(--agent-text-secondary);
}

.agent-profile-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.agent-profile-name {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--agent-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-profile-tier {
    min-height: 1em;
    font-size: 0.71rem;
    line-height: 1.4;
    color: var(--agent-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-profile-chevron {
    flex-shrink: 0;
    font-size: 0.68rem;
    color: var(--agent-text-muted);
    transition: transform 0.15s ease;
}

.agent-profile.is-open .agent-profile-chevron {
    transform: rotate(180deg);
}

.agent-profile-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 70;
    display: none;
    width: 276px;
    padding: 8px;
    border: 1px solid var(--agent-border);
    border-radius: 14px;
    background: var(--agent-surface);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.2);
    transform-origin: bottom left;
}

.agent-profile.is-open .agent-profile-menu {
    display: block;
    animation: agent-menu-in 0.14s ease-out;
}

.agent-profile-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 10px;
}

.agent-profile-avatar-lg {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
}

.agent-profile-head-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.agent-profile-head-text strong {
    font-size: 0.86rem;
    color: var(--agent-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-profile-head-text small {
    font-size: 0.72rem;
    color: var(--agent-text-muted);
}

.agent-profile-stats {
    display: grid;
    gap: 2px;
    padding: 4px 2px 8px;
    border-bottom: 1px solid var(--agent-hairline);
}

.agent-profile-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.79rem;
    color: var(--agent-text-secondary);
}

.agent-profile-stat > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.agent-profile-stat > span i {
    color: var(--agent-text-muted);
    font-size: 0.82rem;
}

.agent-profile-stat strong {
    color: var(--agent-text);
    font-variant-numeric: tabular-nums;
}

.agent-profile-actions {
    display: grid;
    gap: 2px;
    padding-top: 6px;
}

.agent-profile-actions a,
.agent-profile-actions button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--agent-text-secondary);
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.13s ease, color 0.13s ease;
}

.agent-profile-actions a:hover,
.agent-profile-actions button:hover {
    background: var(--agent-surface-muted);
    color: var(--agent-text);
}

.agent-profile-actions i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--agent-text-muted);
}

.agent-profile-actions a:hover i,
.agent-profile-actions button:hover i {
    color: var(--accent-primary);
}

/* ============================================================
   主区域与顶栏
   ============================================================ */
.agent-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    background: var(--agent-surface);
    position: relative;
}

.agent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid var(--agent-hairline);
    background: var(--agent-surface);
    flex-shrink: 0;
    z-index: 8;
}

.agent-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.agent-header-title-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.agent-header-title {
    margin: 0;
    font-weight: 700;
    font-size: 0.94rem;
    line-height: 1.35;
    color: var(--agent-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-header-subtitle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    line-height: 1.3;
    color: var(--agent-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-header-subtitle i {
    font-size: 0.72rem;
    color: var(--agent-text-muted);
}

.agent-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ---------- 通用按钮 ---------- */
.agent-icon-btn,
.agent-composer-tool,
.agent-composer-send,
.agent-composer-stop,
.agent-primary-btn,
.agent-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: var(--agent-text-secondary);
    cursor: pointer;
    font: inherit;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.agent-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 1rem;
    flex-shrink: 0;
}

.agent-icon-btn-sm {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.86rem;
}

.agent-icon-btn:hover {
    background: color-mix(in srgb, var(--agent-surface-muted) 84%, transparent 16%);
    color: var(--agent-text);
}

.agent-icon-btn:focus-visible,
.agent-composer-tool:focus-visible,
.agent-composer-send:focus-visible,
.agent-execution-btn:focus-visible,
.agent-menu-item:focus-visible,
.agent-info-tab:focus-visible,
.agent-session-item:focus-visible,
.agent-column-row:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--agent-accent) 62%, transparent 38%);
    outline-offset: 2px;
}

.agent-primary-btn {
    height: 38px;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--agent-text);
    color: var(--agent-surface);
    font-weight: 600;
    font-size: 0.85rem;
}

.agent-primary-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.agent-secondary-btn {
    height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--agent-border);
    background: var(--agent-surface);
    color: var(--agent-text-secondary);
    font-size: 0.8rem;
}

.agent-secondary-btn:hover {
    border-color: color-mix(in srgb, var(--agent-accent) 45%, var(--agent-border) 55%);
    color: var(--agent-text);
}

.agent-secondary-btn i {
    font-size: 0.9rem;
    opacity: 0.75;
}

.agent-primary-btn:disabled,
.agent-secondary-btn:disabled,
.agent-icon-btn:disabled,
.agent-composer-send:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   聊天区域与消息
   ============================================================ */
.agent-chat-stage {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.agent-messages {
    flex: 1;
    overflow-y: auto;
    padding: 28px 28px 18px;
    scroll-behavior: smooth;
}

.agent-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: var(--agent-content-width);
    margin: 0 auto 24px;
}

.agent-message.role-user {
    justify-content: flex-end;
}

.agent-message-avatar {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-primary) 88%, #fff 12%), var(--accent-secondary));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 3px 10px color-mix(in srgb, var(--accent-primary) 26%, transparent 74%);
    margin-top: 2px;
}

.agent-message-content {
    min-width: 0;
    max-width: 100%;
}

.agent-message.role-assistant .agent-message-content {
    flex: 1;
}

.agent-message-bubble {
    padding: 12px 16px;
    border-radius: 16px 16px 4px 16px;
    background: var(--agent-surface-soft);
    color: var(--agent-text);
    line-height: 1.7;
    font-size: 0.92rem;
    max-width: 76%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.agent-message.role-assistant .agent-message-body {
    padding: 2px 2px 0;
    font-size: 0.92rem;
    line-height: 1.78;
    color: var(--agent-text);
    overflow-wrap: anywhere;
}

.agent-message.is-error .agent-message-body,
.agent-message.is-error .agent-message-bubble {
    color: color-mix(in srgb, #ef4444 78%, var(--agent-text) 22%);
}

/* ---------- 消息内 Markdown 排版 ---------- */
.agent-message-body .agent-result-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
}

.agent-message-body > *:first-child {
    margin-top: 0;
}

.agent-message-body > *:last-child {
    margin-bottom: 0;
}

.agent-message-body p,
.agent-message-body ul,
.agent-message-body ol,
.agent-message-body pre,
.agent-message-body blockquote,
.agent-message-body .agent-markdown-table-wrap {
    margin: 0 0 12px;
}

.agent-message-body h1,
.agent-message-body h2,
.agent-message-body h3,
.agent-message-body h4,
.agent-message-body h5 {
    margin: 20px 0 10px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--agent-text);
}

.agent-message-body h1 {
    font-size: 1.16rem;
}

.agent-message-body h2 {
    font-size: 1.06rem;
}

.agent-message-body h3 {
    font-size: 0.98rem;
}

.agent-message-body h4,
.agent-message-body h5 {
    font-size: 0.92rem;
}

.agent-message-body ul,
.agent-message-body ol {
    padding-left: 22px;
}

.agent-message-body li + li {
    margin-top: 5px;
}

.agent-message-body li::marker {
    color: var(--agent-text-muted);
}

.agent-message-body strong {
    font-weight: 700;
    color: var(--agent-text);
}

.agent-message-body em {
    font-style: italic;
}

.agent-message-body a {
    color: var(--agent-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.agent-message-body code {
    padding: 1px 6px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--agent-surface-soft) 78%, transparent 22%);
    border: 1px solid var(--agent-hairline);
    font-family: var(--font-mono);
    font-size: 0.84em;
    white-space: break-spaces;
}

.agent-markdown-code {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--agent-hairline);
    background: var(--agent-surface-muted);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.65;
    white-space: pre;
    tab-size: 4;
}

.agent-markdown-code code {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: inherit;
}

.agent-message-body blockquote {
    padding: 8px 14px;
    border-left: 3px solid color-mix(in srgb, var(--agent-accent) 60%, transparent 40%);
    background: color-mix(in srgb, var(--agent-surface-muted) 62%, transparent 38%);
    border-radius: 0 8px 8px 0;
    color: var(--agent-text-secondary);
}

.agent-message-body hr {
    border: 0;
    border-top: 1px solid var(--agent-hairline);
    margin: 18px 0;
}

.agent-markdown-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--agent-border);
}

.agent-markdown-table {
    width: 100%;
    min-width: 360px;
    border-collapse: collapse;
    font-size: 0.84rem;
    background: var(--agent-surface);
}

.agent-markdown-table th,
.agent-markdown-table td {
    padding: 8px 11px;
    border-bottom: 1px solid var(--agent-hairline);
    border-right: 1px solid var(--agent-hairline);
    text-align: left;
    vertical-align: top;
    white-space: normal;
}

.agent-markdown-table th:last-child,
.agent-markdown-table td:last-child {
    border-right: 0;
}

.agent-markdown-table tr:last-child td {
    border-bottom: 0;
}

.agent-markdown-table th {
    font-weight: 700;
    background: var(--agent-surface-muted);
    color: var(--agent-text);
    white-space: nowrap;
}

/* ---------- 待确认执行计划卡片 ---------- */
.agent-plan-card {
    max-width: var(--agent-content-width);
    margin: 0 auto 24px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--agent-accent) 28%, var(--agent-border) 72%);
    border-radius: var(--agent-radius-md);
    background: color-mix(in srgb, var(--agent-accent) 4%, var(--agent-surface) 96%);
}

.agent-plan-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--agent-text);
    margin-bottom: 12px;
}

.agent-plan-head i {
    color: var(--agent-accent);
}

.agent-plan-tools {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.agent-plan-tool {
    border: 1px solid var(--agent-hairline);
    border-radius: 10px;
    background: var(--agent-surface);
    overflow: hidden;
}

.agent-plan-tool-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--agent-hairline);
    font-size: 0.82rem;
    font-weight: 600;
}

.agent-plan-tool-head code {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--agent-accent);
}

.agent-plan-args {
    margin: 0;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    line-height: 1.6;
    color: var(--agent-text-secondary);
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 220px;
    overflow-y: auto;
}

.agent-plan-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- 生成中占位 ---------- */
/* ---------- 上传引导页 ---------- */
.agent-upload-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.agent-upload-stage[hidden] {
    display: none;
}

.agent-upload-card {
    max-width: 460px;
    width: 100%;
    padding: 46px 34px;
    border-radius: 22px;
    border: 1px dashed color-mix(in srgb, var(--agent-border) 86%, var(--agent-accent) 14%);
    background: linear-gradient(180deg, var(--agent-surface-muted), var(--agent-surface));
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.agent-upload-card:hover {
    border-color: color-mix(in srgb, var(--agent-accent) 55%, var(--agent-border) 45%);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.agent-upload-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 20px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--agent-accent) 14%, var(--agent-surface) 86%);
    border: 1px solid color-mix(in srgb, var(--agent-accent) 26%, transparent 74%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--agent-accent);
}

.agent-upload-title {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
}

.agent-upload-subtitle {
    font-size: 0.84rem;
    color: var(--agent-text-secondary);
    margin-bottom: 24px;
    line-height: 1.55;
    word-break: break-word;
}

/* ============================================================
   底部输入区：工程化大输入框
   ============================================================ */
.agent-composer {
    flex-shrink: 0;
    padding: 6px 28px 16px;
    background: var(--agent-surface);
}

.agent-composer[hidden] {
    display: none;
}

.agent-composer-inner {
    position: relative;
    max-width: var(--agent-content-width);
    margin: 0 auto;
}

.agent-composer-box {
    position: relative;
    padding: 14px 16px 10px;
    border: 1px solid var(--agent-border);
    border-radius: var(--agent-radius-lg);
    background: var(--agent-surface-muted);
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.agent-composer-box:focus-within {
    border-color: color-mix(in srgb, var(--agent-accent) 52%, var(--agent-border) 48%);
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--agent-accent) 14%, transparent 86%),
        0 10px 28px rgba(15, 23, 42, 0.08);
}

.agent-message-input {
    display: block;
    width: 100%;
    min-height: 58px;
    max-height: 260px;
    padding: 4px 2px;
    border: none;
    background: transparent;
    color: var(--agent-text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.65;
    resize: none;
    outline: none;
    overflow-y: auto;
}

.agent-message-input::placeholder {
    color: var(--agent-text-muted);
    opacity: 0.85;
}

.agent-message-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.agent-composer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.agent-composer-left,
.agent-composer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.agent-composer-tool {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--agent-border);
    background: var(--agent-surface);
    color: var(--agent-text-secondary);
    font-size: 1rem;
    flex-shrink: 0;
}

.agent-composer-tool:hover,
.agent-composer-tool[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--agent-accent) 48%, var(--agent-border) 52%);
    color: var(--agent-text);
}

/* ---------- 加号弹出菜单 ---------- */
.agent-plus {
    position: relative;
    flex-shrink: 0;
}

.agent-plus-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 60;
    display: none;
    width: 236px;
    padding: 6px;
    border: 1px solid var(--agent-border);
    border-radius: 13px;
    background: var(--agent-surface);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
    transform-origin: bottom left;
}

.agent-plus.is-open .agent-plus-menu {
    display: grid;
    gap: 2px;
    animation: agent-menu-in 0.14s ease-out;
}

.agent-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--agent-text-secondary);
    font: inherit;
    font-size: 0.83rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.13s ease, color 0.13s ease;
}

.agent-menu-item:hover {
    background: var(--agent-surface-muted);
    color: var(--agent-text);
}

.agent-menu-item i {
    width: 16px;
    text-align: center;
    font-size: 0.92rem;
    color: var(--agent-text-muted);
    flex-shrink: 0;
}

.agent-menu-item:hover i {
    color: var(--agent-accent);
}

.agent-menu-item.is-danger {
    color: color-mix(in srgb, #ef4444 82%, var(--agent-text) 18%);
}

.agent-menu-item.is-danger i {
    color: color-mix(in srgb, #ef4444 75%, var(--agent-text-muted) 25%);
}

.agent-menu-item.is-danger:hover {
    background: color-mix(in srgb, #ef4444 10%, var(--agent-surface) 90%);
    color: #ef4444;
}

.agent-menu-sep {
    height: 1px;
    margin: 5px 6px;
    background: var(--agent-hairline);
}

@keyframes agent-menu-in {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 右侧以当前强度和小三角呈现入口，展开菜单只展示档位。 */
.agent-reasoning {
    position: relative;
    flex-shrink: 0;
}

.agent-reasoning-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: var(--agent-text-secondary);
    font: inherit;
    font-size: .78rem;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s ease;
}

.agent-reasoning-trigger:hover,
.agent-reasoning-trigger[aria-expanded="true"] { color: var(--agent-accent); }
.agent-reasoning-trigger:disabled { cursor: default; opacity: .45; }
.agent-reasoning-trigger:focus-visible {
    outline: 2px solid var(--agent-accent);
    outline-offset: 2px;
}

.agent-reasoning-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform .15s ease;
}
.agent-reasoning-trigger[aria-expanded="true"] .agent-reasoning-caret { transform: rotate(180deg); }

.agent-reasoning-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    z-index: 60;
    width: 152px;
    max-width: calc(100vw - 32px);
    padding: 5px;
    border: 1px solid var(--agent-border);
    border-radius: 12px;
    background: var(--agent-surface);
    box-shadow: 0 12px 36px rgba(15, 23, 42, .16);
    animation: agent-menu-in .14s ease-out;
}
.agent-reasoning-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--agent-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.agent-reasoning-option strong { font-size: .82rem; font-weight: 600; }
.agent-reasoning-option > i { color: var(--agent-accent); opacity: 0; font-size: 1rem; }
.agent-reasoning-option[aria-checked="true"] > i { opacity: 1; }
.agent-reasoning-option[aria-checked="true"] { background: color-mix(in srgb, var(--agent-accent) 8%, transparent); }
.agent-reasoning-option:hover,
.agent-reasoning-option:focus-visible { background: var(--agent-surface-muted); outline: none; }
.agent-reasoning-retry { margin: 5px 7px; padding: 3px 0; border: 0; background: transparent; color: var(--agent-accent); font: inherit; font-size: .72rem; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
    .agent-reasoning-menu { animation: none; }
    .agent-reasoning-caret { transition: none; }
}

/* ---------- 执行方式下拉 ---------- */
.agent-execution {
    position: relative;
    flex-shrink: 0;
}

.agent-execution-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 11px;
    border: 1px solid var(--agent-border);
    border-radius: 999px;
    background: var(--agent-surface);
    color: var(--agent-text-secondary);
    font: inherit;
    font-size: 0.78rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.agent-execution-btn > i:first-child {
    color: var(--agent-accent);
    font-size: 0.84rem;
}

.agent-execution-btn:hover,
.agent-execution-btn[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--agent-accent) 46%, var(--agent-border) 54%);
    color: var(--agent-text);
}

.agent-execution-chevron {
    font-size: 0.64rem;
    opacity: 0.7;
}

.agent-execution-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 60;
    display: none;
    width: 258px;
    padding: 6px;
    border: 1px solid var(--agent-border);
    border-radius: 13px;
    background: var(--agent-surface);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
}

.agent-execution.is-open .agent-execution-menu {
    display: grid;
    gap: 2px;
    animation: agent-menu-in 0.14s ease-out;
}

.agent-execution-head {
    padding: 6px 10px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--agent-text-muted);
}

.agent-execution-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--agent-text-secondary);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.13s ease;
}

.agent-execution-option:hover {
    background: var(--agent-surface-muted);
}

.agent-execution-option > i {
    margin-top: 2px;
    font-size: 0.92rem;
    color: var(--agent-text-muted);
}

.agent-execution-option.is-active {
    background: color-mix(in srgb, var(--agent-accent) 9%, var(--agent-surface) 91%);
}

.agent-execution-option.is-active > i,
.agent-execution-option.is-active strong {
    color: var(--agent-text);
}

.agent-execution-option.is-active > i {
    color: var(--agent-accent);
}

.agent-execution-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.agent-execution-copy strong {
    font-size: 0.82rem;
    font-weight: 600;
    color: inherit;
}

.agent-execution-copy small {
    font-size: 0.72rem;
    color: var(--agent-text-muted);
    line-height: 1.4;
}

.agent-composer-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--agent-text);
    color: var(--agent-surface);
    font-size: 1rem;
    flex-shrink: 0;
}

.agent-composer-send:hover:not(:disabled) {
    transform: translateY(-1px);
    opacity: 0.92;
}

.agent-composer-stop {
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, #ef4444 45%, var(--agent-border) 55%);
    background: color-mix(in srgb, #ef4444 8%, var(--agent-surface) 92%);
    color: #ef4444;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.agent-composer-stop:hover:not(:disabled) {
    background: color-mix(in srgb, #ef4444 16%, var(--agent-surface) 84%);
}

.agent-composer-stop:disabled, .agent-execution-btn:disabled { cursor: default; opacity: .65; }

.agent-composer-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 8px;
    min-height: 18px;
    font-size: 0.72rem;
    color: var(--agent-text-muted);
}

/* 上下文按钮保持紧凑，详细分项仅在用户展开时显示。 */
.agent-context { margin-left: auto; flex-shrink: 0; color: var(--agent-text-muted, #777f8e); }
.agent-context summary { display: flex; align-items: center; gap: 6px; padding: 4px 8px; cursor: pointer; border-radius: 8px; list-style: none; }
.agent-context summary::-webkit-details-marker { display: none; }
.agent-context summary:hover, .agent-context[open] summary { background: var(--agent-surface-muted); }
.agent-context-ring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(#8194ad var(--context-percent, 0%), #dfe3e9 0); position: relative; }
.agent-context-ring::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--agent-surface); }
.agent-context-popover { position: absolute; bottom: calc(100% + 10px); right: 0; width: min(380px, calc(100vw - 42px)); padding: 19px 20px; border: 1px solid var(--agent-border, #e1e5eb); border-radius: 18px; background: var(--agent-surface); box-shadow: 0 8px 28px #00000016; color: var(--agent-text, #303641); z-index: 20; text-align: left; font-size: 13px; }
.agent-context-heading, .agent-context-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* 分类账单增加后限制弹层高度，确保小屏幕仍能滚动查看完整明细。 */
.agent-context-popover { max-height: min(65vh, 600px); overflow-y: auto; overscroll-behavior: contain; }
.agent-context-heading { font-size: 14px; flex-wrap: wrap; }
.agent-context-bar { display: flex; height: 6px; border-radius: 5px; background: #edf0f3; overflow: hidden; margin: 16px 0 9px; }
.agent-context-remaining { color: var(--agent-text-muted, #777f8e); font-size: 12px; margin-bottom: 13px; }
.agent-context-row { margin: 9px 0; }
.agent-context-row i { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 2px; }
.agent-context .context-system { background: #aab0ba; }
.agent-context .context-tools { background: #a686ff; }
.agent-context .context-messages { background: #638eff; }
.agent-context .context-images { background: #65bda7; }
.agent-context .context-output { background: #e8af63; }
.agent-context-popover p { font-size: 11px; line-height: 1.6; color: var(--agent-text-muted, #777f8e); margin: 14px 0 0; }
.agent-comparison-cost { padding: 10px 12px; border-radius: 8px; background: var(--agent-surface-muted); font-weight: 600; }
.agent-comparison-specs { padding-left: 28px; margin: 12px; }
.agent-comparison-specs li { padding: 5px 0; }
.agent-comparison-specs small { display: block; color: var(--agent-text-muted); font-weight: 400; }
.agent-plan-parameters { padding: 10px 12px; }
.agent-plan-parameters summary { cursor: pointer; color: var(--agent-text-muted); font-size: 12px; }
[data-bs-theme="dark"] .agent-context-popover, [data-bs-theme="dark"] .agent-context-ring::after { background: #21252c; color: #e3e7ef; }
[data-bs-theme="dark"] .agent-context summary:hover, [data-bs-theme="dark"] .agent-context[open] summary, [data-bs-theme="dark"] .agent-comparison-cost { background: #303640; }

.agent-composer-hint,
.agent-upload-status {
    overflow-wrap: anywhere;
}

.agent-upload-status {
    display: none;
    color: color-mix(in srgb, var(--agent-accent) 78%, var(--agent-text) 22%);
    font-weight: 500;
}

.agent-upload-status:not(:empty) {
    display: inline-block;
}

/* ============================================================
   右侧信息面板
   ============================================================ */
.agent-info-panel {
    display: flex;
    flex-direction: column;
    width: var(--agent-panel-width);
    flex-shrink: 0;
    background: var(--agent-surface-muted);
    border-left: 1px solid var(--agent-hairline);
}

.agent-shell.is-info-collapsed .agent-info-panel,
.agent-shell.is-info-collapsed #agent-info-resize {
    display: none;
}

.agent-info-tabs {
    display: flex;
    gap: 2px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--agent-hairline);
    flex-shrink: 0;
}

.agent-info-tab {
    flex: 1;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--agent-text-secondary);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.agent-info-tab:hover {
    color: var(--agent-text);
    background: color-mix(in srgb, var(--agent-surface) 62%, transparent 38%);
}

.agent-info-tab.is-active {
    background: var(--agent-surface);
    color: var(--agent-text);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.agent-info-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

.agent-info-section {
    display: none;
}

.agent-info-section.is-active {
    display: block;
}

.agent-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.agent-panel-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--agent-text);
    letter-spacing: 0.01em;
}

.agent-panel-tip {
    margin: 10px 0 0;
    font-size: 0.74rem;
    line-height: 1.6;
    color: var(--agent-text-muted);
}

/* ---------- 数据集摘要卡 ---------- */
.agent-snapshot-summary {
    font-size: 0.82rem;
    color: var(--agent-text-secondary);
    line-height: 1.6;
}

.agent-dataset-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 1px solid var(--agent-border);
    border-radius: 13px;
    background: var(--agent-surface);
}

.agent-dataset-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--agent-accent) 13%, var(--agent-surface) 87%);
    border: 1px solid color-mix(in srgb, var(--agent-accent) 22%, transparent 78%);
    color: var(--agent-accent);
    font-size: 1.05rem;
}

.agent-dataset-info {
    min-width: 0;
    flex: 1;
}

.agent-dataset-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--agent-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-dataset-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: 4px;
    font-size: 0.73rem;
    color: var(--agent-text-muted);
}

.agent-dataset-meta b {
    font-weight: 600;
    color: var(--agent-text-secondary);
    font-variant-numeric: tabular-nums;
}

.agent-dataset-download {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--agent-border);
    background: var(--agent-surface-muted);
    color: var(--agent-text-secondary);
    font-size: 0.86rem;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.agent-dataset-download:hover {
    color: var(--agent-accent);
    border-color: color-mix(in srgb, var(--agent-accent) 45%, var(--agent-border) 55%);
}

.agent-dataset-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.agent-dataset-doc {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--agent-hairline);
    background: var(--agent-surface);
    color: var(--agent-text-secondary);
    font-size: 0.73rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-dataset-doc i {
    color: var(--agent-text-muted);
    font-size: 0.76rem;
}

.agent-snapshot-empty {
    padding: 26px 14px;
    border: 1px dashed var(--agent-border);
    border-radius: 13px;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--agent-text-muted);
}

.agent-snapshot-empty i {
    display: block;
    margin-bottom: 8px;
    font-size: 1.3rem;
    opacity: 0.7;
}

/* ---------- 变量搜索 ---------- */
.agent-column-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 10px;
}

.agent-column-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--agent-border);
    border-radius: 9px;
    background: var(--agent-surface);
    color: var(--agent-text-muted);
}

.agent-column-search:focus-within {
    border-color: color-mix(in srgb, var(--agent-accent) 48%, var(--agent-border) 52%);
}

.agent-column-search i {
    font-size: 0.78rem;
    flex-shrink: 0;
}

.agent-column-search input {
    width: 100%;
    min-width: 0;
    margin-left: 7px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--agent-text);
    font: inherit;
    font-size: 0.78rem;
    outline: none;
}

.agent-column-search input::placeholder {
    color: var(--agent-text-muted);
}

.agent-column-search input::-webkit-search-cancel-button {
    filter: grayscale(1);
    opacity: 0.6;
}

.agent-column-count {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--agent-text-muted);
    font-variant-numeric: tabular-nums;
}

/* ---------- 变量紧凑列表 ---------- */
.agent-column-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--agent-border);
    border-radius: 12px;
    background: var(--agent-surface);
    overflow: hidden;
}

.agent-column-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 11px;
    border: 0;
    border-bottom: 1px solid var(--agent-hairline);
    border-radius: 0;
    background: transparent;
    color: var(--agent-text);
    font: inherit;
    text-align: left;
    cursor: default;
    transition: background 0.12s ease;
}

.agent-column-row:last-child {
    border-bottom: 0;
}

.agent-column-row:hover,
.agent-column-row:focus-visible {
    background: var(--agent-surface-muted);
}

.agent-column-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.agent-column-type {
    flex-shrink: 0;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--agent-surface-soft);
    border: 1px solid var(--agent-hairline);
    color: var(--agent-text-muted);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    line-height: 1.5;
    white-space: nowrap;
}

.agent-column-empty {
    padding: 20px 10px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--agent-text-muted);
}

/* ---------- 变量标签浮层 ---------- */
.agent-column-tooltip {
    --agent-tooltip-bg: var(--bg-elevated);
    zoom: var(--agent-zoom, 1);
    position: fixed;
    z-index: 1200;
    width: 258px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--agent-tooltip-bg);
    color: var(--text-primary);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
    pointer-events: none;
    opacity: 0;
    transform: translateY(3px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

/* 浮层小箭头：指向当前悬停的变量行，建立视觉关联。 */
.agent-column-tooltip::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    background: var(--agent-tooltip-bg);
    transform: rotate(45deg);
}

.agent-column-tooltip.is-left::after {
    right: -4px;
    top: 18px;
}

.agent-column-tooltip.is-right::after {
    left: -4px;
    top: 18px;
}

.agent-column-tooltip.is-below::after {
    top: -4px;
    left: 18px;
}

.agent-column-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.agent-tooltip-label {
    margin-bottom: 9px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.agent-tooltip-label.is-empty {
    font-weight: 500;
    font-style: italic;
    color: var(--text-muted);
}

.agent-tooltip-meta {
    display: grid;
    gap: 6px;
    margin: 0;
}

.agent-tooltip-meta > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.agent-tooltip-meta dt {
    flex-shrink: 0;
    margin: 0;
    font-size: 0.74rem;
    font-weight: 400;
    color: var(--text-muted);
}

.agent-tooltip-meta dd {
    margin: 0;
    min-width: 0;
    font-size: 0.76rem;
    color: var(--text-secondary);
    text-align: right;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

/* ---------- 分析结果 / 导出 / 额度 ---------- */
.agent-result-tabs,
.agent-export-list {
    display: grid;
    gap: 10px;
}

.agent-result-item {
    border: 1px solid var(--agent-border);
    border-radius: 12px;
    background: var(--agent-surface);
    overflow: hidden;
}

.agent-result-item > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--agent-text);
}

.agent-result-item > summary::-webkit-details-marker {
    display: none;
}

.agent-result-item > summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    font-size: 0.7rem;
    color: var(--agent-text-muted);
    transition: transform 0.15s ease;
}

.agent-result-item[open] > summary {
    border-bottom: 1px solid var(--agent-hairline);
}

.agent-result-item[open] > summary::after {
    transform: rotate(180deg);
}

.agent-result-frame {
    display: block;
    width: 100%;
    height: 380px;
    border: 0;
    background: #fff;
}

.agent-result-empty,
.agent-export-empty {
    padding: 20px 14px;
    border: 1px dashed var(--agent-border);
    border-radius: 12px;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--agent-text-muted);
}

.agent-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.agent-export-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--agent-border);
    border-radius: 11px;
    background: var(--agent-surface);
    text-decoration: none;
    color: var(--agent-text);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.agent-export-item:hover {
    border-color: color-mix(in srgb, var(--agent-accent) 40%, var(--agent-border) 60%);
    background: color-mix(in srgb, var(--agent-surface-muted) 55%, var(--agent-surface) 45%);
}

.agent-export-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--agent-surface-muted);
    color: var(--agent-text-secondary);
    font-size: 0.92rem;
}

.agent-export-info {
    min-width: 0;
    flex: 1;
}

.agent-export-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-export-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.7rem;
    color: var(--agent-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.agent-export-item > i:last-child {
    color: var(--agent-text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ============================================================
   侧栏收起状态
   ============================================================ */
.agent-shell.is-sidebar-collapsed .agent-sidebar {
    width: 64px;
    overflow: hidden;
}

.agent-shell.is-sidebar-collapsed .agent-sidebar {
    overflow: visible;
}

.agent-shell.is-sidebar-collapsed .agent-brand-text,
.agent-shell.is-sidebar-collapsed .agent-session-title,
.agent-shell.is-sidebar-collapsed .agent-session-icon,
.agent-shell.is-sidebar-collapsed .agent-session-time,
.agent-shell.is-sidebar-collapsed .agent-profile-text,
.agent-shell.is-sidebar-collapsed .agent-profile-chevron,
.agent-shell.is-sidebar-collapsed .agent-session-empty {
    display: none;
}

.agent-shell.is-sidebar-collapsed .agent-sidebar-head {
    justify-content: center;
    padding-inline: 8px;
}

.agent-shell.is-sidebar-collapsed .agent-sidebar-head .agent-icon-btn {
    display: none;
}

.agent-shell.is-sidebar-collapsed .agent-session-list {
    padding-inline: 8px;
}

.agent-shell.is-sidebar-collapsed .agent-session-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
}

.agent-shell.is-sidebar-collapsed .agent-session-item.is-active::before {
    display: none;
}

.agent-shell.is-sidebar-collapsed .agent-session-title {
    display: block;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--agent-surface-soft);
    color: var(--agent-text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    line-height: 28px;
    overflow: hidden;
    white-space: nowrap;
}

.agent-shell.is-sidebar-collapsed .agent-profile-trigger {
    justify-content: center;
    padding: 8px 6px;
}

.agent-shell.is-sidebar-collapsed .agent-profile-menu {
    left: calc(100% + 10px);
    bottom: 0;
    width: 268px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
    .agent-shell {
        --agent-content-width: 100%;
        --agent-panel-width: 316px;
    }

    .agent-messages {
        padding: 22px 20px 14px;
    }

    .agent-composer {
        padding-inline: 20px;
    }
}

@media (max-width: 900px) {
    .agent-shell {
        --agent-sidebar-width: 232px;
        --agent-panel-width: 296px;
    }

    .agent-chat-stage {
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .agent-info-panel {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 40;
        width: min(320px, 86vw);
        box-shadow: -12px 0 34px rgba(15, 23, 42, 0.16);
    }

    .agent-resize-handle#agent-info-resize {
        display: none;
    }

    .agent-shell {
        position: relative;
    }

    .agent-sidebar {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 45;
        width: min(280px, 84vw);
        box-shadow: 12px 0 34px rgba(15, 23, 42, 0.16);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .agent-shell:not(.is-sidebar-collapsed) .agent-sidebar {
        transform: translateX(0);
    }

    .agent-resize-handle#agent-sidebar-resize {
        display: none;
    }

    .agent-header {
        height: 54px;
        padding-inline: 10px;
        gap: 8px;
    }

    .agent-header-title {
        font-size: 0.88rem;
    }

    .agent-messages {
        padding: 16px 14px 12px;
    }

    .agent-message {
        margin-bottom: 18px;
        gap: 9px;
    }

    .agent-message-bubble {
        max-width: 88%;
    }

    .agent-composer {
        padding: 4px 10px 10px;
    }

    .agent-composer-box {
        padding: 12px 12px 8px;
        border-radius: 16px;
    }

    .agent-message-input {
        min-height: 48px;
        font-size: 0.92rem;
    }

    .agent-composer-footer {
        font-size: 0.68rem;
    }

    .agent-plus-menu {
        width: min(236px, 72vw);
    }

    .agent-execution-menu {
        width: min(258px, 78vw);
    }
}

@media (max-width: 480px) {
    .agent-composer-left {
        gap: 6px;
    }

    .agent-composer-tool {
        width: 30px;
        height: 30px;
    }

    .agent-execution-btn {
        padding: 0 9px;
        font-size: 0.74rem;
    }

    .agent-header-subtitle {
        display: none;
    }
}

/* ============================================================
   执行过程时间线：默认整体收起，点击摘要后展开实时详情
   ============================================================ */
.agent-run-details {
    /* 与最终回复共用居中正文轨道，避免宽屏下固定缩进把过程头像拉到外侧。 */
    --agent-process-indent: 42px;
    max-width: var(--agent-content-width);
    margin: 4px auto 12px;
    color: var(--agent-text-secondary);
}


.agent-final-summary .agent-message-content {
    border-top: 1px solid var(--agent-hairline);
    padding-top: 16px;
}

/* 每个新词段只播放一次；旧文字节点在增量更新中保留，避免整段反复闪动。 */
.agent-stream-token.is-revealing {
    animation: agent-word-reveal 360ms cubic-bezier(.22, 1, .36, 1) both;
    will-change: opacity, filter;
}

@keyframes agent-word-reveal {
    from { opacity: 0; filter: blur(4px); }
    to { opacity: 1; filter: blur(0); }
}

.agent-run-archive {
    --agent-process-indent: 42px;
    max-width: var(--agent-content-width);
    margin: 4px auto 12px;
    color: var(--agent-text-secondary);
}
.agent-run-archive[open] > .agent-run-summary > i.bi-chevron-right { transform: rotate(90deg); }
.agent-run-archive-body { padding-top: 8px; }

@media (prefers-reduced-motion: reduce) {
    .agent-stream-token.is-revealing { animation: none; opacity: 1; filter: none; will-change: auto; }
}

.agent-run-summary {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 0 8px var(--agent-process-indent);
    list-style: none;
    cursor: pointer;
    font-size: 0.85rem;
    overflow: hidden;
}

.agent-run-summary::-webkit-details-marker {
    display: none;
}

.agent-run-summary > i {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--agent-text-muted);
    transition: transform 0.15s ease;
}

.agent-run-details[open] > .agent-run-summary > i.bi-chevron-right {
    transform: rotate(90deg);
}

.agent-run-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--agent-text-secondary);
}

.agent-run-body {
    padding: 2px 0 2px;
}

/* 高亮仅扫过字形，背景和展开箭头保持静止；不另设旋转加载图标。 */
@supports (background-clip: text) or (-webkit-background-clip: text) {
    .agent-run-details.is-running > .agent-run-summary > .agent-run-title {
        background-image: linear-gradient(100deg,
            var(--agent-text-muted) 35%,
            var(--agent-text) 50%,
            var(--agent-text-muted) 65%);
        background-size: 250% 100%;
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        animation: agent-text-shimmer 2.2s linear infinite;
    }
}

@keyframes agent-text-shimmer {
    from {
        background-position: 150% 0;
    }
    to {
        background-position: -150% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .agent-run-details.is-running > .agent-run-summary > .agent-run-title {
        animation: none;
        background: none;
        color: var(--agent-text-secondary);
    }
}

/* 每片过程仅收纳连续工具批次，模型回复在片段之间独立展示。 */
.agent-run-process {
    padding: 6px 0 0;
}

@media (max-width: 768px) {
    .agent-run-details, .agent-run-archive {
        /* 头像宽 30px，窄屏消息间距为 9px。 */
        --agent-process-indent: 39px;
    }
}

.agent-tool-batch {
    margin: 2px 0 10px var(--agent-process-indent);
    font-size: 0.8rem;
}

.agent-tool-batch-summary,
.agent-tool-detail > summary {
    display: flex;
    align-items: center;
    gap: 9px;
    list-style: none;
    cursor: pointer;
    border-radius: 9px;
    transition: background 0.13s ease;
}

.agent-tool-batch-summary {
    padding: 3px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--agent-text-secondary);
}

.agent-tool-batch-summary::-webkit-details-marker,
.agent-tool-detail > summary::-webkit-details-marker {
    display: none;
}

.agent-tool-batch-summary:hover,
.agent-tool-detail > summary:hover {
    color: var(--agent-text);
}

.agent-tool-batch-summary > i {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--agent-text-muted);
}

.agent-tool-batch.is-running > .agent-tool-batch-summary > i {
    color: var(--accent-primary);
}

.agent-tool-batch .is-spinning {
    animation: agent-tool-spin 1.2s linear infinite;
}

.agent-tool-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
}

.agent-tool-live {
    margin-left: 4px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
    font-size: 0.73rem;
    color: color-mix(in srgb, var(--accent-primary) 72%, var(--agent-text) 28%);
}

.agent-tool-status {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--agent-text-muted);
}

.agent-tool-batch.is-failed .agent-tool-status {
    color: #d94848;
}

.agent-tool-batch.is-failed > .agent-tool-batch-summary > i,
.agent-tool-item.is-failed .agent-tool-detail > summary > i,
.agent-tool-item.is-failed .agent-tool-status {
    color: #d94848;
}

.agent-tool-batch-body {
    margin: 4px 0 0 12px;
    padding-left: 12px;
    border-left: 1px solid var(--agent-hairline);
}

.agent-tool-batch.is-single > .agent-tool-batch-body {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
}

.agent-tool-item {
    margin: 2px 0;
}

.agent-tool-detail {
    font-size: 0.78rem;
}

.agent-tool-detail > summary {
    padding: 5px 8px;
}

.agent-tool-detail-body {
    padding: 0 8px 6px;
}

.agent-tool-args,
.agent-tool-result {
    margin: 8px 0 0;
    max-height: 240px;
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid var(--agent-hairline);
    border-radius: 9px;
    background: var(--bg-primary);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--agent-text-secondary);
}

.agent-tool-result {
    border-color: color-mix(in srgb, var(--accent-primary) 18%, var(--agent-hairline) 82%);
}

.agent-tool-progress {
    font-size: 0.75rem;
    color: var(--agent-text-secondary);
}

.agent-tool-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--accent-primary);
}

/* 任务框脱离输入区文档流，仅自身遮挡聊天内容，两侧仍可阅读、点击和滚动。 */
.agent-plan-dock {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 7;
    width: max-content;
    max-width: 100%;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}
.agent-plan-dock[open] { width: min(440px, 100%); }
.agent-plan-dock[hidden] { display: none; }
.agent-plan-dock > summary { display: flex; align-items: center; gap: 8px; padding: 8px 14px; list-style: none; cursor: pointer; font-size: 13px; }
.agent-plan-dock > summary::-webkit-details-marker { display: none; }
.agent-plan-dock > summary > span { color: var(--text-secondary); }
.agent-plan-dock > summary > i:last-child { margin-left: auto; transition: transform .15s; }
.agent-plan-dock[open] > summary > i:last-child { transform: rotate(180deg); }
.agent-plan-dock ol { margin: 0; padding: 0 16px 12px; max-height: 210px; overflow: auto; list-style: none; }
.agent-plan-dock li { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; color: var(--text-secondary); font-size: 13px; }
.agent-plan-dock li > i { flex: 0 0 14px; }
.agent-plan-dock li > span { min-width: 0; overflow-wrap: anywhere; }
.agent-plan-dock li.is-done > span { text-decoration: line-through; opacity: .7; }
.agent-plan-dock li.is-done > i { color: #16a085; }
.agent-plan-dock li.is-current { color: var(--text-primary); }
.agent-plan-dock li.is-current > i { animation: agent-tool-spin 1.2s linear infinite; }

@media (max-width: 768px) {
    .agent-profile-menu {
        width: min(276px, calc(100vw - 40px));
    }
}

/* 尊重系统减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    .agent-shell *,
    .agent-column-tooltip {
        animation-duration: 0.001s !important;
        transition-duration: 0.001s !important;
    }
}
