/* ===== 全局重置 ===== */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f7fa; color: #1a1a2e; min-height: 100vh; padding: 40px 20px; } .container { max-width: 1100px; width: 100%; margin: 0 auto; background: #ffffff; border-radius: 24px; padding: 32px 40px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08); } /* ===== 头部 ===== */ .header { text-align: center; margin-bottom: 24px; } .header h1 { font-size: 26px; font-weight: 700; background: linear-gradient(135deg, #6366f1, #8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .subtitle { color: #6b7280; font-size: 14px; margin-top: 2px; } /* ===== 工具栏 ===== */ .toolbar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; } .btn-primary { padding: 10px 24px; font-size: 14px; font-weight: 600; border: none; border-radius: 10px; background: #6366f1; color: #fff; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; } .btn-primary:hover { background: #4f46e5; transform: translateY(-1px); } .btn-refresh { padding: 10px 20px; font-size: 14px; font-weight: 500; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: #374151; cursor: pointer; transition: all 0.2s; } .btn-refresh:hover { background: #f3f4f6; } /* ===== 列表 ===== */ .list-section { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; } .list-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; } .list-title { font-weight: 600; font-size: 15px; } .list-count { font-size: 13px; color: #6b7280; } .list-body { min-height: 100px; } .list-empty { padding: 40px 20px; text-align: center; color: #9ca3af; font-size: 14px; } /* ===== 列表项 ===== */ .doc-item { display: flex; align-items: center; padding: 14px 20px; border-bottom: 1px solid #f3f4f6; transition: background 0.2s; } .doc-item:hover { background: #f9fafb; } .doc-item:last-child { border-bottom: none; } .doc-info { flex: 1; min-width: 0; } .doc-info .doc-name { font-weight: 500; font-size: 15px; color: #1f2937; } .doc-info .doc-meta { font-size: 13px; color: #6b7280; margin-top: 2px; display: flex; gap: 16px; flex-wrap: wrap; } .doc-info .doc-meta span { display: inline-flex; align-items: center; gap: 4px; } .doc-info .doc-interfaces { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } .doc-info .doc-interfaces .tag { background: #e5e7eb; color: #374151; padding: 1px 10px; border-radius: 12px; font-size: 11px; } .doc-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: 12px; } .doc-actions button { padding: 4px 12px; font-size: 12px; border: none; border-radius: 6px; cursor: pointer; transition: all 0.2s; } .btn-edit { background: #dbeafe; color: #1e40af; } .btn-edit:hover { background: #bfdbfe; } .btn-generate { background: #d1fae5; color: #065f46; } .btn-generate:hover { background: #a7f3d0; } .btn-history { background: #fef3c7; color: #92400e; } .btn-history:hover { background: #fde68a; } /* ===== 分页 ===== */ .list-pagination, .history-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid #e5e7eb; } .btn-page { padding: 4px 14px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; cursor: pointer; font-size: 16px; } .btn-page:hover { background: #f3f4f6; } .page-info { font-size: 14px; color: #6b7280; } /* ===== 弹窗 ===== */ .modal-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; } .modal-content { background: #fff; border-radius: 16px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3); } .modal-lg { max-width: 820px; width: 92%; } .modal-md { max-width: 600px; width: 92%; } .modal-header { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-bottom: 1px solid #e5e7eb; flex-shrink: 0; } .modal-title { font-size: 16px; font-weight: 600; } .modal-subtitle { font-size: 13px; color: #6b7280; margin-left: auto; } .modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #6b7280; padding: 0 4px; } .modal-close:hover { color: #1f2937; } .modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; } /* ===== 表单 ===== */ .form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; } .form-group label { font-size: 13px; font-weight: 500; color: #374151; } .form-group .required { color: #ef4444; } .form-group input, .form-group select, .form-group textarea { padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 10px; font-size: 14px; transition: border 0.2s; background: #fafbfc; font-family: inherit; } .form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); } .form-group textarea { resize: vertical; font-family: 'Menlo', 'Consolas', monospace; font-size: 13px; line-height: 1.6; } .form-group small { font-size: 12px; color: #9ca3af; } .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #f3f4f6; } .btn-cancel { padding: 10px 24px; font-size: 14px; font-weight: 500; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: #374151; cursor: pointer; } .btn-cancel:hover { background: #f3f4f6; } .btn-submit { padding: 10px 28px; font-size: 14px; font-weight: 600; border: none; border-radius: 10px; background: #6366f1; color: #fff; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; } .btn-submit:hover { background: #4f46e5; } .btn-submit:disabled { opacity: 0.5; cursor: not-allowed; } .btn-spinner { display: inline-block; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* ===== 上传小区域 ===== */ .upload-zone-small { border: 2px dashed #d1d5db; border-radius: 10px; padding: 24px; text-align: center; cursor: pointer; transition: all 0.2s; background: #fafbfc; } .upload-zone-small:hover { border-color: #8b5cf6; background: #f5f3ff; } .upload-zone-small.dragover { border-color: #8b5cf6; background: #ede9fe; } .upload-text-small { font-size: 14px; font-weight: 500; color: #1f2937; } .upload-hint-small { font-size: 12px; color: #9ca3af; display: block; margin-top: 2px; } .upload-zone-small input { display: none; } .file-info-small { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #f0fdf4; border-radius: 8px; border: 1px solid #86efac; margin-top: 8px; font-size: 14px; } .btn-remove-small { background: none; border: none; color: #ef4444; font-size: 16px; cursor: pointer; } /* ===== 接口列表展示(只读) ===== */ .interface-list-display { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: #f9fafb; border-radius: 10px; min-height: 48px; border: 1px solid #e5e7eb; align-items: center; } .interface-list-display .tag { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #3730a3; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); } .interface-list-display .tag .method { background: #3730a3; color: #fff; padding: 0 8px; border-radius: 10px; font-size: 10px; font-weight: 700; } /* ===== Markdown 预览 ===== */ .markdown-preview { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px 20px; max-height: 400px; overflow-y: auto; font-size: 14px; line-height: 1.8; color: #1f2937; } .markdown-preview h1 { font-size: 22px; border-bottom: 2px solid #e5e7eb; padding-bottom: 8px; margin: 16px 0 12px 0; } .markdown-preview h2 { font-size: 18px; border-bottom: 1px solid #e5e7eb; padding-bottom: 6px; margin: 14px 0 10px 0; } .markdown-preview h3 { font-size: 16px; margin: 12px 0 8px 0; } .markdown-preview table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 13px; } .markdown-preview th { background: #f3f4f6; font-weight: 600; padding: 8px 12px; border: 1px solid #e5e7eb; text-align: left; } .markdown-preview td { padding: 8px 12px; border: 1px solid #e5e7eb; } .markdown-preview tr:nth-child(even) { background: #f9fafb; } .markdown-preview pre { background: #1f2937; color: #e5e7eb; padding: 12px 16px; border-radius: 8px; overflow-x: auto; font-size: 13px; } .markdown-preview code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; color: #1f2937; } .markdown-preview pre code { background: transparent; padding: 0; color: #e5e7eb; } .markdown-preview ul { padding-left: 20px; margin: 6px 0; } .markdown-preview li { margin: 2px 0; } .markdown-preview strong { color: #1e293b; } .markdown-editor { font-family: 'Menlo', 'Consolas', monospace; font-size: 13px; line-height: 1.6; } .btn-toggle { padding: 4px 16px; font-size: 13px; font-weight: 500; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #374151; cursor: pointer; transition: all 0.2s; } .btn-toggle:hover { background: #f3f4f6; border-color: #8b5cf6; } /* ===== 接口勾选列表 ===== */ .interface-checkbox-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: #f9fafb; border-radius: 10px; min-height: 48px; border: 1px solid #e5e7eb; } .interface-checkbox-list .checkbox-item { display: flex; align-items: center; gap: 6px; background: #fff; padding: 4px 12px 4px 8px; border-radius: 20px; border: 1px solid #e5e7eb; font-size: 13px; cursor: pointer; transition: all 0.2s; user-select: none; } .interface-checkbox-list .checkbox-item:hover { border-color: #8b5cf6; background: #f5f3ff; } .interface-checkbox-list .checkbox-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: #6366f1; cursor: pointer; margin: 0; } .interface-checkbox-list .checkbox-item .method-tag { background: #6366f1; color: #fff; padding: 0 8px; border-radius: 10px; font-size: 10px; font-weight: 700; } .interface-checkbox-list .checkbox-item .summary-text { color: #1f2937; } .interface-checkbox-list .checkbox-item.checked { border-color: #6366f1; background: #ede9fe; } /* ===== 历史任务列表 ===== */ .history-toolbar { display: flex; gap: 10px; margin-bottom: 12px; } .btn-refresh-small { padding: 6px 16px; font-size: 13px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; cursor: pointer; } .btn-refresh-small:hover { background: #f3f4f6; } .history-list { display: flex; flex-direction: column; gap: 8px; } .history-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: #fff; border-radius: 10px; border: 1px solid #e5e7eb; cursor: pointer; transition: all 0.2s; } .history-item:hover { border-color: #8b5cf6; background: #faf8ff; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(99, 102, 241, 0.10); } .history-item .h-info { flex: 1; min-width: 0; } .history-item .h-info .h-id { font-size: 14px; font-weight: 600; color: #1f2937; } .history-item .h-info .h-meta { font-size: 12px; color: #6b7280; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; } .history-item .h-info .h-meta span { display: inline-flex; align-items: center; gap: 3px; } .history-item .h-info .h-meta .usage-badge { background: #f3f4f6; padding: 1px 10px; border-radius: 12px; font-size: 11px; color: #374151; cursor: pointer; transition: all 0.2s; } .history-item .h-info .h-meta .usage-badge:hover { background: #e5e7eb; } .history-item .h-status { font-size: 12px; padding: 3px 14px; border-radius: 20px; font-weight: 500; flex-shrink: 0; margin-left: 12px; } .history-item .h-status.completed { background: #d1fae5; color: #065f46; } .history-item .h-status.failed { background: #fee2e2; color: #991b1b; } .history-item .h-status.pending { background: #fef3c7; color: #92400e; } .history-item .h-status.processing { background: #dbeafe; color: #1e40af; } /* ===== 任务详情 ===== */ .task-detail { font-size: 14px; } .task-detail .detail-row { display: flex; padding: 8px 0; border-bottom: 1px solid #f3f4f6; } .task-detail .detail-row .label { font-weight: 500; color: #6b7280; width: 120px; flex-shrink: 0; } .task-detail .detail-row .value { color: #1f2937; word-break: break-all; } .task-detail .detail-row .value .tag { background: #e5e7eb; padding: 1px 10px; border-radius: 12px; font-size: 12px; display: inline-block; margin: 2px 4px 2px 0; } .detail-loading { text-align: center; padding: 40px; color: #9ca3af; } /* ===== 用量详情弹窗 ===== */ .usage-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; } .usage-stat-card { background: #f9fafb; border-radius: 12px; padding: 16px 20px; text-align: center; border: 1px solid #e5e7eb; } .usage-stat-card .stat-value { font-size: 24px; font-weight: 700; color: #1f2937; } .usage-stat-card .stat-label { font-size: 12px; color: #6b7280; margin-top: 2px; } .usage-stat-card .stat-label .sub { font-size: 11px; color: #9ca3af; } .usage-detail-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; } .usage-detail-item { display: flex; justify-content: space-between; padding: 6px 12px; background: #f9fafb; border-radius: 8px; font-size: 13px; } .usage-detail-item .step-name { color: #374151; } .usage-detail-item .step-tokens { font-weight: 500; color: #1f2937; } /* ===== 响应式 ===== */ @media (max-width: 640px) { .container { padding: 16px; } .doc-item { flex-direction: column; align-items: flex-start; gap: 8px; } .doc-actions { margin-left: 0; width: 100%; flex-wrap: wrap; } .form-row { grid-template-columns: 1fr; } .modal-content { width: 96%; } .modal-body { padding: 16px; } .toolbar { flex-direction: column; } .doc-info .doc-meta { gap: 8px; } .task-detail .detail-row { flex-direction: column; padding: 8px 0; } .task-detail .detail-row .label { width: auto; } .history-item { flex-direction: column; align-items: flex-start; gap: 8px; } .history-item .h-status { margin-left: 0; } .usage-stats { grid-template-columns: 1fr 1fr; } .interface-checkbox-list { max-height: 200px; overflow-y: auto; } }