* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-color: rgba(59, 130, 246, 0.2);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Roboto, sans-serif;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f5f7fa 100%);
    min-height: 100vh;
    color: var(--text-primary);
    padding: 16px;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 主布局容器 - 内容区域 + 右侧边栏 */
.main-layout {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
    width: 100%;
    position: relative;
}

.main-content-area {
    flex: 1;
    min-width: 0; /* 允许flex收缩 */
    display: flex;
    flex-direction: column;
    order: 1;
    width: calc(100% - 300px); /* 为右侧边栏留出空间 */
}

@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
    
    .main-content-area {
        order: 1;
        width: 100%;
    }
    
    .right-sidebar {
        order: 2;
        width: 100%;
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
}

/* 顶部标题栏 */
.header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
}

@media (max-width: 1024px) {
    .header {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header-right {
        justify-content: flex-start;
    }
}

.header-left h1 {
    font-size: 2em;
    color: var(--accent);
    text-shadow: 0 2px 4px var(--shadow);
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* 工具栏按钮组 */
.header-right > * {
    flex-shrink: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--warning);
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: var(--success);
    animation: none;
}

.status-dot.disconnected {
    background: var(--error);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.update-time {
    color: var(--text-muted);
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

/* 搜索相关样式 */
.global-search-container {
    position: relative;
}

.global-search-input {
    padding: 8px 16px 8px 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9em;
    width: 250px;
    transition: all 0.3s;
    outline: none;
}

.global-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    width: 300px;
}

.search-input {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85em;
    min-width: 150px;
    transition: all 0.2s;
    outline: none;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

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

/* 高亮搜索结果 */
mark {
    background: rgba(245, 158, 11, 0.3);
    color: var(--text-primary);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* 健康度面板 - 原版（保留用于兼容性，但默认隐藏） */
.health-panel {
    display: none; /* 默认隐藏，已移至右侧边栏 */
}

/* 健康度面板紧凑版样式在 right-sidebar.css 中定义 */

.health-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success), var(--info), var(--warning));
    background-size: 200% 100%;
    animation: healthBar 3s ease-in-out infinite;
}

@keyframes healthBar {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

.health-score {
    text-align: center;
    min-width: 120px;
}

@media (max-width: 768px) {
    .health-score {
        min-width: auto;
    }
}

.score-value {
    font-size: 3em;
    font-weight: bold;
    color: var(--accent);
    line-height: 1;
    position: relative;
    display: inline-block;
    animation: scoreGlow 2s ease-in-out infinite;
}

@keyframes scoreGlow {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    }
    50% { 
        text-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 0 30px rgba(59, 130, 246, 0.3);
    }
}

.score-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 5px;
}

.health-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.health-issues {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .health-status {
        flex-direction: column;
        gap: 10px;
    }
    
    .health-issues {
        max-width: 100%;
    }
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.status-badge.healthy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: badgeHealthy 2s ease-in-out infinite;
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
    animation: badgeWarning 1.5s ease-in-out infinite;
}

.status-badge.critical {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: badgeCritical 1s ease-in-out infinite;
}

@keyframes badgeHealthy {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

@keyframes badgeWarning {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }
}

