/* 现代化简洁风格 - 类似Gemini设计 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #ffffff;
    color: #202124;
    min-height: 100vh;
    line-height: 1.6;
    overflow: hidden;
}

/* 主布局 */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* 左侧边栏 */
.sidebar {
    width: 240px;
    background: #e8f0fe;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #dadce0;
}

.sidebar-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    border-bottom: 1px solid #dadce0;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    white-space: nowrap;
}

.sidebar-content {
    flex: 1;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.new-chat-btn {
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    color: #202124;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.new-chat-btn:hover {
    background: #f1f3f4;
}

.new-chat-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.new-chat-btn span {
    white-space: nowrap;
}

.sidebar-btn {
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    color: #202124;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-btn:hover {
    background: #f1f3f4;
}

.sidebar-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-btn span {
    white-space: nowrap;
}


/* 历史对话区域 */
.chat-history-section {
    flex: 1;
    overflow-y: auto;
    margin-top: 16px;
    min-height: 0;
}

.history-header {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.chat-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.history-item:hover {
    background: #f1f3f4;
}

.history-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.history-item-title {
    font-size: 14px;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.history-item-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #5f6368;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    flex-shrink: 0;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    background: rgba(234, 67, 53, 0.1);
    color: #ea4335;
}

.history-item-delete svg {
    width: 16px;
    height: 16px;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

/* AI Ops按钮 - 右上角 */
.ai-ops-top-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ff9800;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.ai-ops-top-btn:hover {
    background: #fb8c00;
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.4);
    transform: translateY(-1px);
}

.ai-ops-top-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.chat-container.centered {
    justify-content: center;
    align-items: center;
    min-height: 100%;
}

.chat-messages {
    flex: 1;
    padding: 64px 24px 24px 24px;
    overflow-y: auto;
    background: #ffffff;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.5s ease;
    max-width: 100%;
}

@media (min-width: 768px) {
    .chat-messages {
        padding: 72px 24px 32px 24px;
    }
}

.chat-container.centered .chat-messages {
    flex: 0 1 auto;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    min-height: auto;
}

.chat-container.centered .chat-input-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    flex-shrink: 0;
}

.chat-container:not(.centered) .chat-messages {
    justify-content: flex-start;
    align-items: stretch;
}

.welcome-greeting {
    text-align: center;
    color: #1a73e8;
    font-size: 1.5rem;
    padding: 20px;
    font-weight: 400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.chat-container.centered .welcome-greeting {
    opacity: 1;
    visibility: visible;
    order: -1;
}

.chat-container:not(.centered) .welcome-greeting {
    opacity: 0;
    visibility: hidden;
    height: 0;
    padding: 0;
    margin: 0;
}

.welcome-greeting p {
    margin: 0;
}

.welcome-message {
    text-align: center;
    color: #1a73e8;
    font-size: 1.5rem;
    padding: 60px 20px;
    font-weight: 400;
}

/* 消息样式 */
.message {
    margin-bottom: 24px;
    display: flex;
    width: 100%;
}

.message.user {
    flex-direction: column;
    align-items: flex-end;
}

/* AI消息容器 - 包含图标和内容 */
.message.assistant {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    max-width: 100%;
}

/* AI消息图标 - 蓝色四角星 */
.message-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message.assistant .message-avatar svg {
    width: 20px;
    height: 20px;
}

/* 消息内容容器 */
.message-content-wrapper {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* AI消息的包装器需要减去头像宽度 */
.message.assistant .message-content-wrapper {
    flex: 1;
    max-width: calc(100% - 44px);
}

/* 用户消息的包装器不需要限制宽度，让它根据内容自适应 */
.message.user .message-content-wrapper {
    max-width: 70%;
    align-items: flex-end;
    flex: 0 1 auto;
    width: auto;
}

.message-content {
    padding: 14px 18px;
    border-radius: 18px;
    line-height: 1.6;
    font-size: 0.95rem;
    font-weight: 400;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    display: block;
    max-width: 100%;
    box-sizing: border-box;
}

.message.user .message-content {
    background: #e8eaed;
    color: #202124;
    border-bottom-right-radius: 4px;
    font-weight: 400;
    width: 100%;
}

.message.assistant .message-content {
    background: #ffffff;
    color: #202124;
    border: none;
    border-bottom-left-radius: 4px;
    box-shadow: none;
}

/* Markdown渲染样式 */
.message-content h1, .message-content h2, .message-content h3,
.message-content h4, .message-content h5, .message-content h6 {
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.25;
}

.message-content h1 { font-size: 1.5em; border-bottom: 1px solid #e8eaed; padding-bottom: 8px; }
.message-content h2 { font-size: 1.3em; border-bottom: 1px solid #e8eaed; padding-bottom: 6px; }
.message-content h3 { font-size: 1.15em; }
.message-content h4 { font-size: 1em; }

.message-content p {
    margin-top: 0;
    margin-bottom: 10px;
}

.message-content ul, .message-content ol {
    margin-top: 0;
    margin-bottom: 10px;
    padding-left: 24px;
}

.message-content li {
    margin-bottom: 4px;
}

.message-content code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.9em;
    color: #202124;
}

.message-content pre {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
    border: 1px solid #e8eaed;
}

.message-content pre code {
    background: none;
    padding: 0;
    font-size: 0.85em;
    line-height: 1.5;
}

.message-content blockquote {
    border-left: 4px solid #e8eaed;
    padding-left: 16px;
    margin: 10px 0;
    color: #5f6368;
    font-style: italic;
}

.message-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}

.message-content th, .message-content td {
    border: 1px solid #e8eaed;
    padding: 8px 12px;
    text-align: left;
}

.message-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.message-content a {
    color: #1a73e8;
    text-decoration: none;
}

.message-content a:hover {
    text-decoration: underline;
}

.message-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.message-content hr {
    border: none;
    border-top: 1px solid #e8eaed;
    margin: 16px 0;
}

.message-time {
    font-size: 0.75rem;
    color: #9aa0a6;
    margin-top: 4px;
    padding: 0 4px;
    font-weight: 400;
}

.message.user .message-time {
    text-align: right;
    padding-right: 4px;
}

.message.assistant .message-time {
    text-align: left;
    padding-left: 4px;
}

/* 流式消息动画 */
.streaming {
    position: relative;
}

.streaming::after {
    content: '▋';
    animation: blink 1.2s infinite;
    color: #1a73e8;
    font-weight: bold;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 加载消息样式 */
.loading-message-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading-spinner-icon {
    display: inline-flex;
    align-items: center;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 输入区域 */
.chat-input-container {
    padding: 20px;
    background: #ffffff;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.input-group-wrapper {
    max-width: 800px;
    width: 100%;
}

.tools-btn-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tools-btn, .file-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #5f6368;
    transition: color 0.2s, background 0.2s;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.tools-btn:hover, .file-btn:hover {
    color: #202124;
    background: #f1f3f4;
}

.tools-icon, .file-icon {
    width: 20px;
    height: 20px;
    color: currentColor;
    flex-shrink: 0;
}

.tools-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(60, 64, 67, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s;
    z-index: 1000;
    padding: 8px;
}

.tools-btn-wrapper.active .tools-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tools-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    color: #202124;
    font-size: 14px;
}

.tools-menu-item:hover {
    background: #f1f3f4;
}

.tools-menu-item svg {
    width: 20px;
    height: 20px;
    color: #5f6368;
    flex-shrink: 0;
}

.tools-menu-item span {
    white-space: nowrap;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    border: 1px solid #dadce0;
    border-radius: 24px;
    background: #ffffff;
    transition: all 0.2s;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.input-wrapper:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.input-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
}

.right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    color: #202124;
    background: transparent;
    font-weight: 400;
    padding: 0;
    min-height: 24px;
}

.message-input::placeholder {
    color: #9aa0a6;
}

.mode-selector-wrapper {
    position: relative;
}

.mode-selector-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #5f6368;
    font-weight: 400;
    transition: color 0.2s;
    white-space: nowrap;
}

.mode-selector-btn:hover {
    color: #202124;
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.mode-selector-wrapper.active .dropdown-arrow {
    transform: rotate(180deg);
}

.mode-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(60, 64, 67, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s;
    z-index: 1000;
}

.mode-selector-wrapper.active .mode-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    border-bottom: 1px solid #dadce0;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f1f3f4;
}

.dropdown-item.active {
    background: rgba(26, 115, 232, 0.1);
}

.dropdown-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 4px;
}

.dropdown-item-sub {
    font-size: 12px;
    color: #5f6368;
}

.badge-new {
    background: #1a73e8;
    color: #ffffff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.send-btn-circle {
    width: 36px;
    height: 36px;
    background: #f1f3f4;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    transition: all 0.2s;
    flex-shrink: 0;
}

.send-btn-circle:hover {
    background: #e8eaed;
    color: #202124;
}

.send-btn-circle:disabled {
    background: #f1f3f4;
    color: #dadce0;
    cursor: not-allowed;
}

.send-btn-circle svg {
    width: 20px;
    height: 20px;
}

/* 自定义滚动条 */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 文件上传相关 */
.upload-status {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: none;
    text-align: center;
}

.upload-status.success {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    display: block;
}

.upload-status.error {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
    display: block;
}

.upload-status.uploading {
    background: rgba(25, 118, 210, 0.15);
    color: #1976d2;
    border: 1px solid rgba(25, 118, 210, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(25, 118, 210, 0.3);
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 智能运维消息样式 */
.aiops-message {
    max-width: 90%;
}

.aiops-message .message-content {
    max-width: 100%;
    background: rgba(26, 115, 232, 0.05);
    border: 1px solid rgba(26, 115, 232, 0.2);
}

/* 详情折叠区域 */
.aiops-details {
    margin-bottom: 16px;
    width: 100%;
}

.details-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(26, 115, 232, 0.05);
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #1a73e8;
    font-weight: 500;
}

.details-toggle:hover {
    background: rgba(26, 115, 232, 0.1);
    border-color: rgba(26, 115, 232, 0.3);
}

.details-toggle.expanded {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.toggle-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.details-toggle.expanded .toggle-icon {
    transform: rotate(90deg);
}

.details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.details-content.expanded {
    max-height: 2000px;
    padding: 16px;
}

.detail-item {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(26, 115, 232, 0.03);
    border-left: 3px solid #1a73e8;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #202124;
    line-height: 1.6;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item strong {
    color: #1a73e8;
    font-weight: 600;
}

/* 加载遮罩层样式 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(26, 115, 232, 0.2);
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 0.9rem;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 240px;
    }
    
    .message-content {
        max-width: 90%;
        font-size: 0.9rem;
    }
    
    .input-wrapper {
        flex-wrap: wrap;
    }
    
    .mode-selector-wrapper {
        order: -1;
        width: 100%;
        margin-left: 0;
        margin-bottom: 8px;
    }
    
    .mode-selector-btn {
        width: 100%;
        justify-content: space-between;
    }
    
    .mode-dropdown {
        width: 100%;
        right: 0;
    }
}

/* ============================================================
   军讯智脑 MAB-Agent 新增样式
   ============================================================ */
.sidebar-subtitle {
    font-size: 11px;
    color: #8ab4f8;
    letter-spacing: 1px;
    margin-top: 2px;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary, #8e8ea0);
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
    width: 100%;
    text-align: left;
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-item:hover { background: rgba(255,255,255,.06); color: var(--text-primary, #e8eaed); }

.nav-item.active {
    background: linear-gradient(135deg, #1a73e8, #0d5bbd);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,115,232,.35);
}

.tab-panel { display: none; height: 100%; }
.tab-panel.active { display: flex; flex-direction: column; }

/* ---- 简报中心 ---- */
.briefing-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.card {
    background: var(--card-bg, #1e1f24);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 18px 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary, #e8eaed);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.config-field { display: flex; flex-direction: column; gap: 6px; }
.config-field label { font-size: 12px; color: var(--text-secondary, #9aa0a6); }

.config-field select,
.config-field input[type="text"] {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    color: var(--text-primary, #e8eaed);
    padding: 9px 10px;
    font-size: 14px;
    outline: none;
}

.config-field select:focus, .config-field input[type="text"]:focus {
    border-color: #1a73e8;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-primary, #e8eaed);
    padding: 9px 0;
    cursor: pointer;
}

.config-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.config-tip { font-size: 12px; color: var(--text-secondary, #9aa0a6); }

.primary-btn {
    background: linear-gradient(135deg, #1a73e8, #0d5bbd);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

.primary-btn:hover { box-shadow: 0 4px 14px rgba(26,115,232,.4); transform: translateY(-1px); }
.primary-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.ghost-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,.18);
    color: var(--text-primary, #e8eaed);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}

.ghost-btn:hover { border-color: #1a73e8; color: #8ab4f8; }

/* ---- 流水线 ---- */
.pipeline-stages { display: flex; flex-direction: column; gap: 8px; }

.stage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    font-size: 14px;
    transition: all .2s;
}

.stage-icon { width: 22px; text-align: center; }
.stage-label { flex: 1; color: var(--text-primary, #e8eaed); }
.stage-note { font-size: 12px; color: var(--text-secondary, #9aa0a6); }

/* ---- 简报结果 ---- */
.ai-disclosure {
    background: rgba(26,115,232,.12);
    border: 1px solid rgba(26,115,232,.35);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #8ab4f8;
    margin-bottom: 14px;
    line-height: 1.7;
}

.markdown-body { line-height: 1.75; }
.markdown-body h1 { font-size: 1.5em; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 8px; }
.markdown-body h2 { font-size: 1.25em; border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 6px; }
.markdown-body h3 { font-size: 1.1em; }
.markdown-body table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.markdown-body th, .markdown-body td { border: 1px solid rgba(255,255,255,.12); padding: 6px 10px; font-size: 13px; }
.markdown-body th { background: rgba(255,255,255,.06); }
.markdown-body code { background: rgba(255,255,255,.08); padding: 2px 5px; border-radius: 4px; font-size: 13px; }
.markdown-body pre { background: rgba(0,0,0,.4); padding: 12px; border-radius: 8px; overflow-x: auto; }
.markdown-body blockquote { border-left: 3px solid #1a73e8; margin: 8px 0; padding: 4px 12px; color: var(--text-secondary, #9aa0a6); }
.markdown-body a { color: #8ab4f8; }

.result-actions { display: flex; gap: 8px; }

/* ---- 历史简报 ---- */
.history-item {
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}

.history-item:hover { background: rgba(255,255,255,.06); }

.history-item-title {
    font-size: 13px;
    color: var(--text-primary, #e8eaed);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-meta { font-size: 11px; color: var(--text-secondary, #8e8ea0); margin-top: 2px; }
.history-empty { font-size: 12px; color: var(--text-secondary, #8e8ea0); padding: 8px; }

/* ---- 打字动画 ---- */
.typing-dots i {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #9aa0a6;
    margin: 0 2px;
    animation: typingBounce 1.2s infinite;
}
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); opacity:.5; } 30% { transform: translateY(-4px); opacity:1; } }

/* ============================================================
   统一深色主题覆盖（修复外层层级白底与深色卡片冲突）
   ============================================================ */
:root {
    --bg: #1e1f24;
    --card-bg: #26282c;
    --panel-bg: #2d3035;
    --text: #e8eaed;
    --text-2: #bdc1c6;
    --text-3: #9aa0a6;
    --border: rgba(255,255,255,.1);
}

body { background: var(--bg); color: var(--text); }

/* 侧边栏 */
.sidebar { background: #26282c; border-right-color: var(--border); }
.sidebar-header { border-bottom-color: var(--border); }
.sidebar-title { color: var(--text); }
.sidebar-subtitle { color: var(--text-3); }
.nav-item { color: var(--text-2); }
.nav-item.active { background: rgba(26,115,232,.25); color: var(--text); }
.new-chat-btn { color: var(--text); }
.new-chat-btn:hover { background: #2d3035; }
.history-header { color: var(--text-3); }
.history-item:hover { background: #2d3035; }
.history-item-title { color: var(--text); }
.history-item-meta { color: var(--text-3); }
.sidebar-footer { border-top-color: var(--border); }

/* 主内容与表单控件 */
.main-content { background: var(--bg); }
.config-field input, .config-field select, textarea#requirementInput {
    background: #1a1b1e; color: var(--text); border-color: var(--border);
}
.config-field label { color: var(--text-3); }
.card { background: var(--card-bg); border-color: var(--border); }
.ghost-btn { background: rgba(255,255,255,.06); color: var(--text-2); }
.ghost-btn:hover { background: rgba(255,255,255,.12); border-color: #8ab4f8; color: var(--text); }

/* 左下角设置按钮：大、醒目 */
#settingsBtn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 15px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2f7cf6, #1a5fd0 55%, #0d4fa8);
    border: 1px solid rgba(255,255,255,.28);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(26,115,232,.5), inset 0 1px 0 rgba(255,255,255,.18);
    transition: all .2s ease;
}
#settingsBtn:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,115,232,.6); }
#settingsBtn:active { transform: translateY(0); filter: brightness(1.02); }
#settingsBtn .settings-btn-icon { font-size: 26px; flex-shrink: 0; line-height: 1; }
#settingsBtn .settings-btn-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
#settingsBtn .settings-btn-main { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
#settingsBtn .settings-btn-sub { font-size: 12px; opacity: .85; font-weight: 400; letter-spacing: .5px; }

/* 弹窗/设置面板 */
#settingsModal > div { background: var(--card-bg); color: var(--text); }
#settingsModal label { color: var(--text-2); font-size: 13px; }
#settingsModal .mf-label { color: var(--text-2); font-size: 13px; }
#settingsModal input, #settingsModal select {
    background: #1a1b1e; color: var(--text); border: 1px solid var(--border);
}
#settingsModal .file-chip { background: rgba(255,255,255,.08); color: var(--text); }
#settingsModal .empty-hint { color: var(--text-3); }
#settingsModal .confirm-card { background: var(--panel-bg); border-color: var(--border); }

/* 上传提示 chip（Word 需求上传后出现，统一深色） */
.file-chip { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid var(--border); }

/* 解析确认卡片 */
.confirm-card { background: var(--panel-bg); border-color: var(--border); }
.confirm-card .k { color: var(--text-3); }
.confirm-card .v { color: var(--text); }
.confirm-card .confirm-field-wide { grid-column: 1 / -1; }
.confirm-table-wrap { margin-top: 8px; overflow-x: auto; }
.confirm-table { width: 100%; min-width: 420px; border-collapse: collapse; color: var(--text); }
.confirm-table th, .confirm-table td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; font-size: 13px; }
.confirm-table th { background: rgba(255,255,255,.08); font-weight: 600; }
.confirm-table td { background: rgba(255,255,255,.03); }
.confirm-field input, .confirm-field select {
    background: #1a1b1e; color: var(--text); border-color: var(--border);
}

/* 表格（截图刺眼的白底） */
.sim-result-metrics table, .briefing-content table {
    border-collapse: collapse; width: 100%; min-width: 520px; margin: 10px 0; color: var(--text);
}
.sim-result-metrics, .briefing-content { overflow-x: auto; }
.sim-result-metrics th, .sim-result-metrics td,
.briefing-content th, .briefing-content td {
    border: 1px solid var(--border); padding: 8px 10px; font-size: 13px; vertical-align: top; line-height: 1.5;
}
.sim-result-metrics th, .briefing-content th { background: #263448; color: #f3f6fb; font-weight: 600; white-space: nowrap; }
.sim-result-metrics td, .briefing-content td { background: rgba(255,255,255,.03); }
.briefing-content tr:nth-child(even) td, .sim-result-metrics tr:nth-child(even) td { background: rgba(255,255,255,.055); }
.briefing-content h2, .briefing-content h3 { margin-top: 1.35em; }

/* 报告与提示 */
.markdown-body { color: var(--text); }
.ai-disclosure { color: var(--text-2); }
.run-dir-box { background: var(--panel-bg); color: var(--text-2); }
.empty-hint { color: var(--text-3); }
.error-banner, .smoke-banner { color: var(--text); }

/* ============================================================
   侧边栏「新建任务 / 使用说明」并列按钮行
   ============================================================ */
.sidebar-action-row {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.sidebar-action-row .new-chat-btn {
    width: auto;
    flex: 1;
    min-width: 0;
    justify-content: center;
    gap: 6px;
    padding: 10px 6px;
    font-size: 13px;
}
.sidebar-action-row .new-chat-btn svg { width: 16px; height: 16px; }
.sidebar-action-row .help-nav-item {
    flex: 1;
    min-width: 0;
    width: auto;
    justify-content: center;
    gap: 6px;
    padding: 10px 6px;
    font-size: 13px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
}
.sidebar-action-row .help-nav-item:hover { background: rgba(255,255,255,.12); }
.sidebar-action-row .help-nav-item.active {
    background: linear-gradient(135deg, #1a73e8, #0d5bbd);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(26,115,232,.35);
}
.sidebar-action-row .help-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================================
   「使用说明」独立页面
   ============================================================ */
.help-container {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px 40px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}
.help-header { margin-bottom: 20px; }
.help-header h2 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.help-sub { font-size: 13px; color: var(--text-3); }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.help-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.help-card .card-title { margin-bottom: 10px; font-size: 15px; }
.help-steps { margin: 0; padding-left: 20px; color: var(--text-2); }
.help-steps li { margin-bottom: 10px; font-size: 13.5px; line-height: 1.7; }
.help-steps b { color: var(--text); }
.help-tip {
    margin-top: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    background: rgba(26,115,232,.1);
    border: 1px solid rgba(26,115,232,.25);
    color: #8ab4f8;
    font-size: 12.5px;
    line-height: 1.6;
}
.help-tip-inline {
    display: inline;
    color: #8ab4f8;
    font-size: 12px;
}

/* ============================================================
   知识问答：欢迎区 / 深色适配 / 下拉显隐修复
   ============================================================ */
/* 欢迎区（进入聊天页时可见，JS 在首条消息后移除 centered） */
.welcome-greeting { color: var(--text); font-size: 1.35rem; font-weight: 400; padding: 24px; }
.welcome-title { font-size: 1.35rem; font-weight: 600; margin-bottom: 4px; }
.welcome-sub { font-size: 14px; color: var(--text-2); font-weight: 400; margin-top: 4px; }
.welcome-steps {
    text-align: left;
    margin: 18px auto 6px;
    max-width: 640px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
}
.welcome-step { font-size: 13.5px; color: var(--text-2); line-height: 1.9; }
.welcome-step b { color: var(--text); }
.chat-quick-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px auto 4px; max-width: 640px; }
.chat-quick-chips .chip { padding: 6px 14px; font-size: 13px; }
.welcome-kb { font-size: 12px; color: var(--text-3); margin-top: 8px; }

/* 聊天区深色适配 */
.chat-container, .chat-messages, .chat-input-container { background: var(--bg); }
.chat-messages { color: var(--text); }
.input-wrapper { background: #1a1b1e; border-color: var(--border); box-shadow: none; }
.input-wrapper:focus-within { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,.15); }
.message-input { color: var(--text); }
.message-input::placeholder { color: var(--text-3); }
.message.user .message-content { background: #2d3035; color: var(--text); }
.message.assistant .message-content { background: transparent; color: var(--text); }
.message-time { color: var(--text-3); }
.message-content h1, .message-content h2 { border-bottom-color: var(--border); }
.message-content code { background: rgba(255,255,255,.1); color: var(--text); }
.message-content pre { background: rgba(0,0,0,.4); border-color: var(--border); }
.message-content blockquote { border-left-color: #1a73e8; color: var(--text-2); }
.message-content th, .message-content td { border-color: var(--border); }
.message-content th { background: rgba(255,255,255,.08); }
.message-content a { color: #8ab4f8; }
.tools-menu, .mode-dropdown { background: var(--card-bg); border-color: var(--border); box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.tools-btn { color: var(--text-2); }
.tools-btn:hover { color: var(--text); background: #2d3035; }
.tools-menu-item { color: var(--text); }
.tools-menu-item:hover { background: rgba(255,255,255,.08); }
.tools-menu-item svg { color: var(--text-2); }
.dropdown-header { color: var(--text-3); }
.dropdown-item:hover { background: rgba(255,255,255,.08); }
.dropdown-item.active { background: rgba(26,115,232,.22); }
.dropdown-item-main { color: var(--text); }
.dropdown-item-sub { color: var(--text-3); }
.mode-selector-btn { color: var(--text-2); }
.mode-selector-btn:hover { color: var(--text); }
.send-btn-circle { background: #2d3035; color: var(--text-2); }
.send-btn-circle:hover { background: #3a3d42; color: var(--text); }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); }
.chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }

/* 下拉菜单显隐修复：JS 切换 .show，补齐显隐规则 */
.tools-btn-wrapper.show .tools-menu, .tools-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.mode-selector-wrapper.show .mode-dropdown, .mode-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ============================================================
   智能体流水线：三大阶段分组 + 常驻总览条
   ============================================================ */
/* 流水线阶段标题（分析内容/生成代码/运行代码） */
.phase-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 12px 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.phase-header .phase-icon { font-size: 15px; }
.phase-header .phase-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
}
.phase-header .phase-desc { font-size: 12px; color: var(--text-3); }
.pipeline-stages .stage-item { margin-bottom: 6px; }

/* 常驻流水线总览条（仿真中心配置卡内） */
.pipeline-overview {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,.04);
}
.po-step {
    flex: 1 1 120px;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    text-align: center;
}
.po-step b { font-size: 14px; color: var(--text); }
.po-step small { font-size: 11px; color: var(--text-3); line-height: 1.4; }
.po-step .po-ico { font-size: 20px; }
.po-step.po-main { border-color: rgba(26,115,232,.45); background: rgba(26,115,232,.12); }
.po-step.po-in { border-color: rgba(212,167,44,.4); background: rgba(212,167,44,.1); }
.po-step.po-out { border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.po-arrow {
    align-self: center;
    color: var(--text-3);
    font-size: 18px;
    flex-shrink: 0;
    padding: 0 2px;
}

/* ============================================================
   MATLAB 运行可视化进度条
   ============================================================ */
.run-progress {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(26,115,232,.35);
    border-radius: 12px;
    background: rgba(26,115,232,.08);
}
.run-progress-label {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 500;
}
.run-progress-track {
    height: 12px;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
}
.run-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 8px;
    background: linear-gradient(90deg, #2f7cf6, #1a5fd0);
    transition: width .35s ease;
    box-shadow: 0 0 8px rgba(47,124,246,.5);
}

/* ============================================================
   需求输入框：展开/收起 + 字符计数
   ============================================================ */
.req-title-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.req-count {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
}
.req-count.near-limit { color: #fbbf24; }
.req-expand-btn {
    padding: 3px 12px;
    font-size: 12px;
    border-radius: 8px;
}
.req-input-wrap textarea#requirementInput {
    transition: height .22s ease, min-height .22s ease;
}
.req-input-wrap.expanded textarea#requirementInput {
    height: calc(100vh - 360px);
    min-height: 320px;
}
/* 展开时输入框聚焦高亮 */
.req-input-wrap.expanded textarea#requirementInput:focus {
    border-color: #2f7cf6;
    box-shadow: 0 0 0 3px rgba(47,124,246,.15);
}

/* ============ 多用户部署：MATLAB 执行方式选择 + 本机执行提示 ============ */
.exec-mode-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 2px 2px;
    font-size: 13px;
}
.exec-mode-label { color: var(--text-2); font-weight: 600; }
.exec-mode-segmented {
    display: inline-flex;
    min-height: 36px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    overflow: hidden;
    background: #1a1b1e;
}
.exec-mode-option { position: relative; display: flex; cursor: pointer; }
.exec-mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.exec-mode-option span {
    display: flex;
    align-items: center;
    padding: 7px 13px;
    color: var(--text-2);
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,.12);
}
.exec-mode-option:last-child span { border-right: 0; }
.exec-mode-option input:checked + span {
    background: #1a73e8;
    color: #fff;
}
.exec-mode-option input:focus-visible + span { outline: 2px solid #8ab4f8; outline-offset: -2px; }
.worker-setup-btn { padding: 6px 12px; }
.exec-mode-row .config-tip { color: var(--text-3); font-size: 12px; }
.remote-hint {
    margin: 8px 2px 4px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(47,124,246,.12);
    border: 1px solid rgba(47,124,246,.35);
    color: var(--text-1);
    font-size: 12.5px;
    line-height: 1.7;
}
.remote-hint code {
    background: #1a1b1e;
    padding: 1px 6px;
    border-radius: 4px;
    color: #e8eaed;
    font-size: 12px;
    word-break: break-all;
}
.worker-status-ok { color: #4ade80; font-weight: 600; }
.worker-status-off { color: #f85149; }
.worker-connection-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 640px) {
    .exec-mode-row { align-items: flex-start; }
    .exec-mode-label { width: 100%; }
    .exec-mode-segmented { width: 100%; }
    .exec-mode-option { flex: 1; }
    .exec-mode-option span { justify-content: center; width: 100%; }
    .worker-setup-btn { flex: 1; }
}

@media (max-width: 768px) {
    body { overflow: auto; }
    .app-layout {
        width: 100%;
        min-height: 100vh;
        height: auto;
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-header { padding: 10px 14px; }
    .sidebar-content {
        flex: none;
        padding: 8px;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
    }
    .main-nav { flex-direction: row; margin: 0; }
    .main-nav .nav-item { width: auto; flex: 1; justify-content: center; }
    .sidebar-action-row { min-width: 154px; }
    .chat-history-section { display: none; }
    .sidebar-footer { grid-column: 1 / -1; padding: 0 !important; border-top: 0 !important; }
    .sidebar-footer #settingsBtn { min-height: 42px; }
    .settings-btn-sub { display: none; }
    .main-content { width: 100%; min-width: 0; overflow: visible; }
    .tab-panel, .tab-panel.active { height: auto; min-height: 0; }
    .briefing-container { overflow: visible; padding: 12px; }
    .pipeline-overview { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .pipeline-overview .po-step { min-width: 170px; }
}
