/* ========== AI超级指挥台 v3.0 全局样式 ========== */
* { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; overflow:hidden; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif; background:#f0f2f5; color:#333; font-size:14px; }

/* ========== 布局 ========== */
.layout { display:flex; height:100vh; overflow:hidden; }

/* 左侧导航 - 加宽显示文字，始终固定不隐藏 */
.sidebar { width:160px; min-width:120px; background:#1a1d29; color:#fff; flex-shrink:0; display:flex; flex-direction:column; padding:12px 8px; z-index:100; position:relative; }
.sidebar-resizer { width:5px; flex-shrink:0; background:transparent; cursor:col-resize; position:relative; z-index:101; transition:background .2s; }
.sidebar-resizer:hover, .sidebar-resizer.active { background:#4f6ef7; }
.sidebar-logo { width:100%; height:48px; border-radius:10px; background:linear-gradient(135deg,#4f6ef7,#764ba2); display:flex; align-items:center; justify-content:center; gap:8px; font-size:16px; font-weight:600; margin-bottom:16px; cursor:pointer; transition:opacity .2s; }
.sidebar-logo:hover { opacity:.85; }
.sidebar-logo .logo-icon { font-size:22px; }
.nav-item { width:100%; height:44px; border-radius:10px; display:flex; align-items:center; gap:10px; padding:0 14px; cursor:pointer; transition:all .2s; color:#8b8fa3; margin-bottom:4px; font-size:13px; white-space:nowrap; }
.nav-item:hover { background:#2a2d3a; color:#fff; }
.nav-item.active { background:#4f6ef7; color:#fff; }
.nav-item .nav-icon { font-size:20px; flex-shrink:0; }
.nav-item .nav-text { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-spacer { flex:1; }
.sidebar-status { width:100%; height:44px; border-radius:10px; background:#2a2d3a; display:flex; align-items:center; gap:10px; padding:0 14px; cursor:pointer; transition:background .2s; font-size:13px; color:#8b8fa3; }
.sidebar-status:hover { background:#3a3d4a; color:#fff; }
.sidebar-status .status-icon { font-size:18px; }
.sidebar-status .status-dot { width:8px; height:8px; border-radius:50%; background:#52c41a; margin-left:auto; }

/* 中栏：智能体列表 */
.agent-panel { width:220px; background:#fff; border-right:1px solid #e8e8e8; display:flex; flex-direction:column; flex-shrink:0; transition:margin-left .2s; }
.agent-panel.hidden { display:none !important; width:0 !important; min-width:0 !important; overflow:hidden !important; border:none !important; padding:0 !important; }
.agent-panel-header { padding:14px 16px; border-bottom:1px solid #f0f0f0; }
.agent-panel-header h2 { font-size:15px; font-weight:600; }
.agent-panel-header .subtitle { font-size:11px; color:#8c8c8c; margin-top:2px; }
.agent-panel-stats { display:flex; gap:6px; margin-top:6px; flex-wrap:wrap; }
.agent-panel-stats .aps-item { font-size:10px; color:#4f6ef7; background:#f0f5ff; padding:2px 8px; border-radius:10px; white-space:nowrap; }
.agent-search { padding:8px 12px; border-bottom:1px solid #f0f0f0; }
.agent-search input { width:100%; padding:6px 10px; border:1px solid #e8e8e8; border-radius:6px; font-size:12px; outline:none; }
.agent-search input:focus { border-color:#4f6ef7; }
.agent-list { flex:1; overflow-y:auto; }
.agent-item { display:flex; align-items:center; padding:10px 14px; cursor:pointer; transition:all .15s; border-bottom:1px solid #fafafa; }
.agent-item:hover { background:#f5f7ff; }
.agent-item.active { background:#eef2ff; border-left:3px solid #4f6ef7; }
.agent-avatar { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:18px; margin-right:10px; flex-shrink:0; overflow:hidden; }
.agent-avatar img { width:100%; height:100%; object-fit:contain; }
.agent-info { flex:1; min-width:0; }
.agent-name { font-size:13px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.agent-role { font-size:11px; color:#8c8c8c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.agent-status { font-size:11px; display:flex; align-items:center; gap:4px; color:#8c8c8c; margin-top:2px; }
.agent-status .status-dot { width:6px; height:6px; border-radius:50%; display:inline-block; flex-shrink:0; }
.agent-status .status-dot.online { background:#52c41a; }
.agent-status .status-dot.busy { background:#faad14; }
.agent-status .status-dot.thinking { background:#1890ff; animation:pulse 1.5s infinite; }
.agent-status .status-dot.executing { background:#fa8c16; animation:pulse 1.5s infinite; }
.agent-status .status-dot.offline { background:#d9d9d9; }
.agent-status-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.agent-status-dot.online { background:#52c41a; }
.agent-status-dot.busy { background:#faad14; }
.agent-status-dot.offline { background:#d9d9d9; }
.agent-status-dot.thinking { background:#1890ff; animation:pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }

/* 主内容区 */
.main { flex:1; display:flex; flex-direction:column; min-width:0; overflow:hidden; }
.page { display:none; flex:1; overflow-y:auto; flex-direction:column; }
.page.active { display:flex; }

/* ========== 聊天页 ========== */
.chat-layout { display:flex; flex:1; overflow:hidden; }
.chat-area { flex:1; display:flex; flex-direction:column; min-width:0; background:#f7f8fa; }
.chat-header { padding:12px 20px; background:#fff; border-bottom:1px solid #e8e8e8; display:flex; align-items:center; gap:10px; flex-shrink:0; }
.chat-header .agent-avatar { width:36px; height:36px; font-size:18px; }
.chat-header-info { flex:1; }
.chat-header-name { font-size:15px; font-weight:600; }
.chat-header-desc { font-size:12px; color:#8c8c8c; }
.chat-header-stats { font-size:11px; color:#4f6ef7; margin-top:2px; display:flex; gap:8px; }
.chat-header-stats .stat-item { background:#f0f5ff; padding:1px 8px; border-radius:10px; }
.quick-actions { display:flex; gap:8px; padding:0 0 8px; flex-wrap:wrap; }
.quick-action-btn { background:#f5f7fa; border:1px solid #e8e8e8; border-radius:16px; padding:4px 14px; font-size:12px; cursor:pointer; color:#666; transition:all .2s; white-space:nowrap; }
.quick-action-btn:hover { background:#4f6ef7; color:#fff; border-color:#4f6ef7; }
.msg-time { font-size:10px; color:#bbb; margin-top:4px; text-align:right; }
.chat-header-actions { display:flex; gap:8px; }
.chat-header-btn { padding:6px 12px; border-radius:6px; border:1px solid #e8e8e8; background:#fff; cursor:pointer; font-size:12px; }
.chat-header-btn:hover { border-color:#4f6ef7; color:#4f6ef7; }

.chat-messages { flex:1; overflow-y:auto; padding:20px; }
.msg { display:flex; margin-bottom:16px; gap:10px; max-width:85%; }
.msg.user { flex-direction:row-reverse; margin-left:auto; }
.msg-avatar { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
.msg-bubble { padding:12px 16px; border-radius:12px; font-size:14px; line-height:1.8; word-break:break-word; white-space:pre-wrap; }
.msg.agent .msg-bubble { background:#fff; border:1px solid #e8e8e8; border-top-left-radius:4px; }
.msg.user .msg-bubble { background:#4f6ef7; color:#fff; border-top-right-radius:4px; }
.msg-bubble p { margin:0 0 10px; }
.msg-bubble p:last-child { margin-bottom:0; }
.msg-bubble h1,.msg-bubble h2,.msg-bubble h3 { margin:14px 0 8px; font-weight:600; }
.msg-bubble h1 { font-size:20px; } .msg-bubble h2 { font-size:17px; } .msg-bubble h3 { font-size:15px; }
.msg-bubble ul,.msg-bubble ol { margin:8px 0 8px 22px; }
.msg-bubble li { margin:4px 0; }
.msg-bubble code { background:#f0f0f0; padding:2px 6px; border-radius:4px; font-size:13px; font-family:'SF Mono',Consolas,monospace; }
.msg-bubble pre { background:#1e1e2e; color:#cdd6f4; padding:14px; border-radius:10px; overflow-x:auto; margin:10px 0; line-height:1.5; }
.msg-bubble pre code { background:none; padding:0; color:inherit; font-size:13px; }
.msg-bubble img { max-width:100%; border-radius:8px; margin:8px 0; }
.msg-bubble blockquote { border-left:3px solid #4f6ef7; padding-left:12px; color:#666; margin:10px 0; }
.msg-bubble table { border-collapse:collapse; margin:10px 0; width:100%; }
.msg-bubble th,.msg-bubble td { border:1px solid #e8e8e8; padding:8px 12px; font-size:13px; text-align:left; }
.msg-bubble th { background:#fafafa; font-weight:600; }
.msg-bubble a { color:#4f6ef7; text-decoration:none; }
.msg-bubble a:hover { text-decoration:underline; }
.msg-bubble hr { border:none; border-top:1px solid #e8e8e8; margin:12px 0; }
.msg.user .msg-bubble code { background:rgba(255,255,255,.2); }
.msg.user .msg-bubble pre { background:rgba(0,0,0,.25); }
.msg.user .msg-bubble a { color:#fff; text-decoration:underline; }
.msg-image { max-width:300px; max-height:200px; border-radius:8px; margin:4px 0; cursor:pointer; }
.msg-time { font-size:11px; color:#bbb; margin-top:6px; }
.msg-footer { display:flex; align-items:center; gap:8px; margin-top:4px; }
.msg-footer .msg-time { margin-top:0; }
.msg-copy-btn { background:none; border:1px solid #e8e8e8; border-radius:4px; padding:1px 8px; font-size:11px; color:#999; cursor:pointer; transition:all .2s; }
.msg-copy-btn:hover { color:#4f6ef7; border-color:#4f6ef7; background:#f5f7ff; }
.msg .msg-bubble { user-select:text; -webkit-user-select:text; cursor:text; }

/* 结构化消息卡片 */
.structured-card { margin:8px 0; border-radius:10px; overflow:hidden; border:1px solid #e8e8e8; }
.card-task { background:#fff; }
.card-task-header { padding:10px 14px; background:#f8f9ff; display:flex; align-items:center; gap:8px; border-bottom:1px solid #eef0fa; }
.card-task-title { font-weight:600; font-size:13px; flex:1; }
.card-task-status { padding:2px 10px; border-radius:10px; font-size:11px; }
.card-task-status.running { background:#e6f7ff; color:#1890ff; }
.card-task-status.completed { background:#f6ffed; color:#52c41a; }
.card-task-status.stuck { background:#fff2f0; color:#ff4d4f; }
.card-task-status.pending { background:#f5f5f5; color:#999; }
.card-task-body { padding:10px 14px; font-size:13px; }
.card-progress { height:6px; background:#f0f0f0; border-radius:3px; overflow:hidden; margin-top:8px; }
.card-progress-bar { height:100%; background:#4f6ef7; border-radius:3px; transition:width .3s; }

.card-output { background:#fff; padding:12px 14px; display:flex; align-items:center; gap:10px; }
.card-output-icon { width:40px; height:40px; border-radius:8px; background:#f0f5ff; display:flex; align-items:center; justify-content:center; font-size:20px; }
.card-output-info { flex:1; min-width:0; }
.card-output-name { font-size:13px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card-output-meta { font-size:11px; color:#999; }
.card-output-actions { display:flex; gap:6px; flex-shrink:0; }
.card-output-btn { padding:4px 12px; border-radius:6px; border:1px solid #e8e8e8; background:#fff; cursor:pointer; font-size:12px; text-decoration:none; color:#333; }
.card-output-btn.primary { background:#4f6ef7; color:#fff; border-color:#4f6ef7; }
.card-output-name-link { font-size:13px; font-weight:500; color:#333; text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
.card-output-name-link:hover { color:#4f6ef7; }
/* 内嵌图片/视频/音频展示 */
.output-media { margin:8px 0; border-radius:10px; overflow:hidden; border:1px solid #e8e8e8; background:#fafafa; max-width:420px; }
.output-image { display:block; max-width:100%; max-height:360px; width:auto; height:auto; margin:0 auto; cursor:pointer; }
.output-video { display:block; max-width:100%; max-height:420px; width:100%; background:#000; }
.output-audio { display:block; width:100%; padding:8px; }
.output-media-bar { display:flex; align-items:center; justify-content:space-between; padding:6px 10px; background:#fff; font-size:12px; }
.output-media-name { color:#666; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; margin-right:8px; }
.output-download-link { color:#4f6ef7; text-decoration:none; flex-shrink:0; }
.output-download-link:hover { text-decoration:underline; }

.card-alert { padding:12px 14px; display:flex; gap:10px; align-items:flex-start; }
.card-alert.danger { background:#fff2f0; border:1px solid #ffccc7; border-radius:10px; }
.card-alert.warning { background:#fffbe6; border:1px solid #ffe58f; border-radius:10px; }
.card-alert-icon { font-size:20px; }
.card-alert-content { flex:1; font-size:13px; line-height:1.6; }
.card-alert-title { font-weight:600; margin-bottom:4px; }

.card-approval { background:#fff; padding:14px; border-radius:10px; border:1px solid #e8e8e8; }
.card-approval-title { font-weight:600; font-size:13px; margin-bottom:6px; }
.card-approval-details { font-size:13px; color:#666; margin-bottom:10px; line-height:1.6; }
.card-approval-actions { display:flex; gap:8px; }
.approval-btn { padding:6px 18px; border-radius:6px; border:none; cursor:pointer; font-size:13px; }
.approval-btn.agree { background:#52c41a; color:#fff; }
.approval-btn.reject { background:#ff4d4f; color:#fff; }

.system-msg { text-align:center; margin:12px 0; }
.system-msg span { background:#e8e8e8; color:#666; padding:4px 14px; border-radius:12px; font-size:12px; }

/* 输入区 - 加大 */
.chat-input-area { padding:14px 20px; background:#fff; border-top:1px solid #e8e8e8; flex-shrink:0; }
.chat-input-toolbar { display:flex; gap:8px; margin-bottom:8px; align-items:center; }
.input-tool-btn { width:32px; height:32px; border-radius:8px; border:1px solid #e8e8e8; background:#fff; cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; transition:all .2s; }
.input-tool-btn:hover { border-color:#4f6ef7; background:#f5f7ff; }
.input-tool-btn.active { border-color:#4f6ef7; background:#eef2ff; }
.chat-input-wrapper { display:flex; gap:10px; align-items:flex-end; border:1px solid #d9d9d9; border-radius:12px; padding:10px 14px; transition:border-color .2s; background:#fff; }
.chat-input-wrapper:focus-within { border-color:#4f6ef7; box-shadow:0 0 0 3px rgba(79,110,247,.1); }
.chat-input { flex:1; border:none; outline:none; font-size:14px; resize:none; min-height:48px; max-height:160px; font-family:inherit; line-height:1.6; background:transparent; }
.chat-send-btn { padding:10px 24px; background:#4f6ef7; color:#fff; border:none; border-radius:10px; cursor:pointer; font-size:14px; white-space:nowrap; font-weight:500; transition:background .2s; }
.chat-send-btn:hover { background:#3b5de7; }
.chat-send-btn:disabled { background:#b8c4f0; cursor:not-allowed; }
.typing-indicator { padding:6px 0; color:#999; font-size:13px; display:none; }
.typing-indicator.show { display:block; }
.typing-dots span { display:inline-block; animation:blink 1.4s infinite; }
.typing-dots span:nth-child(2) { animation-delay:.2s; } .typing-dots span:nth-child(3) { animation-delay:.4s; }
@keyframes blink { 0%,100%{opacity:.2;} 50%{opacity:1;} }

/* 图片预览区 */
.image-preview-area { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.image-preview-item { position:relative; width:80px; height:80px; border-radius:8px; overflow:hidden; border:1px solid #e8e8e8; }
.image-preview-item img { width:100%; height:100%; object-fit:cover; }
.image-preview-remove { position:absolute; top:2px; right:2px; width:20px; height:20px; border-radius:50%; background:rgba(0,0,0,.5); color:#fff; border:none; cursor:pointer; font-size:12px; display:flex; align-items:center; justify-content:center; }

/* ========== 右栏：工作台面板 ========== */
.workbench-panel { width:300px; background:#fff; border-left:1px solid #e8e8e8; display:flex; flex-direction:column; flex-shrink:0; overflow:hidden; }
.wb-header { padding:14px 16px; border-bottom:1px solid #f0f0f0; display:flex; align-items:center; gap:8px; }
.wb-header-icon { font-size:18px; }
.wb-header-title { font-size:14px; font-weight:600; flex:1; }
.wb-content { flex:1; overflow-y:auto; padding:12px; }
.wb-section { margin-bottom:16px; }
.wb-section-title { font-size:12px; color:#8c8c8c; font-weight:600; letter-spacing:.5px; margin-bottom:8px; }
.wb-task-item { padding:10px; background:#fafafa; border-radius:8px; margin-bottom:6px; font-size:12px; }
.wb-task-item .task-title { font-weight:500; margin-bottom:4px; }
.wb-task-item .task-meta { color:#999; font-size:11px; display:flex; justify-content:space-between; }
.wb-file-item { display:flex; align-items:center; gap:8px; padding:8px; border-radius:6px; cursor:pointer; }
.wb-file-item:hover { background:#f5f7ff; }
.wb-file-icon { font-size:18px; }
.wb-file-name { flex:1; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wb-placeholder { text-align:center; padding:30px 20px; color:#bbb; font-size:12px; }
.wb-placeholder-icon { font-size:36px; margin-bottom:8px; }
.wb-stat-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.wb-stat-card { background:#fafafa; border-radius:8px; padding:10px; text-align:center; }
.wb-stat-value { font-size:20px; font-weight:700; color:#4f6ef7; }
.wb-stat-label { font-size:11px; color:#999; margin-top:2px; }

/* ========== 工作台总览页 ========== */
.overview-page { flex:1; overflow-y:auto; padding:24px; background:#f0f2f5; }
.overview-header { display:flex; align-items:center; gap:20px; margin-bottom:20px; }
.overview-header h1 { font-size:22px; font-weight:700; white-space:nowrap; }
.overview-tabs { display:flex; gap:4px; background:#fff; padding:4px; border-radius:10px; }
.overview-tab { padding:8px 20px; border-radius:8px; cursor:pointer; font-size:13px; transition:all .2s; }
.overview-tab:hover { background:#f5f5f5; }
.overview-tab.active { background:#4f6ef7; color:#fff; }
.overview-content { display:none; }
.overview-content.active { display:block; }

.stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:16px; margin-bottom:20px; }
.stat-card { background:#fff; border-radius:12px; padding:18px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.stat-card .label { font-size:12px; color:#8c8c8c; }
.stat-card .value { font-size:28px; font-weight:700; margin:6px 0 2px; color:#1a1d29; }
.stat-card .trend { font-size:11px; color:#52c41a; }
.overview-card { background:#fff; border-radius:12px; padding:20px; margin-bottom:16px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.overview-card-title { font-size:15px; font-weight:600; margin-bottom:14px; display:flex; align-items:center; justify-content:space-between; }

.kanban-board { display:flex; gap:16px; overflow-x:auto; padding-bottom:10px; }
.kanban-column { min-width:260px; background:#f5f7fa; border-radius:10px; padding:12px; }
.kanban-column-title { font-size:13px; font-weight:600; margin-bottom:10px; display:flex; align-items:center; gap:6px; }
.kanban-count { background:#e8e8e8; padding:1px 8px; border-radius:10px; font-size:11px; }
.kanban-card { background:#fff; border-radius:8px; padding:12px; margin-bottom:8px; cursor:pointer; box-shadow:0 1px 2px rgba(0,0,0,.05); border-left:3px solid #4f6ef7; }
.kanban-card:hover { box-shadow:0 2px 8px rgba(0,0,0,.1); }
.kanban-card-title { font-size:13px; font-weight:500; margin-bottom:6px; }
.kanban-card-meta { font-size:11px; color:#999; display:flex; justify-content:space-between; }
.kanban-card.placeholder { opacity:.6; border-left-style:dashed; border-left-color:#d9d9d9; }
.kanban-card.dragging { opacity:.4; transform:rotate(2deg); }
.kanban-card.priority-high { border-left-color:#ff4d4f; }
.kanban-card.priority-medium { border-left-color:#fa8c16; }
.kanban-card.priority-low { border-left-color:#4f6ef7; }
.kanban-card-deadline { font-size:11px; color:#8c8c8c; margin-top:4px; display:flex; align-items:center; gap:4px; }
.kanban-card-deadline.overdue { color:#ff4d4f; font-weight:600; }
.kanban-priority-badge { display:inline-block; padding:1px 6px; border-radius:4px; font-size:10px; font-weight:600; }
.kanban-priority-badge.high { background:#fff1f0; color:#ff4d4f; }
.kanban-priority-badge.medium { background:#fff7e6; color:#fa8c16; }
.kanban-priority-badge.low { background:#f0f5ff; color:#4f6ef7; }
.kanban-column.drag-over { background:#e6f0ff; border:2px dashed #4f6ef7; }
.kanban-column-header-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.kanban-add-btn { background:none; border:none; color:#4f6ef7; cursor:pointer; font-size:16px; padding:0 4px; }
.kanban-add-btn:hover { color:#764ba2; }

/* 数据报表 */
.report-chart-container { position:relative; width:100%; }
.report-chart-container canvas { width:100%; display:block; }
.report-section-title { font-size:14px; font-weight:600; margin:20px 0 12px; display:flex; align-items:center; gap:8px; }
.report-export-btn { background:#4f6ef7; color:#fff; border:none; padding:6px 16px; border-radius:6px; cursor:pointer; font-size:12px; float:right; }
.report-export-btn:hover { background:#3b5de7; }
.report-placeholder-row { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.report-placeholder-card { background:#fafafa; border-radius:10px; padding:16px; text-align:center; border:1px dashed #d9d9d9; }
.report-placeholder-card .label { font-size:12px; color:#8c8c8c; margin-bottom:6px; }
.report-placeholder-card .value { font-size:20px; font-weight:700; color:#bfbfbf; }
.report-placeholder-card .tag { font-size:10px; color:#fa8c16; background:#fff7e6; padding:2px 8px; border-radius:4px; margin-top:6px; display:inline-block; }
.completion-ring { position:relative; width:120px; height:120px; margin:0 auto; }
.completion-ring svg { transform:rotate(-90deg); }
.completion-ring .ring-text { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); text-align:center; }
.completion-ring .ring-value { font-size:24px; font-weight:700; color:#1a1d29; }
.completion-ring .ring-label { font-size:11px; color:#999; }

table { width:100%; border-collapse:collapse; }
th,td { padding:10px 12px; text-align:left; border-bottom:1px solid #f0f0f0; font-size:13px; }
th { background:#fafafa; font-weight:600; color:#666; font-size:12px; }
tr:hover td { background:#fafbff; }
.tag { display:inline-block; padding:2px 8px; border-radius:4px; font-size:11px; }
.tag-success { background:#f6ffed; color:#52c41a; }
.tag-warning { background:#fffbe6; color:#faad14; }
.tag-danger { background:#fff2f0; color:#ff4d4f; }
.tag-info { background:#e6f7ff; color:#1890ff; }

.chart-placeholder { height:200px; background:linear-gradient(135deg,#f5f7ff,#eef2ff); border-radius:8px; display:flex; align-items:center; justify-content:center; color:#8c8c8c; font-size:13px; }
.chart-bars { display:flex; align-items:flex-end; gap:12px; height:180px; padding:10px 0; }
.chart-bar-wrapper { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; }
.chart-bar { width:100%; max-width:40px; background:linear-gradient(180deg,#4f6ef7,#764ba2); border-radius:4px 4px 0 0; min-height:4px; transition:height .5s; }
.chart-bar-label { font-size:11px; color:#999; white-space:nowrap; }

.btn { padding:8px 16px; border-radius:8px; border:1px solid #e8e8e8; background:#fff; cursor:pointer; font-size:13px; transition:all .2s; }
.btn:hover { border-color:#4f6ef7; color:#4f6ef7; }
.btn-primary { background:#4f6ef7; color:#fff; border-color:#4f6ef7; }
.btn-primary:hover { background:#3b5de7; color:#fff; }
.btn-sm { padding:4px 10px; font-size:12px; }

::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:#d9d9d9; border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:#bfbfbf; }

@media (max-width:1200px) { .workbench-panel { width:260px; } }
@media (max-width:1000px) { .workbench-panel { display:none; } .agent-panel { width:180px; } }
@media (max-width:700px) { .workbench-panel { display:none !important; } .agent-panel { display:none !important; } }

/* ========== 头像图片 ========== */
.chat-header .agent-avatar img { width:100%; height:100%; object-fit:contain; }

/* ========== 调度任务分解卡片 ========== */
.dispatch-card { background:#fff; border:1px solid #e8e8e8; border-radius:12px; padding:16px; margin:12px 0; }
.dispatch-card-title { font-size:14px; font-weight:600; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.dispatch-task { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; background:#fafafa; border-radius:8px; margin-bottom:8px; }
.dispatch-task-icon { font-size:18px; flex-shrink:0; margin-top:2px; }
.dispatch-task-body { flex:1; min-width:0; }
.dispatch-task-name { font-size:13px; font-weight:500; margin-bottom:4px; }
.dispatch-task-desc { font-size:12px; color:#666; line-height:1.6; }
.dispatch-task-status { font-size:11px; padding:2px 8px; border-radius:4px; flex-shrink:0; }
.dispatch-task-status.pending { background:#f5f5f5; color:#999; }
.dispatch-task-status.analyzing { background:#e6f7ff; color:#1890ff; }
.dispatch-task-status.running { background:#fff7e6; color:#fa8c16; }
.dispatch-task-status.completed { background:#f6ffed; color:#52c41a; }
.dispatch-task-status.failed { background:#fff2f0; color:#ff4d4f; }
.analyzing-banner { background:linear-gradient(135deg,#e6f7ff,#f0f5ff); border:1px solid #91d5ff; border-radius:12px; padding:14px 18px; margin:12px 0; display:flex; align-items:center; gap:10px; }
.analyzing-banner .spinner { width:18px; height:18px; border:2px solid #91d5ff; border-top-color:#1890ff; border-radius:50%; animation:spin 0.8s linear infinite; flex-shrink:0; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ========== Token/API 统计卡片 ========== */
.token-stat-row { display:flex; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.token-stat-card { flex:1; min-width:140px; background:#fafafa; border-radius:10px; padding:14px; }
.token-stat-card .label { font-size:12px; color:#8c8c8c; }
.token-stat-card .value { font-size:22px; font-weight:700; color:#1a1d29; margin:4px 0 2px; }
.token-stat-card .detail { font-size:11px; color:#999; }
.token-bar { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.token-bar .name { width:100px; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.token-bar .bar { flex:1; height:14px; background:#f0f0f0; border-radius:7px; overflow:hidden; }
.token-bar .fill { height:100%; background:linear-gradient(90deg,#4f6ef7,#69b1ff); border-radius:7px; transition:width .5s; }
.token-bar .num { width:50px; text-align:right; font-size:11px; color:#666; }

/* ========== 工作台智能体状态修复 ========== */
.wb-agent-item { display:flex; align-items:center; gap:8px; padding:8px 10px; background:#fafafa; border-radius:8px; margin-bottom:6px; font-size:12px; }
.wb-agent-item .wb-agent-icon { font-size:16px; flex-shrink:0; }
.wb-agent-item .wb-agent-name { flex:1; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wb-agent-item .wb-agent-status { display:flex; align-items:center; gap:4px; color:#999; font-size:11px; flex-shrink:0; }
.wb-agent-item .wb-agent-status .status-dot { width:6px; height:6px; border-radius:50%; display:inline-block; }
.wb-agent-item .wb-agent-status .status-dot.online { background:#52c41a; }
.wb-agent-item .wb-agent-status .status-dot.busy { background:#faad14; }
.wb-agent-item .wb-agent-status .status-dot.offline { background:#d9d9d9; }

/* 添加智能体弹窗 */
.modal-overlay { display:none; position:fixed; top:0;left:0;right:0;bottom:0; background:rgba(0,0,0,.45); z-index:1000; align-items:center; justify-content:center; }
.modal-overlay.show { display:flex; }
.modal-box { background:#fff; border-radius:12px; width:480px; max-width:90vw; max-height:85vh; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 8px 32px rgba(0,0,0,.15); }
.modal-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #f0f0f0; }
.modal-header h3 { font-size:16px; font-weight:600; }
.modal-close { background:none; border:none; font-size:18px; cursor:pointer; color:#999; }
.modal-close:hover { color:#333; }
.modal-body { padding:20px; overflow-y:auto; flex:1; }
.form-group { margin-bottom:14px; }
.form-group label { display:block; font-size:13px; font-weight:500; margin-bottom:6px; color:#333; }
.form-group input, .form-group textarea { width:100%; padding:8px 12px; border:1px solid #d9d9d9; border-radius:8px; font-size:13px; outline:none; font-family:inherit; }
.form-group input:focus, .form-group textarea:focus { border-color:#4f6ef7; }
.modal-footer { display:flex; justify-content:flex-end; gap:8px; padding:12px 20px; border-top:1px solid #f0f0f0; }
.btn-primary { background:#4f6ef7; color:#fff; border:1px solid #4f6ef7; border-radius:8px; padding:8px 16px; cursor:pointer; font-size:13px; }
.btn-primary:hover { background:#3b5de7; }

/* 项目列表样式 */
.wb-project-item { background:#fafafa; border-radius:8px; padding:10px; margin-bottom:8px; border:1px solid #f0f0f0; }
.wb-project-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.wb-project-name { font-size:13px; font-weight:600; color:#333; }
.wb-project-progress { display:flex; align-items:center; gap:6px; margin-bottom:6px; }
.wb-progress-bar { flex:1; height:6px; background:#e8e8e8; border-radius:3px; overflow:hidden; }
.wb-progress-fill { height:100%; background:linear-gradient(90deg,#4f6ef7,#764ba2); border-radius:3px; transition:width .3s; }
.wb-progress-text { font-size:10px; color:#999; white-space:nowrap; }
.wb-project-tasks { font-size:11px; }
.wb-project-task { display:flex; align-items:center; gap:4px; padding:3px 0; cursor:pointer; border-radius:4px; }
.wb-project-task:hover { background:#f0f5ff; }
.wb-project-task-title { flex:1; color:#555; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wb-project-task-assignee { color:#4f6ef7; font-size:10px; background:#f0f5ff; padding:0 6px; border-radius:8px; }
.wb-project-more { color:#999; font-size:10px; padding:3px 0; }

/* ========== v4.0 新增样式 ========== */

/* 场景卡片 */
.scene-card { background:#fff; border:1px solid #f0f0f0; border-radius:12px; padding:18px; cursor:pointer; transition:all .2s; }
.scene-card:hover { border-color:#4f6ef7; box-shadow:0 4px 16px rgba(79,110,247,.12); transform:translateY(-2px); }
.scene-card-icon { font-size:32px; margin-bottom:8px; }
.scene-card-name { font-size:15px; font-weight:600; color:#1a1d29; margin-bottom:4px; }
.scene-card-desc { font-size:12px; color:#888; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* 场景欢迎页 */
.scene-welcome { text-align:center; padding:60px 20px; color:#666; }
/* 场景预设问题（轻问答：把问题先提供给用户） */
.scene-quick-tip { font-size:13px; color:#999; margin:20px 0 10px; }
.scene-quick { display:flex; flex-direction:column; gap:10px; max-width:420px; margin:0 auto; text-align:left; }
.scene-quick-btn { text-align:left; border:1px solid #e6ebf5; background:#f7f9ff; color:#3a4a6b; border-radius:12px; padding:11px 14px; font-size:13.5px; line-height:1.45; cursor:pointer; transition:all .18s; }
.scene-quick-btn:hover { border-color:#4f6ef7; background:#eef3ff; color:#2f4bcc; transform:translateX(2px); }
.scene-quick-btn:active { transform:scale(.99); }

/* 分类Tab */
.overview-tab { padding:8px 16px; border-radius:8px; font-size:13px; cursor:pointer; color:#666; transition:all .2s; white-space:nowrap; }
.overview-tab:hover { background:#f0f5ff; color:#4f6ef7; }
.overview-tab.active { background:#4f6ef7; color:#fff; }

/* PPT预览区域 */
.ppt-preview-area { background:#fafbff; border-top:1px dashed #e0e0e0; margin-top:8px; border-radius:0 0 8px 8px; }

/* 工具卡片 */
.tool-card { background:#fafafa; border-radius:10px; padding:14px; border:1px solid #f0f0f0; }
.tool-card-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.tool-icon { font-size:18px; }
.tool-card-desc { font-size:12px; color:#666; line-height:1.5; }

/* 弹窗显示 */
.modal-overlay { display:none; position:fixed; top:0;left:0;right:0;bottom:0; background:rgba(0,0,0,.45); z-index:1000; align-items:center; justify-content:center; }
.modal-overlay.show { display:flex; }
.modal-box { background:#fff; border-radius:12px; width:90%; max-width:520px; max-height:85vh; overflow-y:auto; box-shadow:0 8px 32px rgba(0,0,0,.15); }

/* 小统计卡片 */
.wb-mini-stat { transition:transform .15s; }
.wb-mini-stat:hover { transform:scale(1.03); }

/* Token统计卡片增强 */
.token-stat-card { background:#fff; border:1px solid #f0f0f0; border-radius:10px; padding:16px; text-align:center; }
.token-stat-card .label { font-size:12px; color:#888; margin-bottom:6px; }
.token-stat-card .value { font-size:20px; font-weight:700; color:#1a1d29; }
.token-stat-card .detail { font-size:11px; color:#aaa; margin-top:4px; }

/* 图片编辑按钮 */
.img-edit-bar { display:flex; gap:6px; margin-top:6px; flex-wrap:wrap; }
.img-edit-btn { padding:4px 10px; font-size:11px; border:1px solid #d9d9d9; border-radius:6px; background:#fff; cursor:pointer; color:#555; }
.img-edit-btn:hover { border-color:#4f6ef7; color:#4f6ef7; }

/* ========== 手机端响应式 ========== */
@media (max-width: 768px) {
  .agent-panel { display:none !important; }
  .workbench-panel { display:none !important; }
  .main { margin-left:0 !important; }
  .chat-header { padding:8px 12px !important; }
  .chat-header-name { font-size:15px !important; }
  .chat-header-desc { font-size:11px !important; }
  .chat-messages { padding:12px !important; }
  .message-content { max-width:88% !important; font-size:14px !important; }
  .chat-input-area { padding:8px 12px !important; }
  .chat-input { font-size:14px !important; }
  .chat-send-btn { padding:0 16px !important; font-size:14px !important; }
  .overview-page { padding:16px 12px !important; }
  .stats-grid { grid-template-columns:repeat(2,1fr) !important; }
  .token-stat-row { grid-template-columns:repeat(2,1fr) !important; }
  #sceneList, #toolkitList, #marketList { grid-template-columns:1fr !important; }
  .modal-box { width:95% !important; }
  .quick-actions { overflow-x:auto !important; flex-wrap:nowrap !important; }
  .quick-actions::-webkit-scrollbar { display:none; }
  .chat-header-actions .chat-header-btn { font-size:11px !important; padding:4px 8px !important; }
}

@media (max-width: 480px) {
  .main { margin-left:0 !important; }
  .stats-grid { grid-template-columns:1fr 1fr !important; gap:8px !important; }
  .stat-card .value { font-size:18px !important; }
}


/* ========== v4.1 落地应用样式 ========== */
.app-header { padding: 20px 0; border-bottom: 1px solid #f0f0f0; margin-bottom: 20px; }
.app-func-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; margin-bottom: 20px; }
.app-func-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 20px 12px; text-align: center; cursor: pointer; transition: all .2s; }
.app-func-card:hover { border-color: #4f6ef7; box-shadow: 0 4px 12px rgba(79,110,247,.15); transform: translateY(-2px); }
.app-func-icon { font-size: 32px; margin-bottom: 8px; }
.app-func-name { font-size: 13px; font-weight: 500; color: #333; }
.app-form .form-group { margin-bottom: 14px; }
.app-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: #555; }
.app-form input, .app-form textarea, .app-form select { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; box-sizing: border-box; }
.app-form input:focus, .app-form textarea:focus, .app-form select:focus { outline: none; border-color: #4f6ef7; }
.app-result { background: #f8f9ff; border: 1px solid #e0e5ff; border-radius: 10px; padding: 16px; }
.app-result-actions { margin-bottom: 12px; text-align: right; }
.markdown-body { font-size: 14px; line-height: 1.8; }
.markdown-body h1,.markdown-body h2,.markdown-body h3 { margin: 12px 0 8px; }
.markdown-body table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.markdown-body th,.markdown-body td { border: 1px solid #ddd; padding: 8px 12px; text-align: left; }
.markdown-body th { background: #f0f2ff; }
.app-chat-messages { background: #fafafa; }
@media (max-width: 768px) {
  .app-func-grid { grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); }
}

/* ========== v4.1 二级折叠菜单 ========== */
.nav-group-title { cursor: pointer; user-select: none; }
.nav-group-title:hover { background: rgba(79,110,247,0.08); }
.nav-arrow { margin-left: auto; font-size: 10px; color: #999; transition: transform .2s; }
.nav-sub-group { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.nav-sub-group.expanded { max-height: 600px; }
.nav-sub-item { padding-left: 32px !important; font-size: 12px !important; height: 38px !important; }
.nav-sub-item .nav-icon { font-size: 16px !important; }
.nav-sub-item .nav-text { font-size: 12px !important; }

/* v4.1 手机端侧边栏优化 */
@media (max-width:768px) {
  .sidebar { width:220px !important; min-width:220px !important; position:fixed !important; left:-220px; top:0; bottom:0; z-index:1000; transition:left .3s; padding-top:env(safe-area-inset-top,12px); overflow-y:auto; }
  .sidebar.mobile-open { left:0 !important; box-shadow:2px 0 12px rgba(0,0,0,.3); }
  .sidebar .nav-text, .sidebar-logo span:not(.logo-icon) { display:inline !important; font-size:13px !important; }
  .sidebar-logo { justify-content:center; padding:12px !important; font-size:15px !important; gap:6px !important; }
  .nav-item { justify-content:flex-start !important; padding:10px 14px !important; gap:10px !important; }
  .nav-icon { margin:0 !important; font-size:18px !important; }
  .nav-sub-item { padding-left:28px !important; }
  .sidebar-status { justify-content:flex-start !important; padding:10px 14px !important; gap:10px !important; }
  .sidebar-status .nav-text { display:inline !important; }
  .sidebar-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:999; }
  .sidebar-overlay.show { display:block; }
  .mobile-menu-btn { display:flex !important; }
  .main-content { margin-left:0 !important; }
  /* 手机端聊天头部添加padding避免被汉堡按钮遮挡 */
  .chat-header { padding-left:56px !important; }
  /* 手机端其它页面标题同样避让悬浮汉堡按钮，避免遮挡首字（后代选择器，覆盖任意层级标题行） */
  .overview-page h1 { padding-left:44px !important; }
}
.mobile-menu-btn { display:none; position:fixed; top:12px; left:12px; z-index:1001; width:40px; height:40px; border-radius:8px; background:#4f6ef7; color:#fff; align-items:center; justify-content:center; font-size:20px; cursor:pointer; border:none; box-shadow:0 2px 8px rgba(0,0,0,.2); }

/* v4.1 手机端智能体选择器 */
.agent-picker-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:2000; }
.agent-picker-overlay.show { display:block; }
.agent-picker-sheet { position:fixed; bottom:0; left:0; right:0; background:#fff; border-radius:16px 16px 0 0; z-index:2001; max-height:70vh; transform:translateY(100%); transition:transform .3s; display:flex; flex-direction:column; }
.agent-picker-sheet.show { transform:translateY(0); }
.agent-picker-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #f0f0f0; font-size:16px; font-weight:600; }
.agent-picker-list { overflow-y:auto; padding:8px 0; }
.agent-picker-item { display:flex; align-items:center; gap:12px; padding:12px 20px; cursor:pointer; }
.agent-picker-item:active { background:#f5f5f5; }
.agent-picker-item.active { background:#f0f4ff; }
.agent-picker-icon { font-size:28px; }
.agent-picker-info { flex:1; }
.agent-picker-name { font-size:15px; font-weight:500; }
.agent-picker-desc { font-size:12px; color:#999; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:250px; }
.agent-picker-check { color:#4f6ef7; font-size:18px; }

/* v4.1 导航项拖拽排序 */
.nav-dragging { opacity:0.4; }
.nav-drag-over { position:relative; }
.nav-drag-over-before { border-top:2px solid #4f6ef7 !important; }
.nav-drag-over-after { border-bottom:2px solid #4f6ef7 !important; }
.nav-item[draggable="true"]:active { cursor:grabbing !important; }

/* v4.1 侧边栏智能体列表 */
.nav-agent-list { display:none; }
.nav-agent-item { padding-left:28px !important; font-size:12px !important; height:36px !important; }
.nav-agent-item .nav-icon { font-size:15px !important; }
.nav-agent-item .nav-text { font-size:12px !important; }
@media (max-width:768px) {
  .nav-agent-list { display:block; max-height:0; overflow:hidden; transition:max-height .3s ease; }
  .nav-agent-list.expanded { max-height:600px; overflow-y:auto; }
}

/* 语音和拍照功能 */
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
.voice-wave { display:inline-flex; gap:3px; align-items:center; height:24px; vertical-align:middle; }
.voice-wave span { width:3px; background:#4f6ef7; border-radius:2px; animation: wave 0.8s ease-in-out infinite; }
.voice-wave span:nth-child(2) { animation-delay:0.1s; }
.voice-wave span:nth-child(3) { animation-delay:0.2s; }
.voice-wave span:nth-child(4) { animation-delay:0.3s; }
.voice-wave span:nth-child(5) { animation-delay:0.4s; }
@keyframes wave { 0%,100% { height:6px; } 50% { height:20px; } }
.msg-voice-btn { cursor:pointer; color:#4f6ef7; font-size:14px; margin-left:6px; user-select:none; }
.msg-voice-btn:hover { text-decoration:underline; }
.recording .input-tool-btn { color:#e74c3c; }

/* ===== 豆包风格输入框 ===== */
.chat-input-container {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background: #f5f5f5;
  border-radius: 24px;
  padding: 6px 8px;
  border: 1px solid #e8e8e8;
}
.chat-inner-btn {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border: none; background: transparent;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #666; padding: 0;
  transition: background 0.15s;
}
.chat-inner-btn:active { background: #e0e0e0; }
.chat-textarea-wrap {
  flex: 1; min-width: 0;
}
.chat-textarea-wrap .chat-input {
  width: 100%; border: none; background: transparent;
  resize: none; outline: none;
  font-size: 15px; line-height: 1.4;
  max-height: 100px; padding: 8px 4px;
  font-family: inherit;
}
.chat-hold-to-talk {
  flex: 1;
  height: 36px;
  border: none; background: #fff;
  border-radius: 18px; cursor: pointer;
  font-size: 14px; color: #333;
  border: 1px solid #ddd;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.chat-hold-to-talk:active { background: #e8e8e8; }
.chat-send-btn-inner {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  background: #4f6ef7; color: #fff;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  padding: 0; transition: opacity 0.15s;
}
.chat-send-btn-inner:active { opacity: 0.8; }
.chat-send-btn-inner svg { stroke: #fff; }

/* ============================================================
   v5.0 手机端体验优化（仅 ≤768px 生效；不改变 PC 布局，板块/功能/列一个不删，
   只把窄屏下被挤压、遮挡、截断的地方排布合理化）
   ============================================================ */
@media (max-width:768px){
  /* 1) 行业应用页标题同样避让左上角悬浮 ☰ 汉堡按钮 */
  .app-header { padding-left:44px !important; }
  /* 2) 任务台“总览/项目看板”标题行改为纵向堆叠，避免右侧标签被挤出屏幕 */
  .overview-header { flex-direction:column !important; align-items:stretch !important; gap:10px !important; }
  .overview-tabs { align-self:flex-start; }
  /* 3) 数据表不再被压成逐字竖排：保留全部列，在卡片内左右滑动查看 */
  .overview-card, .app-result, #kbList { overflow-x:auto !important; -webkit-overflow-scrolling:touch; }
  .overview-card table, #kbList table { min-width:540px !important; border-collapse:collapse !important; }
  .overview-card table th, .overview-card table td,
  #kbList table th, #kbList table td { white-space:nowrap; }
  /* 聊天/AI 结果里的 markdown 表格允许横滑，但不强制最小宽度 */
  .markdown-body { overflow-x:auto; }
  /* 4) 工作流步骤条本身可横滑（步骤不省略），手机上隐藏滚动条更干净 */
  .wf-stepper { scrollbar-width:none; }
  .wf-stepper::-webkit-scrollbar { display:none; }
  /* 5) 行业页“工作流模式/单独功能”两个切换键等宽铺满，更好点按 */
  .app-mode-tabs { flex-wrap:nowrap; }
  .app-mode-tabs .btn { flex:1 1 0; white-space:nowrap; }
  /* 6) 弹窗在窄屏留安全边距、内部表格可滑 */
  .modal-box { max-width:95vw !important; max-height:88vh; overflow-y:auto; }
  /* 7) 内联多列网格在窄屏纵向堆叠，避免并排挤压（内容一项不丢，只改为顺排）；
         数据报表 4 张占位卡降为 2 列、任务台图表并排降为单列更易读 */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns:1fr !important; }
  .report-placeholder-row { grid-template-columns:repeat(2,1fr) !important; }
  /* 8) 看板本身可横滑，列宽不被压缩 */
  .kanban-column { min-width:240px; }
}