@keyframes badgeCritical {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.health-issues {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.issue-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-left: 3px solid var(--error);
    animation: issuePulse 2s ease-in-out infinite;
}

@keyframes issuePulse {
    0%, 100% { 
        border-left-width: 3px;
        background: rgba(239, 68, 68, 0.1);
    }
    50% { 
        border-left-width: 5px;
        background: rgba(239, 68, 68, 0.15);
    }
}

/* 网格布局 - 优化版 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}

/* 大屏幕优化：3-4列布局 */
@media (min-width: 1400px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* 重要卡片占据2列 */
    .card.priority-2 {
        grid-column: span 2;
    }
    
    /* 全宽卡片 */
    .card.full-width {
        grid-column: 1 / -1;
    }
}

/* 中等屏幕：2-3列布局 */
@media (min-width: 1024px) and (max-width: 1399px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .card.priority-2 {
        grid-column: span 2;
    }
}

/* 平板：2列布局 */
@media (min-width: 768px) and (max-width: 1023px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card.priority-2 {
        grid-column: span 2;
    }
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 18px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px var(--shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

/* 紧凑型卡片（内容较少） */
.card.compact {
    padding: 14px;
}

/* 高优先级卡片（需要更多空间） */
.card.priority-2 {
    min-height: 200px;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--info));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.card-header .card-title {
    min-width: 0; /* 允许文本截断 */
}

.card-icon {
    font-size: 1.5em;
}

.card-title {
    font-size: 1.2em;
    font-weight: 600;
    flex: 1;
}

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

.btn-small {
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.btn-small:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--shadow);
}

.card-content {
    min-height: 80px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 紧凑内容区域 */
.card.compact .card-content {
    min-height: 60px;
}

/* 状态项 - 优化间距 */
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.status-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.status-item::before {
    content: '';
    position: absolute;
    left: -10px;
    width: 4px;
    height: 0;
    background: var(--accent);
    border-radius: 2px;
    transition: height 0.3s;
}

.status-item:hover::before {
    height: 60%;
}

.status-label {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.status-value {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.status-ok { 
    color: var(--success); 
    position: relative;
    padding-left: 20px;
}
.status-ok::before {
    content: '●';
    position: absolute;
    left: 0;
    animation: blink-green 1.5s ease-in-out infinite;
}
.status-warn { 
    color: var(--warning); 
    position: relative;
    padding-left: 20px;
}
.status-warn::before {
    content: '●';
    position: absolute;
    left: 0;
    animation: blink-yellow 1.5s ease-in-out infinite;
}
.status-error { 
    color: var(--error); 
    position: relative;
    padding-left: 20px;
}
.status-error::before {
    content: '●';
    position: absolute;
    left: 0;
    animation: blink-red 1s ease-in-out infinite;
}
.status-info { 
    color: var(--info); 
    position: relative;
    padding-left: 20px;
}
.status-info::before {
    content: '●';
    position: absolute;
    left: 0;
    animation: blink-blue 2s ease-in-out infinite;
}

@keyframes blink-green {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes blink-yellow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

@keyframes blink-red {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

@keyframes blink-blue {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.badge-green { 
    background: rgba(16, 185, 129, 0.15); 
    color: var(--success); 
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: pulse-green 2s ease-in-out infinite;
}
.badge-yellow { 
    background: rgba(245, 158, 11, 0.15); 
    color: var(--warning); 
    border: 1px solid rgba(245, 158, 11, 0.3);
    animation: pulse-yellow 2s ease-in-out infinite;
}
.badge-red { 
    background: rgba(239, 68, 68, 0.15); 
    color: var(--error); 
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulse-red 2s ease-in-out infinite;
}
.badge-blue { 
    background: rgba(59, 130, 246, 0.15); 
    color: var(--info); 
    border: 1px solid rgba(59, 130, 246, 0.3);
    animation: pulse-blue 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
        transform: scale(1.02);
    }
}

@keyframes pulse-yellow {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
        transform: scale(1.02);
    }
}

@keyframes pulse-red {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
        transform: scale(1.02);
    }
}

@keyframes pulse-blue {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
        transform: scale(1.02);
    }
}

/* Agent列表 */
.agent-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.agent-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    animation: agentPulse 2s ease-in-out infinite;
}

@keyframes agentPulse {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% { 
        opacity: 0.8;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0);
    }
}

/* 活跃状态脉冲动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* 系统状态摘要（右侧边栏） */
.system-summary-compact {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.system-summary-compact .summary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.system-summary-compact .summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.system-summary-compact .summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.system-summary-compact .summary-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.1em;
}

.system-summary-compact .summary-info {
    flex: 1;
    min-width: 0;
}

.system-summary-compact .summary-label {
    font-size: 0.7em;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.system-summary-compact .summary-value {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Agent 组织架构树 */
.org-tree {
    padding: 10px 0;
}

.agent-org-node {
    position: relative;
}

.agent-card:hover {
    transform: translateX(4px);
    border-color: var(--accent) !important;
}

/* 宽卡片样式 */
.card-wide {
    min-height: 400px;
}

.card-wide .card-content {
    padding: 20px;
}

/* 响应式：小屏幕时恢复单列 */
@media (max-width: 1200px) {
    .card-wide {
        grid-column: span 1 !important;
    }
}

.agent-item:hover {
    background: #f1f5f9;
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateX(4px);
}

.agent-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.agent-name {
    font-weight: 600;
    font-size: 1.05em;
}

.agent-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* 任务列表 */
.task-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.9em;
    border-left: 3px solid var(--info);
    transition: all 0.2s;
    position: relative;
}

.task-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--info);
    animation: taskPulse 1.5s ease-in-out infinite;
}

@keyframes taskPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.task-item:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 8px var(--shadow);
    transform: translateX(2px);
}

.task-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.task-id {
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    font-size: 0.85em;
}

.task-time {
    color: var(--text-muted);
    font-size: 0.85em;
}

/* 通道网格 */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.channel-item {
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.channel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.5s;
}

.channel-item:hover::after {
    left: 100%;
}

.channel-item:hover {
    background: #f1f5f9;
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-2px);
}

