/* 视图特定样式 */

/* 仪表盘 */
.dashboard-overview {
    margin-bottom: 30px;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-recent {
    margin-bottom: 30px;
}

/* 项目管理 */
.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.projects-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.projects-actions {
    display: flex;
    gap: 12px;
}

.projects-search {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.projects-search input {
    min-width: 300px;
}

.projects-filters {
    display: flex;
    gap: 12px;
}

.projects-empty {
    text-align: center;
    padding: 60px 20px;
    color: #909399;
}

.projects-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    color: #c0c4cc;
}

.projects-empty-text {
    font-size: 16px;
    margin-bottom: 20px;
}

/* 文件编辑器 */
.editor-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    height: calc(100vh - 140px);
}

.editor-sidebar {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.editor-main {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.editor-content {
    flex: 1;
    position: relative;
}

.editor-content .CodeMirror {
    height: 100%;
    font-size: 14px;
    line-height: 1.5;
}

.editor-status {
    padding: 8px 20px;
    background: #fafafa;
    border-top: 1px solid #ebeef5;
    font-size: 12px;
    color: #909399;
    display: flex;
    justify-content: space-between;
}

/* 内容生成 */
.generation-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    height: calc(100vh - 140px);
}

.generation-main {
    display: flex;
    flex-direction: column;
}

.generation-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.generation-form {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.generation-form-section {
    margin-bottom: 24px;
}

.generation-form-section:last-child {
    margin-bottom: 0;
}

.generation-form-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.generation-preview {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.generation-preview-header {
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.generation-preview-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
}

.generation-stream-text {
    white-space: pre-wrap;
    font-family: inherit;
}

.generation-stats {
    background: #f8f9fa;
    padding: 12px 20px;
    border-top: 1px solid #ebeef5;
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 20px;
}

/* 配置管理 */
.config-tabs {
    display: flex;
    background: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 0;
}

.config-tab {
    padding: 16px 24px;
    background: #fafafa;
    border: none;
    border-right: 1px solid #ebeef5;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #606266;
    transition: all 0.3s ease;
}

.config-tab:last-child {
    border-right: none;
}

.config-tab:hover {
    background: #f0f0f0;
    color: #2c3e50;
}

.config-tab.active {
    background: #409eff;
    color: #fff;
}

.config-content {
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    min-height: 500px;
}

.config-test-result {
    margin-top: 16px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

.config-test-result.success {
    background: #f0f9f0;
    color: #67c23a;
    border: 1px solid #c2e7b0;
}

.config-test-result.error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

/* 向量管理 */
.vector-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.vector-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.vector-operations {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.vector-search {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.vector-search-form {
    margin-bottom: 20px;
}

.vector-search-results {
    max-height: 400px;
    overflow-y: auto;
}

.vector-search-item {
    padding: 16px;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #fafafa;
}

.vector-search-item-score {
    float: right;
    background: #409eff;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.vector-search-item-content {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #2c3e50;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .editor-layout {
        grid-template-columns: 250px 1fr;
    }
    
    .generation-layout {
        grid-template-columns: 1fr 350px;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .editor-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .editor-sidebar {
        order: 2;
        height: 300px;
    }
    
    .editor-main {
        order: 1;
        height: 400px;
    }
    
    .generation-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .generation-sidebar {
        order: 1;
    }
    
    .generation-main {
        order: 2;
        height: 400px;
    }
    
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .projects-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .projects-search {
        flex-direction: column;
        align-items: stretch;
    }
    
    .projects-search input {
        min-width: auto;
    }
    
    .config-tabs {
        flex-wrap: wrap;
    }
    
    .config-tab {
        flex: 1;
        min-width: 120px;
    }
    
    .vector-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .vector-stats {
        grid-template-columns: 1fr;
    }
}

/* 打印样式 */
@media print {
    .sidebar,
    .main-header,
    .editor-toolbar,
    .generation-sidebar,
    .config-tabs,
    .vector-actions {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    
    .content-area {
        padding: 0;
    }
    
    .card,
    .generation-preview,
    .config-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }
} 