/* 多实例标签页布局 */ :host { display: block; width: 100vw; height: 100vh; background-color: #f5f5f5; } /* 应用容器 */ .app-container { display: flex; flex-direction: column; height: 100vh; overflow: hidden; } /* 顶部导航栏 */ .app-header { background: white; border-bottom: 1px solid #e0e0e0; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; height: 64px; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); z-index: 10; } .header-left { display: flex; align-items: center; gap: 32px; } .logo { display: flex; align-items: center; gap: 10px; } .logo-icon { color: #3b82f6; font-size: 28px; height: 28px; width: 28px; } .logo-text { margin: 0; font-size: 18px; font-weight: 600; color: #1f2937; } .menu-nav { display: flex; gap: 8px; } .menu-button { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; transition: all 0.2s; mat-icon { font-size: 18px; height: 18px; width: 18px; } span { font-size: 14px; font-weight: 500; } &:hover { background-color: #f3f4f6; } &.active { background-color: #3b82f6; color: white; mat-icon { color: white; } &:hover { background-color: #2563eb; } } } .header-right { display: flex; align-items: center; gap: 24px; } .status-indicator { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px; background: #f8f9fa; mat-icon { font-size: 18px; height: 18px; width: 18px; &.connected { color: #10b981; } &.disconnected { color: #ef4444; } } .status-text { font-size: 12px; color: #6b7280; } } .user-info { display: flex; align-items: center; gap: 10px; .new-project-btn { margin-right: 8px; mat-icon { color: #3b82f6; transition: color 0.2s; } &:hover mat-icon { color: #2563eb; } } .username { font-size: 14px; color: #4b5563; font-weight: 500; } mat-icon { color: #6b7280; } } /* 主内容区域 */ .app-main { flex: 1; overflow: hidden; background: white; position: relative; } /* 加载状态 */ .loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 16px; p { margin: 0; color: #6b7280; font-size: 14px; } } /* 活动实例容器 */ .active-instance-container { height: 100%; overflow: hidden; } /* 空状态 */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 40px; text-align: center; color: #9ca3af; .empty-icon { font-size: 64px; height: 64px; width: 64px; margin-bottom: 16px; opacity: 0.5; } h3 { margin: 0 0 8px 0; font-size: 18px; font-weight: 600; color: #4b5563; } p { margin: 0; font-size: 14px; } } /* 响应式设计 */ @media (max-width: 768px) { .app-header { padding: 0 12px; height: 56px; } .header-left { gap: 16px; } .logo-text { display: none; } .menu-button span { display: none; } .menu-nav { gap: 4px; } .menu-button { padding: 8px; min-width: auto; } .status-indicator .status-text { display: none; } .user-info .username { display: none; } } /* 滚动条样式 */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } ::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #a8a8a8; } /* 标签页导航 */ .tabs-nav { display: flex; gap: 4px; align-items: center; margin-left: 16px; overflow-x: auto; max-width: 600px; padding: 4px 0; &::-webkit-scrollbar { height: 4px; } &::-webkit-scrollbar-thumb { background: #d1d5db; } } .tab-item { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px; background: #f3f4f6; border: 1px solid #e5e7eb; cursor: pointer; transition: all 0.2s; white-space: nowrap; flex-shrink: 0; .tab-icon { font-size: 16px; height: 16px; width: 16px; color: #6b7280; } .tab-title { font-size: 13px; font-weight: 500; color: #4b5563; max-width: 120px; overflow: hidden; text-overflow: ellipsis; } .tab-close { width: 18px; height: 18px; line-height: 18px; margin-left: 2px; mat-icon { font-size: 14px; height: 14px; width: 14px; color: #9ca3af; } &:hover mat-icon { color: #ef4444; } } &:hover { background: #e5e7eb; border-color: #d1d5db; } &.active { background: #3b82f6; border-color: #3b82f6; .tab-icon, .tab-title { color: white; } .tab-close mat-icon { color: rgba(255, 255, 255, 0.8); } .tab-close:hover mat-icon { color: white; } } &.loading { cursor: wait; opacity: 0.7; background: #f0f9ff; border-color: #93c5fd; .tab-title { margin-right: 4px; } .tab-loading-spinner { margin-left: 4px; ::ng-deep .mat-progress-spinner circle, .mat-spinner circle { stroke: #3b82f6; } } .tab-close { display: none; } } }