.channel-name {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.channel-status {
    font-weight: 600;
    font-size: 0.95em;
}

/* 日志容器 */
.log-container {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.log-entry {
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    word-break: break-all;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: var(--text-muted);
    margin-right: 10px;
}

.log-error { 
    color: var(--error); 
    position: relative;
    padding-left: 20px;
}
.log-error::before {
    content: '⚠';
    position: absolute;
    left: 0;
    animation: logErrorBlink 1s ease-in-out infinite;
}
.log-warn { 
    color: var(--warning); 
    position: relative;
    padding-left: 20px;
}
.log-warn::before {
    content: '⚡';
    position: absolute;
    left: 0;
    animation: logWarnBlink 1.5s ease-in-out infinite;
}
.log-info { 
    color: var(--info); 
    position: relative;
    padding-left: 20px;
}
.log-info::before {
    content: 'ℹ';
    position: absolute;
    left: 0;
    opacity: 0.7;
}

@keyframes logErrorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes logWarnBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 加载动画 */
.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 空状态 */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 0.9em;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

/* 响应式设计 */
/* 灯光效果 */
@keyframes pulseLight {
    0% {
        box-shadow: 0 0 0 0 currentColor;
        transform: scale(1);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 0 8px transparent;
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        box-shadow: 0 0 0 0 currentColor;
        transform: scale(1);
        opacity: 1;
    }
}

.status-indicator-light {
    animation: pulseLight 2s ease-in-out infinite;
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
}

/* 通道状态灯光 - 已移除右侧圆点 */
.channel-status.status-ok::after,
.channel-status.status-warn::after,
.channel-status.status-error::after {
    content: none;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .health-panel {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .channel-grid {
        grid-template-columns: 1fr;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* ========== 阶段3：快捷操作和详情页面样式 ========== */

/* 快捷操作按钮 */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
    border-color: var(--accent);
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
}

.action-icon {
    font-size: 2em;
    margin-bottom: 8px;
}

.action-label {
    font-size: 0.9em;
    color: var(--text-primary);
    font-weight: 500;
}

/* 可点击项 */
.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.clickable:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(4px);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-card);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
    display: flex;
    flex-direction: column;
}

.modal-large {
    max-width: 1200px;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* 详情页面样式 */
.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 1em;
    color: var(--text-primary);
    font-weight: 600;
}

/* 配置信息 */
.config-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.config-item {
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}

.config-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.config-value {
    font-size: 0.95em;
    color: var(--text-primary);
    word-break: break-word;
    white-space: pre-wrap;
}

/* 会话列表 */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.session-item {
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.session-item:hover {
    background: #f1f5f9;
    border-color: var(--accent);
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.session-id {
    font-family: monospace;
    font-size: 0.9em;
    color: var(--text-primary);
    font-weight: 600;
}

.session-info {
    display: flex;
    gap: 20px;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.session-preview {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.preview-label {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.preview-content {
    font-size: 0.9em;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.5;
}

/* 子Agent列表 */
.subagents-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* 消息容器 */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
}

.message-item {
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
    background: var(--bg-card);
}

.message-user {
    border-left-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
}

.message-assistant {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.message-system {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-role {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9em;
}

.message-time {
    font-size: 0.8em;
    color: var(--text-muted);
}

.message-content {
    color: var(--text-primary);
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
}

/* 错误状态 */
.error-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--error);
}

/* ========== 图表样式 ========== */
#metricsChart,
#tasksChart,
#modelsChart {
    padding: 20px;
    height: 600px;
    margin-top: 15px;
}

#healthChart {
    margin-top: 20px;
    padding: 20px;
    height: 250px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

#healthChartCanvas {
    max-height: 100%;
}

/* 图表容器响应式 */
@media (max-width: 768px) {
    #metricsChart,
    #tasksChart,
    #modelsChart,
    #healthChart {
        height: 300px;
    }
}

/* ========== 通知中心样式 ========== */
.notification-btn {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.notification-btn:hover {
    background: rgba(59, 130, 246, 0.1);
}

.notification-icon {
    font-size: 1.2em;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--error);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7em;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.notification-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 400px;
    max-height: 600px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.notification-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.notification-item {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.notification-item:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(4px);
}

.notification-item.read {
    opacity: 0.6;
}

.notification-item.notification-success {
    border-left-color: var(--success);
}

.notification-item.notification-warning {
    border-left-color: var(--warning);
}

.notification-item.notification-error {
    border-left-color: var(--error);
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.notification-item-title {
    font-weight: 600;
    font-size: 0.9em;
}

.notification-item-time {
    font-size: 0.75em;
    color: var(--text-muted);
}

.notification-item-message {
    font-size: 0.85em;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notification-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

/* ========== UI增强功能样式 ========== */
.theme-toggle-btn,
.fullscreen-btn,
.refresh-control-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
    margin-right: 10px;
}

.theme-toggle-btn:hover,
.fullscreen-btn:hover,
.refresh-control-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }

    .header-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .global-search-input {
        width: 100%;
        max-width: 300px;
    }

    .notification-panel {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }

    .card-actions {
        flex-direction: column;
        gap: 8px;
    }

    .search-input {
        width: 100%;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-left h1 {
        font-size: 1.3em;
    }
    
    .subtitle {
        font-size: 0.8em;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-actions {
        width: 100%;
    }
    
    .card-icon {
        font-size: 1.2em;
    }
    
    .card-title {
        font-size: 1em;
    }
    
    .score-value {
        font-size: 2em;
    }
}

/* 动画增强 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease-out;
}

/* 拖拽样式 */
.card.dragging {
    opacity: 0.5;
    cursor: move;
}

.card-header {
    cursor: move;
}
