/* BIC-QA 设置页面样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #F4F6F9;
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

.header {
    background: #F4F6F9;
    color: #333;
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-left {
    text-align: left;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.title-text {
    display: flex;
    flex-direction: column;
}

.header-right {
    display: flex;
    align-items: center;
}

.back-btn {
    background: #667eea;
    color: white;
    border: 1px solid #667eea;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.back-icon {
    font-size: 16px;
    font-weight: bold;
}

.title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.subtitle {
    font-size: 16px;
    color: #666;
}

.company-name {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.main {
    padding: 30px;
}

.config-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.section-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.knowledge-actions {
    text-align: center;
    padding: 30px 20px;
    background: #F4F6F9;
    border-radius: 8px;
    border: 2px dashed #e9ecef;
}

.action-description {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

/* 服务商配置样式 */
.providers-header, .models-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.providers-header h3, .models-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.rules-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

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

.reset-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.providers-list, .models-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.provider-item, .model-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.provider-item:hover, .model-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.rule-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.rule-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.provider-header, .model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.provider-name, .model-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

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

.rule-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.provider-actions, .model-actions {
    display: flex;
    gap: 8px;
}

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

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.edit-btn {
    background: #3498db;
    color: white;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.test-btn {
    background: #27ae60;
    color: white;
}

.provider-details, .model-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.rule-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

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

.detail-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: break-word;
    max-height: 60px;
    overflow-y: auto;
}

/* 表单覆盖层样式 */
.form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.form-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e5e9;
}

.form-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-help {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    flex: 1;
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.toggle-password:hover {
    color: #667eea;
}

.checkbox-label {
    margin-left: 10px;
    font-weight: normal;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #667eea;
}

/* 通用设置样式 */
.settings-list {
    display: grid;
    gap: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.setting-item label {
    font-weight: 600;
    color: #333;
}

.setting-item select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

/* 操作按钮区域 */
.actions-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-active {
    background: #27ae60;
}

.status-inactive {
    background: #e74c3c;
}

.status-testing {
    background: #f39c12;
    animation: pulse 1s infinite;
}

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

.default-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
    }
    
    .main {
        padding: 20px;
    }
    
    .config-section {
        padding: 20px;
    }
    
    .form-container {
        width: 95%;
        padding: 20px;
    }
    
    .actions-section {
        flex-direction: column;
    }
    
    .provider-details, .model-details {
        grid-template-columns: 1fr;
    }
    
    .rule-details {
        grid-template-columns: 1fr;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .registration-form .form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .agreement-section {
        max-width: none;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .btn-primary,
    .action-buttons .btn-secondary {
        width: 100%;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-left {
        text-align: center;
    }
    
    .title-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-icon {
        width: 40px;
        height: 40px;
    }
    
    .back-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
}

/* 注册表单样式 */
.registration-form {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.registration-form .form-group {
    margin-bottom: 15px;
}

.registration-form .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.agreement-section {
    flex: 1;
    max-width: 400px;
}

.agreement-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.agreement-label input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.checkbox-text {
    flex: 1;
}

.agreement-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

.agreement-link:hover {
    border-bottom-color: #667eea;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* 知识库服务配置样式 */
.knowledge-service-form {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.knowledge-service-form .form-group {
    margin-bottom: 15px;
}

.knowledge-service-form .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* 知识库管理样式 */
.knowledge-bases-container {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.knowledge-bases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.knowledge-bases-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.knowledge-bases-actions {
    display: flex;
    gap: 10px;
}

.knowledge-bases-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.knowledge-base-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.knowledge-base-item:hover {
    background: #F4F6F9;
    border-color: #667eea;
}

.knowledge-base-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.knowledge-base-id {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.knowledge-base-name {
    font-weight: 500;
    color: #333;
}

.knowledge-base-category {
    font-size: 12px;
    color: #666;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
}

.knowledge-bases-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.knowledge-bases-info p {
    margin: 0;
    color: #1976d2;
    font-size: 14px;
    line-height: 1.5;
}

/* 空状态样式 */
.empty-knowledge-bases {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-knowledge-bases-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-knowledge-bases-text {
    font-size: 16px;
    margin-bottom: 10px;
}

.empty-knowledge-bases-subtext {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state p:first-child {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-state p:last-child {
    font-size: 14px;
    color: #999;
}

/* 状态指示器样式 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-active {
    background: #10b981;
}

.status-inactive {
    background: #6b7280;
}

.status-testing {
    background: #f59e0b;
    animation: pulse 1.5s infinite;
}

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

.footer {
    background: #F4F6F9;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.version {
    font-size: 14px;
    color: #666;
}

/* 反馈历史样式 */
.feedback-container {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #F4F6F9;
    border-bottom: 1px solid #e9ecef;
}

.feedback-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.feedback-actions {
    display: flex;
    gap: 10px;
}

.feedback-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #F4F6F9;
    border-bottom: 1px solid #e9ecef;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.like-stat {
    color: #28a745;
}

.dislike-stat {
    color: #dc3545;
}

.feedback-list {
    max-height: 400px;
    overflow-y: auto;
}

.feedback-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.feedback-item:hover {
    background: #F4F6F9;
}

.feedback-item:last-child {
    border-bottom: none;
}

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

.feedback-type {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.feedback-type.like {
    background: #d4edda;
    color: #155724;
}

.feedback-type.dislike {
    background: #f8d7da;
    color: #721c24;
}

.feedback-time {
    font-size: 12px;
    color: #666;
}

.feedback-content {
    margin-bottom: 10px;
}

.feedback-question {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.feedback-answer {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.feedback-meta {
    display: flex;
    gap: 15px;
    font-size: 11px;
    color: #888;
}

.feedback-model, .feedback-knowledge-base, .feedback-url {
    display: flex;
    align-items: center;
    gap: 3px;
}

.empty-feedback {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.empty-subtext {
    font-size: 14px;
    opacity: 0.7;
    line-height: 1.5;
} 

/* 消息提示动画 */
@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;
    }
} 

/* 模型选择弹窗样式 */
.model-selection-dialog {
    animation: slideIn 0.3s ease-out;
}

.model-selection-content {
    animation: slideIn 0.3s ease-out;
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.model-selection-content h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
    position: relative;
    flex-shrink: 0;
}

.model-selection-content h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #667eea;
}

.model-list {
    background: #F4F6F9;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin-bottom: 20px;
    min-height: 70px; /* 添加默认最小高度 */
}

.model-list::-webkit-scrollbar {
    width: 8px;
}

.model-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.model-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.model-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.model-list > div {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    margin: 8px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.model-list > div:last-child {
    border-bottom: none;
    margin-bottom: 8px;
}

.model-list > div:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.model-list > div input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.model-list > div label {
    flex: 1;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    margin: 0;
    padding: 4px 0;
    font-size: 14px;
}

.model-list > div span {
    color: #666;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* 全选区域样式 */
.model-selection-content > div:nth-child(2) {
    background: #F4F6F9;
    color: #333;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.model-selection-content > div:nth-child(2) input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.model-selection-content > div:nth-child(2) label {
    font-weight: 600;
    color: #333;
    cursor: pointer;
    font-size: 14px;
}

/* 批量设置区域样式 */
.model-selection-content > div:nth-child(4) {
    background: #F4F6F9;
    color: #333;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.model-selection-content > div:nth-child(4) h4 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}

.model-selection-content > div:nth-child(4) > div {
    display: flex;
    gap: 30px;
    align-items: center;
}

.model-selection-content > div:nth-child(4) > div > div {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.model-selection-content > div:nth-child(4) label {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    min-width: 80px;
}

.model-selection-content > div:nth-child(4) input {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 120px;
    flex-shrink: 0;
}

.model-selection-content > div:nth-child(4) input::placeholder {
    color: #999;
}

.model-selection-content > div:nth-child(4) input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按钮区域样式 */
.model-selection-content > div:last-child {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.model-selection-content > div:last-child button {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 100px;
}

.model-selection-content > div:last-child button:first-child {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.model-selection-content > div:last-child button:first-child:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.model-selection-content > div:last-child button:last-child {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid #667eea;
}

.model-selection-content > div:last-child button:last-child:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    border-color: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .model-selection-content {
        margin: 20px;
        max-width: calc(100% - 40px);
        max-height: calc(100vh - 40px);
        padding: 20px;
    }
    
    .model-selection-content > div:nth-child(4) > div {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .model-selection-content > div:nth-child(4) > div > div {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .model-selection-content > div:nth-child(4) label {
        min-width: auto;
    }
    
    .model-selection-content > div:nth-child(4) input {
        width: 100%;
    }
    
    .model-selection-content > div:last-child {
        flex-direction: column;
    }
    
    .model-selection-content > div:last-child button {
        width: 100%;
    }
} 

/* 服务商类型相关样式 */
.provider-type-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.provider-type-selector select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.provider-type-selector select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.btn-manage-types {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-manage-types:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.provider-type-description {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.description-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.description-icon {
    font-size: 14px;
}

.description-text {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    flex: 1;
}

.btn-reset-defaults {
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-reset-defaults:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* 服务商类型管理对话框样式 */
.provider-type-manager-dialog,
.provider-type-form-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.provider-type-manager-dialog .dialog-content,
.provider-type-form-dialog .dialog-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.provider-type-manager-dialog .dialog-content {
    max-width: 800px;
}

.dialog-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.dialog-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.dialog-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.provider-types-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.provider-type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.provider-type-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.type-info {
    flex: 1;
}

.type-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.type-description {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 4px;
}

.type-endpoint {
    font-size: 13px;
    color: #007bff;
    font-family: 'Courier New', monospace;
}

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

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.add-type-section {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-add-type {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-type:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-cancel-manager {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel-manager:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* 表单区域样式 */
.provider-type-form-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.form-section-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.btn-close-form {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-form:hover {
    background: #c82333;
}

/* 表单区域内的表单样式 */
.provider-type-form-section .form-group {
    margin-bottom: 16px;
}

.provider-type-form-section .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.provider-type-form-section .form-group input,
.provider-type-form-section .form-group select,
.provider-type-form-section .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.provider-type-form-section .form-group input:focus,
.provider-type-form-section .form-group select:focus,
.provider-type-form-section .form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.provider-type-form-section .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.provider-type-form-section .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.provider-type-form-section .btn-primary,
.provider-type-form-section .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.provider-type-form-section .btn-primary {
    background: #007bff;
    color: white;
}

.provider-type-form-section .btn-primary:hover {
    background: #0056b3;
}

.provider-type-form-section .btn-secondary {
    background: #6c757d;
    color: white;
}

.provider-type-form-section .btn-secondary:hover {
    background: #5a6268;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .provider-type-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .provider-type-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .type-actions {
        justify-content: flex-end;
    }
    
    .add-type-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-add-type,
    .btn-cancel-manager {
        width: 100%;
    }
    
    .provider-type-form-section {
        margin-top: 16px;
        padding: 16px;
    }
    
    .form-section-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .form-section-header h4 {
        text-align: center;
    }
    
    .btn-close-form {
        align-self: flex-end;
    }
    
    .provider-type-form-section .form-actions {
        flex-direction: column;
    }
    
    .provider-type-form-section .btn-primary,
    .provider-type-form-section .btn-secondary {
        width: 100%;
    }
    
    .provider-type-manager-dialog .dialog-content,
    .provider-type-form-dialog .dialog-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .dialog-body {
        padding: 16px;
    }
} 

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a202c;
    }
    
    .container {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .header {
        background: #2d3748;
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }
    
    .title {
        color: #e2e8f0;
    }
    
    .subtitle, .company-name {
        color: #a0aec0;
    }
    
    .config-section {
        background: #4a5568;
        border-color: #718096;
    }
    
    .provider-item, .model-item, .setting-item {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .form-container {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .form-group input,
    .form-group select {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .btn-secondary {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #718096;
    }
    
    .footer {
        background: #2d3748;
        border-top-color: #4a5568;
    }
    
    .version {
        color: #a0aec0;
    }
    .section-title{
        color: #fff;
    }
    .providers-header h3, .models-header h3,.provider-name, .model-name{
        color: #fff;
    }
    .detail-label{
        color: #ddd;
    }
    
    /* 深色模式下的文字和背景色修复 */
    .detail-value {
        color: #e2e8f0;
    }
    
    .section-description {
        color: #a0aec0;
    }
    
    .action-description {
        color: #a0aec0;
    }
    
    .form-help {
        color: #a0aec0;
    }
    
    .form-group label {
        color: #e2e8f0;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .form-group input::placeholder,
    .form-group select::placeholder,
    .form-group textarea::placeholder {
        color: #a0aec0;
    }
    
    .checkbox-label {
        color: #a0aec0;
    }
    
    .setting-item label {
        color: #e2e8f0;
    }
    
    .setting-item select {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .registration-form {
        background: #4a5568;
        border-color: #718096;
    }
    
    .agreement-label {
        color: #a0aec0;
    }
    
    .knowledge-service-form {
        background: #4a5568;
        border-color: #718096;
    }
    
    .knowledge-bases-container {
        background: #4a5568;
        border-color: #718096;
    }
    
    .knowledge-bases-header h3 {
        color: #e2e8f0;
    }
    
    .knowledge-base-item {
        background: #4a5568;
        border-color: #718096;
    }
    
    .knowledge-base-item:hover {
        background: #2d3748;
        border-color: #667eea;
    }
    
    .knowledge-base-name {
        color: #e2e8f0;
    }
    
    .knowledge-base-category {
        color: #a0aec0;
        background: #2d3748;
    }
    
    .knowledge-bases-info {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .knowledge-bases-info p {
        color: #90cdf4;
    }
    
    .empty-knowledge-bases,
    .empty-state {
        color: #a0aec0;
    }
    
    .empty-knowledge-bases-text,
    .empty-text {
        color: #e2e8f0;
    }
    
    .empty-knowledge-bases-subtext,
    .empty-subtext {
        color: #a0aec0;
    }
    
    .feedback-container {
        background: #4a5568;
        border-color: #718096;
    }
    
    .feedback-header {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .feedback-header h3 {
        color: #e2e8f0;
    }
    
    .feedback-stats {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .stat-label {
        color: #a0aec0;
    }
    
    .stat-value {
        color: #e2e8f0;
    }
    
    .feedback-item {
        border-color: #4a5568;
    }
    
    .feedback-item:hover {
        background: #2d3748;
    }
    
    .feedback-question {
        color: #e2e8f0;
    }
    
    .feedback-answer {
        color: #a0aec0;
    }
    
    .feedback-meta {
        color: #718096;
    }
    
    .empty-feedback {
        color: #a0aec0;
    }
    
    .empty-text {
        color: #e2e8f0;
    }
    
    .empty-subtext {
        color: #a0aec0;
    }
    
    .model-selection-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .model-selection-content h3 {
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .model-selection-content h3::after {
        background: #667eea;
    }
    
    .model-list {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .model-list > div {
        background: #4a5568;
        border-color: #718096;
    }
    
    .model-list > div:hover {
        background: #2d3748;
        border-color: #667eea;
    }
    
    .model-list > div label {
        color: #e2e8f0;
    }
    
    .model-list > div span {
        color: #a0aec0;
        background: #2d3748;
    }
    
    .model-selection-content > div:nth-child(2) {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .model-selection-content > div:nth-child(2) label {
        color: #e2e8f0;
    }
    
    .model-selection-content > div:nth-child(4) {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .model-selection-content > div:nth-child(4) h4 {
        color: #e2e8f0;
    }
    
    .model-selection-content > div:nth-child(4) label {
        color: #e2e8f0;
    }
    
    .model-selection-content > div:nth-child(4) input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .model-selection-content > div:nth-child(4) input::placeholder {
        color: #a0aec0;
    }
    
    .model-selection-content > div:last-child {
        border-color: #4a5568;
    }
    
    .model-selection-content > div:last-child button:first-child {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #718096;
    }
    
    .model-selection-content > div:last-child button:first-child:hover {
        background: #2d3748;
        border-color: #667eea;
    }
    
    .model-selection-content > div:last-child button:last-child {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: 2px solid #667eea;
    }

    .model-selection-content > div:last-child button:last-child:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
        border-color: #5a6fd8;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    
    .provider-type-selector select {
        /* background: #4a5568;
        border-color: #718096; */
        color: #fff;
    }
    
    .provider-type-description {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .description-text {
        color: #a0aec0;
    }
    
    .provider-type-item {
        background: #4a5568;
        border-color: #718096;
    }
    
    .provider-type-item:hover {
        border-color: #667eea;
    }
    
    .type-name {
        color: #e2e8f0;
    }
    
    .type-description {
        color: #a0aec0;
    }
    
    .type-endpoint {
        color: #90cdf4;
    }
    
    .provider-type-form-section {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .form-section-header h4 {
        color: #e2e8f0;
    }
    
    .provider-type-form-section .form-group label {
        color: #e2e8f0;
    }
    
    .provider-type-form-section .form-group input,
    .provider-type-form-section .form-group select,
    .provider-type-form-section .form-group textarea {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .provider-type-form-section .form-group input::placeholder,
    .provider-type-form-section .form-group select::placeholder,
    .provider-type-form-section .form-group textarea::placeholder {
        color: #a0aec0;
    }
    
    .provider-type-form-section .form-actions {
        border-color: #4a5568;
    }
    
    .dialog-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .dialog-header {
        background: #4a5568;
        border-color: #718096;
    }
    
    .dialog-header h3 {
        color: #e2e8f0;
    }
    
    .close-btn {
        color: #a0aec0;
    }
    
    .close-btn:hover {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .form-header {
        border-color: #4a5568;
    }
    
    .form-header h3 {
        color: #e2e8f0;
    }
    
    .form-actions {
        border-color: #4a5568;
    }
    
    .knowledge-actions {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .providers-header,
    .models-header,
    .rules-header {
        border-color: #4a5568;
    }
    
    .providers-header h3,
    .models-header h3,
    .rules-header h3 {
        color: #e2e8f0;
    }
    
    .provider-header,
    .model-header,
    .rule-header {
        border-color: #4a5568;
    }
    
    .provider-name,
    .model-name,
    .rule-name {
        color: #e2e8f0;
    }
    
    .provider-item,
    .model-item,
    .rule-item {
        background: #4a5568;
        border-color: #718096;
    }
    
    .provider-item:hover,
    .model-item:hover,
    .rule-item:hover {
        background: #2d3748;
        border-color: #667eea;
    }
    
    .setting-item {
        background: #4a5568;
        border-color: #718096;
    }
    
    .setting-item label {
        color: #e2e8f0;
    }
    
    .actions-section {
        border-color: #4a5568;
    }
    
    .footer {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .version {
        color: #a0aec0;
    }
    
    /* 滚动条样式 */
    .model-list::-webkit-scrollbar-track {
        background: #2d3748;
    }
    
    .model-list::-webkit-scrollbar-thumb {
        background: #4a5568;
    }
    
    .model-list::-webkit-scrollbar-thumb:hover {
        background: #718096;
    }
    .dialog-body{
        background: #4a5568;
    }
}
