feat: refine branded dual-portal prototype

This commit is contained in:
wlx committed 2026-08-19 21:28:03 +08:00
1 parent 78339580a5
commit bebff16a2d
14 files changed
+1042 -1089

No files matched your search

+89 -735
View File
@@ -1,800 +1,154 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import {
Activity,
AlertTriangle,
ArrowRight,
ArrowUpRight,
ArrowLeftRight,
Bell,
BookOpen,
Box,
Boxes,
Check,
CheckCircle2,
ChevronDown,
ChevronLeft,
ChevronRight,
CircleDollarSign,
CircleHelp,
Clipboard,
Clock3,
Cloud,
Code2,
Copy,
Cpu,
CreditCard,
Database,
Download,
Eye,
EyeOff,
FileCode2,
Filter,
Gauge,
Globe2,
ImagePlus,
Info,
KeyRound,
Layers3,
LayoutDashboard,
LifeBuoy,
ListTodo,
LockKeyhole,
LogOut,
Menu,
MessageSquare,
Mic2,
MoreHorizontal,
PackageOpen,
Play,
Plus,
Puzzle,
RefreshCcw,
Search,
Send,
ServerCog,
Settings2,
Settings,
ShieldCheck,
SlidersHorizontal,
Sparkles,
Terminal,
Timer,
TrendingUp,
Users,
Video,
WalletCards,
Wrench,
X,
Zap,
} from 'lucide-vue-next'
import { adminNavigation, userNavigation } from './data'
import AuthView from './views/AuthView.vue'
import AdminConsole from './views/AdminConsole.vue'
import UserConsole from './views/UserConsole.vue'
import type { Portal } from './types'
type Portal = 'user' | 'admin'
type UserView = 'overview' | 'models' | 'playground' | 'keys' | 'tasks' | 'usage' | 'docs'
type AdminView = 'admin-overview' | 'admin-users' | 'admin-models' | 'admin-routing' | 'admin-queue' | 'admin-billing' | 'admin-audit' | 'admin-settings'
type View = UserView | AdminView
type ModelType = '文本' | '多模态' | '图像' | '3D' | '视频' | '音频'
type TaskStatus = '排队中' | '执行中' | '已完成' | '失败'
interface ModelCard {
id: string
name: string
vendor: string
type: ModelType
description: string
latency: string
context: string
availability: number
accent: string
icon: typeof Box
mode: '同步' | '流式' | '异步'
featured?: boolean
}
interface ApiKey {
id: number
name: string
prefix: string
created: string
lastUsed: string
scope: string
status: 'active' | 'disabled'
}
interface TaskItem {
id: string
model: string
type: string
status: TaskStatus
progress: number
created: string
duration: string
result?: string
}
interface AdminUser {
id: string
name: string
email: string
role: '普通用户' | '平台运营' | '模型运营' | '平台管理员'
status: '正常' | '已停用' | '待激活'
balance: number
usage: string
lastActive: string
}
interface ProviderItem {
id: string
name: string
category: string
models: number
latency: string
successRate: string
status: '健康' | '波动' | '维护中'
enabled: boolean
}
interface RouteItem {
id: string
model: string
capability: string
primary: string
fallback: string
policy: string
health: string
enabled: boolean
}
const activeView = ref<View>('overview')
const activePortal = ref<Portal>('user')
const portal = ref<Portal>('user')
const activeView = ref('overview')
const sidebarCollapsed = ref(false)
const mobileSidebarOpen = ref(false)
const searchQuery = ref('')
const modelQuery = ref('')
const modelFilter = ref<'全部' | ModelType>('全部')
const taskFilter = ref<'全部' | TaskStatus>('全部')
const showCreateKeyModal = ref(false)
const showSecretModal = ref(false)
const newKeySecret = ref('')
const keyName = ref('')
const keyScope = ref('全部模型')
const mobileNavigationOpen = ref(false)
const toastMessage = ref('')
const selectedTask = ref<TaskItem | null>(null)
const selectedModel = ref<ModelCard | null>(null)
const isRunning = ref(false)
const playgroundOutput = ref('')
const playgroundMode = ref<'同步' | '流式' | '异步'>('流式')
const prompt = ref('请帮我为一个面向创意团队的 AI 工作台,写一段简洁、有未来感的产品介绍。')
const activeModelId = ref('moyi-text-pro')
const adminCreditUser = ref('')
const adminCreditAmount = ref('100')
const showApiKey = ref(false)
const adminUserQuery = ref('')
const adminUserStatus = ref<'全部' | AdminUser['status']>('全部')
const selectedAdminUser = ref<AdminUser | null>(null)
const showInviteModal = ref(false)
const inviteEmail = ref('')
const inviteRole = ref<AdminUser['role']>('普通用户')
const queueProtection = ref(true)
const auditQuery = ref('')
const platformSettings = ref({
inviteOnly: true,
emailSignup: false,
phoneSignup: false,
autoCredit: false,
maintenanceNotice: true,
})
const authenticated = ref(false)
const accountMenuOpen = ref(false)
const userName = ref('林默')
const userNavGroups = [
{
label: '工作台',
items: [
{ key: 'overview' as View, label: '总览', icon: LayoutDashboard },
{ key: 'models' as View, label: '模型广场', icon: Boxes },
{ key: 'playground' as View, label: 'Playground', icon: Sparkles },
],
},
{
label: '开发者',
items: [
{ key: 'keys' as View, label: 'API Keys', icon: KeyRound },
{ key: 'tasks' as View, label: '任务中心', icon: ListTodo },
{ key: 'usage' as View, label: '用量与账单', icon: WalletCards },
{ key: 'docs' as View, label: '接入文档', icon: BookOpen },
],
},
]
const navigation = computed(() => portal.value === 'user' ? userNavigation : adminNavigation)
const activeLabel = computed(() => navigation.value.flatMap((group) => group.items).find((item) => item.id === activeView.value)?.label ?? '总览')
const adminNavGroups = [
{
label: '运营总览',
items: [{ key: 'admin-overview' as View, label: '管理总览', icon: LayoutDashboard }],
},
{
label: '平台运营',
items: [
{ key: 'admin-users' as View, label: '用户与额度', icon: Users },
{ key: 'admin-models' as View, label: '模型与供应商', icon: Boxes },
{ key: 'admin-routing' as View, label: '渠道与路由', icon: SlidersHorizontal },
{ key: 'admin-queue' as View, label: '并发与队列', icon: Gauge },
{ key: 'admin-billing' as View, label: '计费与订单', icon: CreditCard },
],
},
{
label: '平台治理',
items: [
{ key: 'admin-audit' as View, label: '日志与审计', icon: ShieldCheck },
{ key: 'admin-settings' as View, label: '平台设置', icon: Settings2 },
],
},
]
const navGroups = computed(() => activePortal.value === 'user' ? userNavGroups : adminNavGroups)
const viewMeta: Record<View, { title: string; eyebrow: string; description: string }> = {
overview: { title: '总览', eyebrow: 'WORKSPACE OVERVIEW', description: '把模型调用变成清晰、可控、可持续的工作流。' },
models: { title: '模型广场', eyebrow: 'MODEL CATALOG', description: '按能力选择模型,一处接入,连接多模。' },
playground: { title: 'Playground', eyebrow: 'MODEL PLAYGROUND', description: '在接入自己的系统前,先快速验证模型效果。' },
keys: { title: 'API Keys', eyebrow: 'DEVELOPER ACCESS', description: '管理连接模亦灵枢的凭证与访问范围。' },
tasks: { title: '任务中心', eyebrow: 'ASYNC TASKS', description: '统一查看异步模型的排队、执行与结果。' },
usage: { title: '用量与账单', eyebrow: 'USAGE & CREDITS', description: '追踪调用消耗,了解额度和资源使用情况。' },
docs: { title: '接入文档', eyebrow: 'DEVELOPER DOCS', description: '用一套标准接口,把模型能力带进你的产品。' },
'admin-overview': { title: '管理总览', eyebrow: 'ADMIN OVERVIEW', description: '统一掌握用户、模型供给、平台容量与运营风险。' },
'admin-users': { title: '用户与额度', eyebrow: 'USERS & CREDITS', description: '管理内测用户、角色、状态和额度发放。' },
'admin-models': { title: '模型与供应商', eyebrow: 'MODELS & PROVIDERS', description: '配置模型目录、供应商渠道和服务状态。' },
'admin-routing': { title: '渠道与路由', eyebrow: 'CHANNEL ROUTING', description: '管理渠道优先级、权重、故障转移和重试策略。' },
'admin-queue': { title: '并发与队列', eyebrow: 'CAPACITY CONTROL', description: '查看实时并发、任务队列和容量保护状态。' },
'admin-billing': { title: '计费与订单', eyebrow: 'BILLING OPERATIONS', description: '维护计费规则、额度流水和预留订单能力。' },
'admin-audit': { title: '日志与审计', eyebrow: 'AUDIT LOGS', description: '追踪管理操作、平台事件和高风险变更。' },
'admin-settings': { title: '平台设置', eyebrow: 'PLATFORM SETTINGS', description: '管理注册策略、品牌信息和平台级配置。' },
}
const models = ref<ModelCard[]>([
{
id: 'moyi-text-pro',
name: 'MOYI Text Pro',
vendor: '模亦灵枢 · 精选模型',
type: '文本',
description: '适合复杂推理、代码生成和长文档处理的通用文本模型。',
latency: '约 0.8s',
context: '128K 上下文',
availability: 99.98,
accent: 'violet',
icon: MessageSquare,
mode: '流式',
featured: true,
},
{
id: 'moyi-vision',
name: 'MOYI Vision',
vendor: '模亦灵枢 · 多模态',
type: '多模态',
description: '理解图片、文档与屏幕内容,适合视觉问答和内容分析。',
latency: '约 1.2s',
context: '32K 上下文',
availability: 99.95,
accent: 'cyan',
icon: ImagePlus,
mode: '同步',
featured: true,
},
{
id: 'moyi-3d-studio',
name: 'AI SoulMate 3D',
vendor: '模灵科技 · 生成式 3D',
type: '3D',
description: '从文字或图片生成可下载的 3D 资产,任务型异步调用。',
latency: '约 2–5 min',
context: '图文输入',
availability: 99.9,
accent: 'orange',
icon: Box,
mode: '异步',
featured: true,
},
{
id: 'moyi-image-craft',
name: 'MOYI Image Craft',
vendor: '模亦灵枢 · 图像生成',
type: '图像',
description: '面向创意生产的图像生成模型,支持多种画幅和风格控制。',
latency: '约 8s',
context: '1024 × 1024',
availability: 99.92,
accent: 'pink',
icon: Sparkles,
mode: '异步',
},
{
id: 'moyi-motion',
name: 'MOYI Motion',
vendor: '模亦灵枢 · 视频生成',
type: '视频',
description: '将文本或首帧转化为短视频片段,适合概念验证与内容创作。',
latency: '约 1–3 min',
context: '720p / 5s',
availability: 99.86,
accent: 'blue',
icon: Video,
mode: '异步',
},
{
id: 'moyi-voice',
name: 'MOYI Voice',
vendor: '模亦灵枢 · 音频理解',
type: '音频',
description: '语音转写、摘要和音频内容理解,适合工作流自动化。',
latency: '约 1.4s',
context: '60 min / file',
availability: 99.94,
accent: 'green',
icon: Mic2,
mode: '同步',
},
])
const apiKeys = ref<ApiKey[]>([
{ id: 1, name: 'AI SoulMate 内部环境', prefix: 'sk-moyi-••••••••8H2K', created: '2026-08-14', lastUsed: '刚刚', scope: '全部模型', status: 'active' },
{ id: 2, name: '本地开发调试', prefix: 'sk-moyi-••••••••Q7P1', created: '2026-08-06', lastUsed: '2 小时前', scope: '文本 / 多模态', status: 'active' },
{ id: 3, name: '旧版演示环境', prefix: 'sk-moyi-••••••••M4D9', created: '2026-07-29', lastUsed: '12 天前', scope: '全部模型', status: 'disabled' },
])
const tasks = ref<TaskItem[]>([
{ id: 'task_9f3a82', model: 'AI SoulMate 3D', type: '文字生成 3D', status: '执行中', progress: 72, created: '今天 14:32', duration: '已运行 01:48', result: '预计还需约 45 秒' },
{ id: 'task_9f3a71', model: 'MOYI Image Craft', type: '图像生成', status: '排队中', progress: 18, created: '今天 14:28', duration: '排队 00:32', result: '前方还有 2 个任务' },
{ id: 'task_9f39b8', model: 'AI SoulMate 3D', type: '图片生成 3D', status: '已完成', progress: 100, created: '今天 13:56', duration: '完成于 02:16', result: 'asset_3d_0826.glb' },
{ id: 'task_9f37a2', model: 'MOYI Motion', type: '文本生成视频', status: '失败', progress: 46, created: '今天 11:20', duration: '失败于 00:58', result: '上游容量暂时不足' },
])
const adminUsers = ref<AdminUser[]>([
{ id: 'usr_1024', name: '林默', email: 'linmo@moling.tech', role: '平台管理员', status: '正常', balance: 286.4, usage: '¥ 42.80', lastActive: '刚刚' },
{ id: 'usr_1023', name: 'AI SoulMate 服务', email: 'service@aisoulmate.cn', role: '模型运营', status: '正常', balance: 1200, usage: '¥ 386.20', lastActive: '3 分钟前' },
{ id: 'usr_1022', name: '陈屿', email: 'chenyu@example.com', role: '普通用户', status: '正常', balance: 68.2, usage: '¥ 18.60', lastActive: '2 小时前' },
{ id: 'usr_1021', name: '周青', email: 'zhouqing@example.com', role: '普通用户', status: '待激活', balance: 0, usage: '¥ 0.00', lastActive: '尚未登录' },
{ id: 'usr_1018', name: '测试账号 03', email: 'test03@example.com', role: '普通用户', status: '已停用', balance: 4.8, usage: '¥ 9.40', lastActive: '12 天前' },
])
const providers = ref<ProviderItem[]>([
{ id: 'provider-moyi', name: '模灵科技模型服务', category: '自有模型', models: 3, latency: '820 ms', successRate: '99.98%', status: '健康', enabled: true },
{ id: 'provider-a', name: '供应商 A', category: '文本 / 多模态', models: 8, latency: '1.18 s', successRate: '99.95%', status: '健康', enabled: true },
{ id: 'provider-b', name: '供应商 B', category: '图像 / 视频', models: 5, latency: '8.4 s', successRate: '98.76%', status: '波动', enabled: true },
{ id: 'provider-c', name: '供应商 C', category: '备用渠道', models: 4, latency: '—', successRate: '—', status: '维护中', enabled: false },
])
const routeItems = ref<RouteItem[]>([
{ id: 'route-text', model: 'MOYI Text Pro', capability: '文本 / 流式', primary: '供应商 A · cn-01', fallback: '供应商 C · backup', policy: '加权优先', health: '99.98%', enabled: true },
{ id: 'route-vision', model: 'MOYI Vision', capability: '视觉理解 / 同步', primary: '供应商 A · vision', fallback: '模灵科技模型服务', policy: '低延迟优先', health: '99.95%', enabled: true },
{ id: 'route-3d', model: 'AI SoulMate 3D', capability: '3D / 异步', primary: '模灵科技模型服务', fallback: '无备用渠道', policy: '固定渠道', health: '99.90%', enabled: true },
{ id: 'route-video', model: 'MOYI Motion', capability: '视频 / 异步', primary: '供应商 B · video', fallback: '无备用渠道', policy: '容量优先', health: '98.76%', enabled: true },
])
const queueGroups = [
{ name: '文本与多模态', type: '同步 / 流式', running: 16, limit: 24, queued: 0, wait: '< 1s', status: '正常' },
{ name: 'AI SoulMate 3D', type: '异步任务', running: 6, limit: 8, queued: 3, wait: '约 48s', status: '接近上限' },
{ name: '图像生成', type: '异步任务', running: 9, limit: 16, queued: 1, wait: '约 12s', status: '正常' },
{ name: '视频生成', type: '异步任务', running: 3, limit: 4, queued: 2, wait: '约 2m', status: '接近上限' },
]
const pricingItems = [
{ model: 'MOYI Text Pro', unit: '每百万 tokens', input: '¥ 8.00', output: '¥ 24.00', rule: '按实际用量', status: '已生效' },
{ model: 'MOYI Vision', unit: '每千次调用', input: '¥ 36.00', output: '—', rule: '按调用次数', status: '已生效' },
{ model: 'AI SoulMate 3D', unit: '每个成功任务', input: '待填写', output: '—', rule: '仅成功扣费', status: '待配置' },
{ model: 'MOYI Motion', unit: '每秒视频', input: '待填写', output: '—', rule: '按结果时长', status: '待配置' },
]
const auditEvents = [
{ actor: '林默', action: '发放用户额度', target: 'usr_1023 · ¥ 300.00', time: '今天 09:20:14', ip: '39.106.*.*', level: '普通' },
{ actor: '林默', action: '调整模型并发', target: 'AI SoulMate 3D · 6 → 8', time: '昨天 18:42:08', ip: '39.106.*.*', level: '重要' },
{ actor: '系统', action: '触发渠道降级', target: '供应商 B · video', time: '昨天 16:40:31', ip: 'internal', level: '风险' },
{ actor: '模型运营', action: '更新路由策略', target: 'MOYI Vision · 低延迟优先', time: '08-17 14:16:22', ip: '10.24.*.*', level: '重要' },
{ actor: '林默', action: '创建邀请码', target: 'MOYI-BETA-0821', time: '08-16 11:08:05', ip: '39.106.*.*', level: '普通' },
]
const usageBars = [
{ day: '周一', value: 38, label: '1.2k' },
{ day: '周二', value: 55, label: '2.4k' },
{ day: '周三', value: 46, label: '1.8k' },
{ day: '周四', value: 72, label: '3.1k' },
{ day: '周五', value: 64, label: '2.7k' },
{ day: '周六', value: 31, label: '980' },
{ day: '周日', value: 84, label: '3.8k' },
]
const modelTypes: Array<'全部' | ModelType> = ['全部', '文本', '多模态', '图像', '3D', '视频', '音频']
const currentMeta = computed(() => viewMeta[activeView.value])
const activeModel = computed(() => models.value.find((model) => model.id === activeModelId.value) ?? models.value[0])
const filteredModels = computed(() => {
const query = modelQuery.value.trim().toLowerCase()
return models.value.filter((model) => {
const matchesType = modelFilter.value === '全部' || model.type === modelFilter.value
const matchesQuery = !query || `${model.name} ${model.vendor} ${model.description}`.toLowerCase().includes(query)
return matchesType && matchesQuery
})
})
const filteredTasks = computed(() => taskFilter.value === '全部' ? tasks.value : tasks.value.filter((task) => task.status === taskFilter.value))
const filteredAdminUsers = computed(() => {
const query = adminUserQuery.value.trim().toLowerCase()
return adminUsers.value.filter((user) => {
const matchesStatus = adminUserStatus.value === '全部' || user.status === adminUserStatus.value
const matchesQuery = !query || `${user.name} ${user.email} ${user.id}`.toLowerCase().includes(query)
return matchesStatus && matchesQuery
})
})
const filteredAuditEvents = computed(() => {
const query = auditQuery.value.trim().toLowerCase()
if (!query) return auditEvents
return auditEvents.filter((event) => `${event.actor} ${event.action} ${event.target}`.toLowerCase().includes(query))
})
const searchResults = computed(() => {
const query = searchQuery.value.trim().toLowerCase()
if (!query) return []
return models.value.filter((model) => `${model.name} ${model.type} ${model.description}`.toLowerCase().includes(query)).slice(0, 4)
})
function navigate(view: View) {
function navigate(view: string) {
activeView.value = view
mobileSidebarOpen.value = false
searchQuery.value = ''
}
function switchPortal(portal: Portal) {
activePortal.value = portal
activeView.value = portal === 'admin' ? 'admin-overview' : 'overview'
mobileSidebarOpen.value = false
searchQuery.value = ''
mobileNavigationOpen.value = false
accountMenuOpen.value = false
window.scrollTo({ top: 0, behavior: 'smooth' })
notify(portal === 'admin' ? '已进入管理端' : '已返回用户端')
}
function openModel(model: ModelCard) {
selectedModel.value = null
activeModelId.value = model.id
playgroundMode.value = model.mode
activeView.value = 'playground'
notify(`已将 ${model.name} 设置为 Playground 当前模型`)
}
function showModelDetails(model: ModelCard) {
selectedModel.value = model
function switchPortal() {
portal.value = portal.value === 'user' ? 'admin' : 'user'
activeView.value = portal.value === 'user' ? 'overview' : 'admin-overview'
mobileNavigationOpen.value = false
notify(portal.value === 'admin' ? '已进入管理端' : '已返回用户端')
}
function notify(message: string) {
toastMessage.value = message
window.setTimeout(() => {
if (toastMessage.value === message) toastMessage.value = ''
}, 3200)
}, 2800)
}
async function copyText(value: string, label = '内容') {
try {
await navigator.clipboard.writeText(value)
notify(`${label}已复制到剪贴板`)
} catch {
notify(`请手动复制${label}`)
}
function signIn(name: string) {
userName.value = name
authenticated.value = true
activeView.value = 'overview'
notify('登录成功,欢迎进入模亦灵枢')
}
function createKey() {
const label = keyName.value.trim() || '未命名项目 Key'
const secret = `sk-moyi-${crypto.randomUUID().replace(/-/g, '').slice(0, 24)}`
apiKeys.value.unshift({
id: Date.now(),
name: label,
prefix: `${secret.slice(0, 10)}••••••••${secret.slice(-4)}`,
created: '刚刚',
lastUsed: '未使用',
scope: keyScope.value,
status: 'active',
})
newKeySecret.value = secret
keyName.value = ''
keyScope.value = '全部模型'
showCreateKeyModal.value = false
showSecretModal.value = true
function logout() {
accountMenuOpen.value = false
portal.value = 'user'
activeView.value = 'overview'
authenticated.value = false
notify('已安全退出登录')
}
function toggleKey(key: ApiKey) {
key.status = key.status === 'active' ? 'disabled' : 'active'
notify(key.status === 'active' ? `${key.name} 已重新启用` : `${key.name} 已禁用`)
}
function runPlayground() {
if (!prompt.value.trim()) {
notify('先输入一段内容,再开始调用')
return
}
if (isRunning.value) return
isRunning.value = true
playgroundOutput.value = ''
if (playgroundMode.value === '异步') {
window.setTimeout(() => {
isRunning.value = false
playgroundOutput.value = '任务已提交。你可以前往任务中心查看排队进度、生成结果和可下载资产。'
notify('异步任务已提交到任务中心')
}, 900)
return
}
window.setTimeout(() => {
isRunning.value = false
playgroundOutput.value = '模亦灵枢已完成这次调用。这个原型展示了统一 API 入口、模型选择、流式状态和调用结果在同一工作台中的完整闭环。'
notify('模型调用完成')
}, 1100)
}
function addDemoTask() {
const id = `task_${Math.random().toString(16).slice(2, 8)}`
tasks.value.unshift({ id, model: activeModel.value.name, type: `${activeModel.value.type} 生成任务`, status: '排队中', progress: 0, created: '刚刚', duration: '刚刚创建', result: '等待调度' })
activeView.value = 'tasks'
notify('演示任务已加入队列')
}
function grantCredit() {
if (!adminCreditUser.value.trim() || !adminCreditAmount.value.trim()) {
notify('请填写用户标识和额度数量')
return
}
const amount = Number(adminCreditAmount.value)
const user = adminUsers.value.find((item) => item.email === adminCreditUser.value || item.id === adminCreditUser.value)
if (!Number.isFinite(amount) || amount <= 0) {
notify('额度必须是大于 0 的数字')
return
}
if (user) user.balance += amount
notify(`已向 ${adminCreditUser.value} 发放 ${amount.toFixed(2)} 点额度(演示)`)
adminCreditUser.value = ''
}
function openCreditForUser(user: AdminUser) {
adminCreditUser.value = user.email
adminCreditAmount.value = '100'
selectedAdminUser.value = null
activeView.value = 'admin-overview'
notify(`已选择 ${user.name},可在额度面板中确认发放`)
}
function createInvite() {
const email = inviteEmail.value.trim()
if (!email || !email.includes('@')) {
notify('请输入有效邮箱地址')
return
}
adminUsers.value.unshift({
id: `usr_${1025 + adminUsers.value.length}`,
name: email.split('@')[0],
email,
role: inviteRole.value,
status: '待激活',
balance: 0,
usage: '¥ 0.00',
lastActive: '尚未登录',
})
inviteEmail.value = ''
inviteRole.value = '普通用户'
showInviteModal.value = false
notify('邀请已创建并加入待激活列表')
}
function toggleProvider(provider: ProviderItem) {
provider.enabled = !provider.enabled
notify(`${provider.name} 已${provider.enabled ? '启用' : '停用'}`)
}
function toggleRoute(route: RouteItem) {
route.enabled = !route.enabled
notify(`${route.model} 路由已${route.enabled ? '启用' : '暂停'}`)
}
function saveSettings() {
notify('平台设置已保存,变更已写入审计记录(演示)')
}
function taskStatusClass(status: TaskStatus) {
return { 'is-running': status === '执行中', 'is-queued': status === '排队中', 'is-success': status === '已完成', 'is-failed': status === '失败' }
}
function modelIcon(model: ModelCard) {
return model.icon
function openAccountSettings() {
accountMenuOpen.value = false
if (portal.value === 'admin') navigate('admin-settings')
else notify('账号设置将在后续阶段开放')
}
</script>
<template>
<div class="app-shell">
<aside class="sidebar" :class="{ 'is-collapsed': sidebarCollapsed, 'is-mobile-open': mobileSidebarOpen }">
<div class="brand-block">
<button class="icon-button mobile-close" aria-label="关闭导航" @click="mobileSidebarOpen = false"><X :size="18" /></button>
<div class="brand-mark"><span>M</span><i></i></div>
<div v-if="!sidebarCollapsed" class="brand-copy">
<strong>模亦灵枢</strong>
<span>{{ activePortal === 'admin' ? 'MOYI · ADMIN CONSOLE' : 'MOYI · MODEL HUB' }}</span>
<AuthView v-if="!authenticated" @success="signIn" @notify="notify" />
<div v-else class="app" :class="{ 'sidebar-collapsed': sidebarCollapsed, 'admin-mode': portal === 'admin' }">
<aside class="sidebar" :class="{ 'mobile-open': mobileNavigationOpen }">
<div class="sidebar-brand">
<span class="brand-mark"><img src="/assets/moyi-logo-mark.png" alt="模亦灵枢 Logo" /></span>
<div class="brand-name">
<strong>{{ portal === 'admin' ? '模亦灵枢管理端' : '模亦灵枢工作区' }}</strong>
<span>{{ portal === 'admin' ? 'ADMIN CONSOLE' : 'MODEL INTELLIGENCE HUB' }}</span>
</div>
<button class="icon-button mobile-only" aria-label="关闭菜单" @click="mobileNavigationOpen = false"><X :size="19" /></button>
</div>
<div v-if="!sidebarCollapsed" class="workspace-switcher">
<div class="workspace-avatar">{{ activePortal === 'admin' ? '管' : 'M' }}</div>
<div class="workspace-copy"><strong>{{ activePortal === 'admin' ? '模亦灵枢平台' : '模灵科技工作区' }}</strong><span>{{ activePortal === 'admin' ? '平台管理员 · 运营环境' : '个人开发者 · 内测版' }}</span></div>
<ChevronDown :size="15" />
</div>
<nav class="side-nav">
<div v-for="group in navGroups" :key="group.label" class="nav-group">
<p v-if="!sidebarCollapsed" class="nav-label">{{ group.label }}</p>
<nav class="navigation">
<section v-for="group in navigation" :key="group.label" class="nav-group">
<p>{{ group.label }}</p>
<button
v-for="item in group.items"
:key="item.key"
class="nav-item"
:class="{ active: activeView === item.key }"
:key="item.id"
class="nav-link"
:class="{ active: activeView === item.id }"
:title="sidebarCollapsed ? item.label : undefined"
@click="navigate(item.key)"
@click="navigate(item.id)"
>
<component :is="item.icon" :size="18" :stroke-width="activeView === item.key ? 2.4 : 1.8" />
<span v-if="!sidebarCollapsed">{{ item.label }}</span>
<em v-if="item.key === 'tasks' && !sidebarCollapsed">2</em>
<em v-if="item.key === 'admin-queue' && !sidebarCollapsed">3</em>
<component :is="item.icon" :size="18" />
<span>{{ item.label }}</span>
<em v-if="item.badge">{{ item.badge }}</em>
</button>
</div>
</section>
</nav>
<div class="sidebar-bottom">
<div v-if="activePortal === 'user' && !sidebarCollapsed" class="credit-mini-card">
<div class="credit-mini-head"><span>可用额度</span><CircleDollarSign :size="16" /></div>
<div class="sidebar-footer">
<div v-if="portal === 'user'" class="balance-card">
<span>可用额度</span>
<strong>¥ 286.40</strong>
<div class="credit-progress"><span style="width: 68%"></span></div>
<small>本周期已使用 32%</small>
<button class="text-button" @click="navigate('usage')">查看用量 <ArrowUpRight :size="13" /></button>
<div><i></i></div>
<small>本周期剩余 68%</small>
</div>
<div v-if="activePortal === 'admin' && !sidebarCollapsed" class="admin-context-card">
<span><ShieldCheck :size="14" /> 管理员权限</span>
<strong>所有管理操作均记录审计日志</strong>
</div>
<button class="nav-item" :title="sidebarCollapsed ? '帮助中心' : undefined" @click="notify('帮助中心将在下一阶段开放')"><LifeBuoy :size="18" /><span v-if="!sidebarCollapsed">帮助中心</span></button>
<button class="nav-item" :title="sidebarCollapsed ? '设置' : undefined" @click="notify('设置面板将在下一阶段开放')"><Settings2 :size="18" /><span v-if="!sidebarCollapsed">设置</span></button>
<button class="collapse-button" @click="sidebarCollapsed = !sidebarCollapsed"><ChevronRight v-if="sidebarCollapsed" :size="17" /><ChevronDown v-else :size="17" /><span v-if="!sidebarCollapsed">收起导航</span></button>
<div v-else class="security-card"><ShieldCheck :size="17" /><span>管理操作均写入审计日志</span></div>
<button class="nav-link" @click="notify('帮助中心将在后续阶段开放')"><CircleHelp :size="18" /><span>帮助中心</span></button>
<button class="collapse-control desktop-only" @click="sidebarCollapsed = !sidebarCollapsed">
<ChevronRight v-if="sidebarCollapsed" :size="17" />
<ChevronLeft v-else :size="17" />
<span>收起侧栏</span>
</button>
</div>
</aside>
<div v-if="mobileSidebarOpen" class="sidebar-backdrop" @click="mobileSidebarOpen = false"></div>
<div v-if="mobileNavigationOpen" class="mobile-overlay" @click="mobileNavigationOpen = false"></div>
<section class="main-column">
<div class="workspace">
<header class="topbar">
<div class="topbar-left">
<button class="icon-button mobile-menu" aria-label="打开导航" @click="mobileSidebarOpen = true"><Menu :size="20" /></button>
<div class="breadcrumb"><span>{{ activePortal === 'admin' ? '管理端' : '用户端' }}</span><ChevronRight :size="14" /><strong>{{ currentMeta.title }}</strong></div>
<button class="icon-button mobile-only" aria-label="打开菜单" @click="mobileNavigationOpen = true"><Menu :size="20" /></button>
<div class="breadcrumb"><span>{{ portal === 'admin' ? '管理端' : '用户端' }}</span><ChevronRight :size="14" /><strong>{{ activeLabel }}</strong></div>
</div>
<div class="topbar-actions">
<div class="global-search">
<Search :size="16" />
<input v-model="searchQuery" placeholder="搜索模型、文档或任务" aria-label="搜索模型、文档或任务" />
<kbd>⌘ K</kbd>
<div v-if="searchResults.length" class="search-results">
<button v-for="model in searchResults" :key="model.id" @click="openModel(model)"><component :is="modelIcon(model)" :size="16" /><span>{{ model.name }}</span><small>{{ model.type }}</small></button>
</div>
<button class="global-search desktop-only" @click="notify('全局搜索将在接入真实数据后开放')"><Search :size="16" /><span>搜索模型、用户或任务</span><kbd>⌘ K</kbd></button>
<button class="portal-switch" @click="switchPortal"><ArrowLeftRight :size="16" /><span>{{ portal === 'admin' ? '返回用户端' : '进入管理端' }}</span></button>
<button class="icon-button desktop-only" aria-label="通知" @click="notify('当前没有新的通知')"><Bell :size="18" /></button>
<div class="account-menu-wrap">
<button class="user-menu" :class="{ active: accountMenuOpen }" @click="accountMenuOpen = !accountMenuOpen"><span>{{ userName.slice(0, 1) }}</span><div><strong>{{ userName }}</strong><small>{{ portal === 'admin' ? '平台管理员' : '管理员账号' }}</small></div></button>
<Transition name="menu-pop"><div v-if="accountMenuOpen" class="account-popover"><header><span>{{ userName.slice(0, 1) }}</span><div><strong>{{ userName }}</strong><small>demo@moyi.ai</small></div></header><button @click="openAccountSettings"><Settings :size="16" />账号设置</button><button class="logout-button" @click="logout"><LogOut :size="16" />退出登录</button></div></Transition>
</div>
<button v-if="activePortal === 'user'" class="portal-switch" @click="switchPortal('admin')"><Wrench :size="15" /><span>进入管理端</span><ArrowUpRight :size="13" /></button>
<button v-else class="portal-switch is-admin" @click="switchPortal('user')"><Globe2 :size="15" /><span>返回用户端</span><ArrowUpRight :size="13" /></button>
<button class="icon-button notification-button" aria-label="通知" @click="notify('当前没有新的通知')"><Bell :size="18" /><i></i></button>
<div class="topbar-user"><div class="avatar">林</div><div class="user-name"><strong>林默</strong><span>{{ activePortal === 'admin' ? '平台管理员' : '管理员账号' }}</span></div><ChevronDown :size="14" /></div>
</div>
</header>
<main class="page-content">
<template v-if="activeView === 'overview'">
<section class="page-intro compact-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>你好,林默 <span class="wave">✦</span></h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><span class="status-pill"><i></i> 所有系统正常</span><button class="button secondary" @click="navigate('docs')"><BookOpen :size="16" /> 快速开始</button></div></section>
<section class="quick-connect-bar"><div class="quick-connect-title"><div class="quick-connect-icon"><Terminal :size="17" /></div><div><span>统一 API 地址</span><strong>https://api.moyi.ai/v1</strong></div></div><div class="quick-connect-meta"><span><i></i> 服务在线</span><span>OpenAI 兼容</span><span>同步 / 流式 / 异步</span></div><button class="button secondary" @click="copyText('https://api.moyi.ai/v1', 'Base URL')"><Copy :size="15" /> 复制地址</button></section>
<section class="hero-card">
<div class="hero-orb orb-one"></div><div class="hero-orb orb-two"></div><div class="hero-grid"></div>
<div class="hero-content"><span class="hero-kicker"><Sparkles :size="14" /> MOYI MODEL INTELLIGENCE HUB</span><h2>一处接入,<br /><em>连接多模。</em></h2><p>从文本、图像到生成式 3D,把每一种模型能力装进同一个清晰的开发工作台。</p><div class="hero-actions"><button class="button primary" @click="navigate('models')">探索模型 <ArrowRight :size="17" /></button><button class="button ghost-light" @click="navigate('docs')"><Code2 :size="16" /> 查看接入方式</button></div><div class="hero-note"><span><ShieldCheck :size="14" /> 邀请码内测</span><span><Zap :size="14" /> 管理员额度发放</span><span><Globe2 :size="14" /> 统一标准接口</span></div></div>
<div class="hero-model-stack"><div class="floating-model-card card-a"><div class="mini-icon violet"><MessageSquare :size="15" /></div><span>文本理解</span><strong>12.8K</strong></div><div class="floating-model-card card-b"><div class="mini-icon orange"><Box :size="15" /></div><span>生成式 3D</span><strong>异步任务</strong></div><div class="floating-model-card card-c"><div class="mini-icon cyan"><ImagePlus :size="15" /></div><span>多模态视觉</span><strong>低延迟</strong></div><div class="stack-core"><div class="core-ring ring-outer"></div><div class="core-ring ring-inner"></div><div class="core-mark">M</div></div></div>
</section>
<section class="metrics-grid"><article class="metric-card"><div class="metric-icon violet"><Activity :size="18" /></div><div class="metric-copy"><span>今日调用次数</span><strong>12,840</strong><small class="positive"><TrendingUp :size="13" /> 18.6% <i>vs 昨日</i></small></div><div class="sparkline violet-line"><span style="height: 28%"></span><span style="height: 42%"></span><span style="height: 38%"></span><span style="height: 58%"></span><span style="height: 50%"></span><span style="height: 82%"></span><span style="height: 72%"></span></div></article><article class="metric-card"><div class="metric-icon cyan"><Gauge :size="18" /></div><div class="metric-copy"><span>平均响应时间</span><strong>1.24 <i>s</i></strong><small class="positive"><TrendingUp :size="13" /> 12.4% <i>更快</i></small></div><div class="sparkline cyan-line"><span style="height: 72%"></span><span style="height: 62%"></span><span style="height: 64%"></span><span style="height: 48%"></span><span style="height: 40%"></span><span style="height: 34%"></span><span style="height: 26%"></span></div></article><article class="metric-card"><div class="metric-icon orange"><WalletCards :size="18" /></div><div class="metric-copy"><span>剩余可用额度</span><strong>¥ 286.40</strong><small class="neutral">本周期剩余 68%</small></div><div class="metric-ring"><svg viewBox="0 0 42 42"><circle class="ring-track" cx="21" cy="21" r="15.5" /><circle class="ring-value" cx="21" cy="21" r="15.5" /></svg><span>68%</span></div></article><article class="metric-card"><div class="metric-icon green"><CheckCircle2 :size="18" /></div><div class="metric-copy"><span>平台可用性</span><strong>99.98 <i>%</i></strong><small class="positive"><span class="dot-live"></span> 服务稳定</small></div><div class="availability-bars"><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div></article></section>
<section class="dashboard-grid"><article class="panel usage-panel"><div class="panel-heading"><div><span class="panel-eyebrow">调用趋势</span><h3>本周资源使用</h3></div><button class="select-button">最近 7 天 <ChevronDown :size="14" /></button></div><div class="usage-summary"><strong>3,842 <small>次调用</small></strong><span class="trend-chip"><TrendingUp :size="13" /> 24.8%</span><span class="summary-note">较上周同期</span></div><div class="bar-chart"><div v-for="bar in usageBars" :key="bar.day" class="bar-column"><span class="bar-value">{{ bar.label }}</span><div class="bar-track"><i :style="{ height: `${bar.value}%` }"></i></div><small>{{ bar.day }}</small></div></div></article><article class="panel activity-panel"><div class="panel-heading"><div><span class="panel-eyebrow">实时动态</span><h3>最近活动</h3></div><button class="link-button" @click="navigate('tasks')">查看全部 <ArrowUpRight :size="14" /></button></div><div class="activity-list"><div class="activity-item"><div class="activity-icon success"><Check :size="14" /></div><div><strong>调用完成</strong><p>MOYI Text Pro · 流式响应</p></div><time>刚刚</time></div><div class="activity-item"><div class="activity-icon violet"><KeyRound :size="14" /></div><div><strong>创建了新的 API Key</strong><p>AI SoulMate 内部环境</p></div><time>12 分钟前</time></div><div class="activity-item"><div class="activity-icon orange"><Box :size="14" /></div><div><strong>3D 任务执行中</strong><p>task_9f3a82 · 进度 72%</p></div><time>25 分钟前</time></div><div class="activity-item"><div class="activity-icon cyan"><CircleDollarSign :size="14" /></div><div><strong>额度已发放</strong><p>管理员向当前工作区发放额度</p></div><time>昨天</time></div></div></article></section>
<section class="section-heading"><div><span class="panel-eyebrow">精选能力</span><h3>从这里开始探索</h3></div><button class="link-button" @click="navigate('models')">查看全部模型 <ArrowRight :size="15" /></button></section><section class="model-preview-grid"><article v-for="model in models.filter((item) => item.featured)" :key="model.id" class="model-preview-card" :class="`accent-${model.accent}`" @click="showModelDetails(model)"><div class="model-card-top"><div class="model-symbol"><component :is="modelIcon(model)" :size="18" /></div><span class="availability-dot"><i></i> {{ model.availability }}%</span></div><h4>{{ model.name }}</h4><p>{{ model.description }}</p><div class="model-card-footer"><span>{{ model.mode }} · {{ model.latency }}</span><ArrowUpRight :size="16" /></div></article></section>
</template>
<template v-else-if="activeView === 'models'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>模型广场</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><button class="button secondary" @click="navigate('docs')"><BookOpen :size="16" /> 接入指南</button></div></section>
<section class="catalog-toolbar"><div class="filter-tabs"><button v-for="type in modelTypes" :key="type" :class="{ active: modelFilter === type }" @click="modelFilter = type">{{ type }}</button></div><div class="catalog-search"><Search :size="16" /><input v-model="modelQuery" placeholder="搜索模型名称或能力" /><SlidersHorizontal :size="16" /></div></section>
<section class="model-catalog-grid"><article v-for="model in filteredModels" :key="model.id" class="catalog-card" @click="showModelDetails(model)"><div class="catalog-card-head"><div class="model-symbol large" :class="model.accent"><component :is="modelIcon(model)" :size="21" /></div><button class="more-button" @click.stop="copyText(model.id, '模型名称')"><Copy :size="17" /></button></div><div class="catalog-title"><h3>{{ model.name }}</h3><span class="model-type">{{ model.type }}</span></div><span class="vendor-name">{{ model.vendor }}</span><p>{{ model.description }}</p><div class="model-specs"><span><Timer :size="14" /> {{ model.latency }}</span><span><Layers3 :size="14" /> {{ model.context }}</span><span><Activity :size="14" /> {{ model.availability }}%</span></div><div class="catalog-card-bottom"><span class="mode-tag" :class="{ async: model.mode === '异步' }">{{ model.mode }}调用</span><button class="text-button" @click.stop="openModel(model)">在线试用 <ArrowRight :size="14" /></button></div></article><div v-if="!filteredModels.length" class="empty-state"><PackageOpen :size="28" /><strong>没有找到匹配模型</strong><span>换个关键词或清除筛选试试</span></div></section>
</template>
<template v-else-if="activeView === 'playground'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>Playground</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><span class="latency-badge"><i></i> API 在线</span><button class="button secondary" @click="navigate('docs')"><Code2 :size="16" /> 查看代码示例</button></div></section>
<section class="playground-layout"><article class="panel playground-input"><div class="playground-head"><div><span class="panel-eyebrow">请求配置</span><h3>开始一次模型调用</h3></div><button class="icon-button" aria-label="刷新配置" @click="prompt = ''"><RefreshCcw :size="16" /></button></div><label class="field-label">选择模型</label><button class="model-select" @click="navigate('models')"><div class="model-symbol small" :class="activeModel.accent"><component :is="modelIcon(activeModel)" :size="16" /></div><span><strong>{{ activeModel.name }}</strong><small>{{ activeModel.type }} · {{ activeModel.mode }}调用</small></span><ChevronDown :size="16" /></button><label class="field-label">调用模式</label><div class="mode-switch"><button v-for="mode in ['同步', '流式', '异步']" :key="mode" :class="{ active: playgroundMode === mode }" @click="playgroundMode = mode as '同步' | '流式' | '异步'">{{ mode }}</button></div><label class="field-label prompt-label">输入内容 <span>{{ prompt.length }}/4000</span></label><textarea v-model="prompt" maxlength="4000" placeholder="描述你想让模型完成的任务..."></textarea><div class="prompt-hints"><button @click="prompt = '帮我分析这张产品截图,并给出三个可执行的优化建议。'"><ImagePlus :size="14" /> 图片理解</button><button @click="prompt = '为一个科幻风格的城市街区生成 3D 资产,包含建筑、道路和灯光。'"><Box :size="14" /> 生成 3D</button></div><div class="run-footer"><span><LockKeyhole :size="13" /> 由当前工作区额度支持</span><button class="button primary run-button" :disabled="isRunning" @click="runPlayground"><span v-if="isRunning" class="spinner"></span><Play v-else :size="16" /> {{ isRunning ? '调用中…' : '开始调用' }}</button></div></article><article class="panel playground-output"><div class="playground-head"><div><span class="panel-eyebrow">响应预览</span><h3>{{ playgroundMode === '异步' ? '任务状态' : '模型输出' }}</h3></div><div class="output-actions"><button class="icon-button" aria-label="复制输出" :disabled="!playgroundOutput" @click="copyText(playgroundOutput, '响应内容')"><Copy :size="15" /></button><button class="icon-button" aria-label="下载输出" :disabled="!playgroundOutput" @click="notify('演示文件已准备下载')"><Download :size="15" /></button></div></div><div v-if="isRunning" class="output-loading"><div class="loading-orbit"><span></span><span></span><span></span></div><strong>{{ playgroundMode === '异步' ? '正在提交任务…' : '模型正在思考…' }}</strong><p>{{ playgroundMode === '异步' ? '任务将进入统一队列,提交后可在任务中心追踪' : '正在建立安全连接并生成响应' }}</p></div><div v-else-if="playgroundOutput" class="output-result"><div class="result-meta"><span class="success-label"><CheckCircle2 :size="15" /> 调用成功</span><span>1.24s · 842 tokens · 202 Accepted</span></div><p>{{ playgroundOutput }}</p><div v-if="playgroundMode === '异步'" class="result-task-card"><div class="task-orb"><Box :size="18" /></div><div><strong>任务已进入队列</strong><span>前往任务中心查看完整进度和结果资产</span></div><button class="text-button" @click="navigate('tasks')">查看任务 <ArrowRight :size="14" /></button></div><div v-else class="output-caret"></div></div><div v-else class="output-empty"><div class="empty-illustration"><div><Sparkles :size="28" /></div><i></i><i></i><i></i></div><strong>准备好接收模型响应</strong><p>填写左侧请求内容,点击“开始调用”<br />这里会展示实时响应、用量和状态。</p><div class="empty-shortcuts"><kbd>⌘</kbd><span>Enter</span><small>运行调用</small></div></div><div class="output-footer"><span><Activity :size="13" /> 请求 ID 将在调用后生成</span><span class="secure-label"><ShieldCheck :size="13" /> 安全连接</span></div></article></section>
</template>
<template v-else-if="activeView === 'keys'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>API Keys</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><button class="button primary" @click="showCreateKeyModal = true"><Plus :size="17" /> 创建 API Key</button></div></section>
<section class="notice-banner"><div class="notice-icon"><ShieldCheck :size="18" /></div><div><strong>安全提示</strong><p>API Key 只在创建时完整展示一次。请将它保存在安全的环境变量中,不要提交到公开代码仓库。</p></div><button class="icon-button" @click="notify('安全提示已知晓')"><X :size="16" /></button></section>
<section class="panel table-panel"><div class="panel-heading"><div><span class="panel-eyebrow">凭证管理</span><h3>当前工作区的 Keys</h3></div><div class="table-tools"><span class="result-count">{{ apiKeys.length }} 个 Key</span><button class="icon-button" @click="notify('列表已刷新')"><RefreshCcw :size="16" /></button></div></div><div class="data-table"><div class="table-row table-head"><span>名称</span><span>Key</span><span>权限范围</span><span>最近使用</span><span>状态</span><span></span></div><div v-for="key in apiKeys" :key="key.id" class="table-row"><div class="key-name"><div class="key-icon"><KeyRound :size="15" /></div><div><strong>{{ key.name }}</strong><small>创建于 {{ key.created }}</small></div></div><button class="key-value" @click="copyText(key.prefix, 'Key')"><code>{{ key.prefix }}</code><Copy :size="14" /></button><span class="scope-text">{{ key.scope }}</span><span class="muted-text">{{ key.lastUsed }}</span><span class="status-label" :class="key.status === 'active' ? 'success' : 'muted'"><i></i>{{ key.status === 'active' ? '使用中' : '已禁用' }}</span><button class="more-button" @click="toggleKey(key)"><EyeOff v-if="key.status === 'active'" :size="17" /><Eye v-else :size="17" /></button></div></div></section>
<section class="key-guidance"><div class="guidance-icon"><Terminal :size="20" /></div><div><strong>准备在自己的系统里接入?</strong><p>复制 Base URL、API Key 和模型名,即可在 AI 应用、开发工具或 SDK/HTTP 客户端中完成配置。</p></div><button class="button secondary" @click="navigate('docs')">查看接入文档 <ArrowRight :size="15" /></button></section>
</template>
<template v-else-if="activeView === 'tasks'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>任务中心</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><button class="button secondary" @click="navigate('models')"><Plus :size="16" /> 新建任务</button></div></section>
<section class="task-summary-grid"><div class="task-summary-card"><span class="summary-icon orange"><Timer :size="17" /></span><div><small>执行中</small><strong>1</strong></div></div><div class="task-summary-card"><span class="summary-icon violet"><Clock3 :size="17" /></span><div><small>排队中</small><strong>1</strong></div></div><div class="task-summary-card"><span class="summary-icon green"><CheckCircle2 :size="17" /></span><div><small>今日完成</small><strong>28</strong></div></div><div class="task-summary-card"><span class="summary-icon cyan"><Gauge :size="17" /></span><div><small>平均耗时</small><strong>02:14</strong></div></div></section>
<section class="panel table-panel"><div class="panel-heading"><div><span class="panel-eyebrow">异步调用</span><h3>任务列表</h3></div><div class="table-tools"><div class="filter-tabs compact"><button v-for="filter in ['全部', '排队中', '执行中', '已完成', '失败']" :key="filter" :class="{ active: taskFilter === filter }" @click="taskFilter = filter as '全部' | TaskStatus">{{ filter }}</button></div><button class="icon-button" @click="notify('任务列表已刷新')"><RefreshCcw :size="16" /></button></div></div><div class="data-table task-table"><div class="table-row table-head"><span>任务</span><span>模型</span><span>进度</span><span>创建时间</span><span>状态</span><span></span></div><button v-for="task in filteredTasks" :key="task.id" class="table-row task-row" @click="selectedTask = task"><div class="task-name"><div class="task-icon" :class="taskStatusClass(task.status)"><Box :size="15" /></div><div><strong>{{ task.type }}</strong><small>{{ task.id }}</small></div></div><span class="model-name">{{ task.model }}</span><div class="progress-cell"><div class="progress-track"><i :class="taskStatusClass(task.status)" :style="{ width: `${task.progress}%` }"></i></div><small>{{ task.progress }}%</small></div><span class="muted-text">{{ task.created }}<small>{{ task.duration }}</small></span><span class="status-label" :class="taskStatusClass(task.status)"><i></i>{{ task.status }}</span><ChevronRight :size="17" /></button><div v-if="!filteredTasks.length" class="empty-table">没有符合条件的任务</div></div></section>
<div v-if="selectedTask" class="task-detail-drawer"><div class="drawer-head"><div><span class="panel-eyebrow">任务详情</span><h3>{{ selectedTask.type }}</h3></div><button class="icon-button" @click="selectedTask = null"><X :size="18" /></button></div><div class="drawer-status" :class="taskStatusClass(selectedTask.status)"><span class="status-label"><i></i>{{ selectedTask.status }}</span><strong>{{ selectedTask.progress }}%</strong></div><div class="drawer-progress"><div class="progress-track"><i :class="taskStatusClass(selectedTask.status)" :style="{ width: `${selectedTask.progress}%` }"></i></div><span>{{ selectedTask.result }}</span></div><dl class="detail-list"><div><dt>任务 ID</dt><dd>{{ selectedTask.id }} <Copy :size="13" @click="copyText(selectedTask!.id, '任务 ID')" /></dd></div><div><dt>模型</dt><dd>{{ selectedTask.model }}</dd></div><div><dt>创建时间</dt><dd>{{ selectedTask.created }}</dd></div></dl><button class="button secondary full-width" @click="selectedTask = null">关闭详情</button></div>
</template>
<template v-else-if="activeView === 'usage'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>用量与账单</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><button class="button disabled-button" disabled title="额度规则确认后开放"><CreditCard :size="16" /> 充值入口(暂未开放)</button></div></section>
<section class="billing-banner"><div class="billing-art"><div class="billing-orbit"></div><CircleDollarSign :size="30" /></div><div><span class="panel-eyebrow">管理员额度发放</span><h3>当前周期还剩 <strong>¥ 286.40</strong></h3><p>充值、订阅与支付能力将在商业规则确认后开放,页面位置已预留。</p></div><button class="button ghost-light" @click="notify('充值入口目前仅作页面预留')">了解规则 <ArrowRight :size="15" /></button></section>
<section class="usage-layout"><article class="panel usage-detail-panel"><div class="panel-heading"><div><span class="panel-eyebrow">调用用量</span><h3>过去 7 天</h3></div><button class="select-button">按调用次数 <ChevronDown :size="14" /></button></div><div class="usage-big-number"><strong>15,982</strong><span class="positive"><TrendingUp :size="13" /> 24.8%</span><small>总调用次数</small></div><div class="bar-chart large-chart"><div v-for="bar in usageBars" :key="bar.day" class="bar-column"><span class="bar-value">{{ bar.label }}</span><div class="bar-track"><i :style="{ height: `${bar.value}%` }"></i></div><small>{{ bar.day }}</small></div></div><div class="usage-legend"><span><i class="legend-dot violet"></i>文本与多模态 68%</span><span><i class="legend-dot orange"></i>3D / 图像任务 24%</span><span><i class="legend-dot cyan"></i>其他 8%</span></div></article><article class="panel ledger-panel"><div class="panel-heading"><div><span class="panel-eyebrow">额度流水</span><h3>最近变动</h3></div><button class="link-button" @click="notify('完整账单导出将在下一阶段开放')">导出 <Download :size="14" /></button></div><div class="ledger-list"><div class="ledger-item"><div class="ledger-icon plus"><Plus :size="15" /></div><div><strong>管理员额度发放</strong><span>模灵科技工作区</span></div><time>今天 09:20</time><b class="amount plus">+ ¥ 300.00</b></div><div class="ledger-item"><div class="ledger-icon minus"><MessageSquare :size="15" /></div><div><strong>MOYI Text Pro 调用</strong><span>12,840 次 · AI SoulMate</span></div><time>今天 18:02</time><b class="amount">- ¥ 8.60</b></div><div class="ledger-item"><div class="ledger-icon minus"><Box :size="15" /></div><div><strong>AI SoulMate 3D 任务</strong><span>3 个任务 · 生成资产</span></div><time>昨天 16:40</time><b class="amount">- ¥ 4.20</b></div></div></article></section>
</template>
<template v-else-if="activeView === 'docs'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>接入文档</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><button class="button secondary" @click="copyText('https://api.moyi.ai/v1', 'Base URL')"><Copy :size="16" /> 复制 Base URL</button></div></section>
<section class="docs-layout"><aside class="docs-nav panel"><span class="docs-nav-label">快速开始</span><button class="active">概览</button><button>认证与 API Key</button><button>标准对话接口</button><button>流式响应</button><button>异步任务</button><button>错误码与重试</button><span class="docs-nav-label second">资源</span><button>模型列表</button><button>用量查询</button><button>更新日志 <ExternalLink :size="13" /></button></aside><article class="docs-article"><div class="docs-article-heading"><span class="eyebrow">QUICK START</span><h2>三分钟完成第一次调用</h2><p>模亦灵枢提供统一、可组合的模型 API。只需一个 API Key,即可在自己的 AI 应用、开发工具或 SDK/HTTP 客户端中接入多种模型。</p></div><div class="docs-step"><span class="step-number">01</span><div><h3>准备接入信息</h3><p>在控制台创建 API Key,记录下面三项信息。Key 只会在创建时完整展示一次。</p><div class="code-card compact-code"><div class="code-card-head"><span><i></i><i></i><i></i></span><small>环境变量</small><button @click="copyText('MOYI_API_KEY=sk-moyi-your-key', '代码')"><Copy :size="14" /></button></div><pre><code>MOYI_BASE_URL=https://api.moyi.ai/v1
MOYI_API_KEY=sk-moyi-your-key
MOYI_MODEL=moyi-text-pro</code></pre></div></div></div><div class="docs-step"><span class="step-number">02</span><div><h3>发送一次标准请求</h3><p>文本模型支持同步和流式响应;3D、视频等任务型模型使用提交任务、查询状态的异步模式。</p><div class="code-card"><div class="code-card-head"><span><i></i><i></i><i></i></span><small>curl · chat</small><button @click="copyText('curl https://api.moyi.ai/v1/chat/completions', '代码')"><Copy :size="14" /></button></div><pre><code>curl https://api.moyi.ai/v1/chat/completions \
-H "Authorization: Bearer $MOYI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "moyi-text-pro",
"messages": [{"role": "user", "content": "Hello"}],
"stream": true
}'</code></pre></div></div></div><div class="docs-callout"><div><ShieldCheck :size="18" /></div><p><strong>通用标准,保持开放。</strong>模亦灵枢的接入目标是让模型能力自然进入你的应用,而不是要求你改变现有工作流。具体模型支持的协议和参数,以模型详情页为准。</p></div></article></section>
</template>
<template v-else-if="activeView === 'admin-overview'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>管理总览</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><span class="admin-badge"><ServerCog :size="15" /> 管理员视角</span></div></section>
<section class="ops-metrics"><article class="ops-metric"><span class="metric-icon violet"><Users :size="17" /></span><div><small>内测用户</small><strong>48</strong><span class="positive">+ 6 本周</span></div></article><article class="ops-metric"><span class="metric-icon cyan"><Cloud :size="17" /></span><div><small>在线模型</small><strong>12</strong><span class="positive">100% 可用</span></div></article><article class="ops-metric"><span class="metric-icon orange"><Gauge :size="17" /></span><div><small>当前队列</small><strong>03</strong><span class="neutral">峰值 18</span></div></article><article class="ops-metric"><span class="metric-icon green"><CreditCard :size="17" /></span><div><small>今日额度消耗</small><strong>¥ 42.80</strong><span class="positive">低于预期</span></div></article></section>
<section class="ops-grid"><article class="panel admin-credit-panel"><div class="panel-heading"><div><span class="panel-eyebrow">资源管理</span><h3>发放测试额度</h3></div><span class="admin-badge subtle"><ShieldCheck :size="13" /> 已审计</span></div><p>第一版由管理员直接发放额度,完整支付与充值闭环将在商业规则确定后接入。</p><label class="field-label">用户邮箱或账号</label><div class="admin-input"><Users :size="15" /><input v-model="adminCreditUser" placeholder="例如:dev@example.com" /></div><label class="field-label">发放额度</label><div class="admin-input"><CircleDollarSign :size="15" /><input v-model="adminCreditAmount" placeholder="100" /><span>点</span></div><button class="button primary full-width" @click="grantCredit"><Plus :size="16" /> 发放额度</button></article><article class="panel provider-panel"><div class="panel-heading"><div><span class="panel-eyebrow">模型供给</span><h3>服务状态</h3></div><button class="link-button" @click="notify('供应商管理将在架构设计阶段接入')">管理模型 <ArrowUpRight :size="14" /></button></div><div class="provider-list"><div><span class="provider-health"><i></i></span><div><strong>MOYI Text Pro</strong><small>文本 · 主路由</small></div><b>99.98%</b><span class="provider-latency">0.8s</span></div><div><span class="provider-health"><i></i></span><div><strong>AI SoulMate 3D</strong><small>3D · 异步队列</small></div><b>99.90%</b><span class="provider-latency">2–5m</span></div><div><span class="provider-health warning"><i></i></span><div><strong>MOYI Motion</strong><small>视频 · 备用路由</small></div><b>99.86%</b><span class="provider-latency">1–3m</span></div></div></article></section>
<section class="panel ops-log-panel"><div class="panel-heading"><div><span class="panel-eyebrow">风险与审计</span><h3>最近运营事件</h3></div><button class="select-button">全部事件 <ChevronDown :size="14" /></button></div><div class="ops-log-list"><div><div class="activity-icon green"><Check :size="14" /></div><span><strong>额度发放完成</strong><small>管理员 林默 向模灵科技工作区发放 ¥300.00</small></span><time>今天 09:20</time></div><div><div class="activity-icon cyan"><SlidersHorizontal :size="14" /></div><span><strong>模型策略更新</strong><small>MOYI Text Pro 并发上限调整为 24</small></span><time>昨天 18:42</time></div><div><div class="activity-icon orange"><AlertTriangle :size="14" /></div><span><strong>队列容量提醒</strong><small>AI SoulMate 3D 峰值期间进入排队保护</small></span><time>昨天 16:40</time></div></div></section>
</template>
<template v-else>
<template v-if="activeView === 'admin-users'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>用户与额度</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><button class="button primary" @click="showInviteModal = true"><Plus :size="16" /> 创建邀请码</button></div></section>
<section class="admin-summary-grid"><article class="admin-summary-card"><span class="metric-icon violet"><Users :size="17" /></span><div><small>用户总数</small><strong>{{ adminUsers.length }}</strong><span class="positive">+ 6 本周</span></div></article><article class="admin-summary-card"><span class="metric-icon cyan"><CheckCircle2 :size="17" /></span><div><small>正常用户</small><strong>{{ adminUsers.filter((user) => user.status === '正常').length }}</strong><span class="positive">98.1%</span></div></article><article class="admin-summary-card"><span class="metric-icon orange"><CircleDollarSign :size="17" /></span><div><small>已发放额度</small><strong>¥ 8,420</strong><span class="neutral">本周期</span></div></article><article class="admin-summary-card"><span class="metric-icon green"><Activity :size="17" /></span><div><small>今日活跃</small><strong>24</strong><span class="positive">+ 12.4%</span></div></article></section>
<section class="panel table-panel"><div class="panel-heading"><div><span class="panel-eyebrow">账户目录</span><h3>用户列表</h3></div><div class="table-tools"><div class="catalog-search admin-search"><Search :size="15" /><input v-model="adminUserQuery" placeholder="搜索姓名、邮箱或 ID" /></div><div class="filter-tabs compact"><button v-for="status in ['全部', '正常', '待激活', '已停用']" :key="status" :class="{ active: adminUserStatus === status }" @click="adminUserStatus = status as '全部' | AdminUser['status']">{{ status }}</button></div></div></div><div class="data-table admin-user-table"><div class="table-row table-head"><span>用户</span><span>角色</span><span>额度余额</span><span>累计用量</span><span>最近活跃</span><span>状态</span></div><button v-for="user in filteredAdminUsers" :key="user.id" class="table-row admin-user-row" @click="selectedAdminUser = user"><div class="key-name"><div class="avatar mini-avatar">{{ user.name.slice(0, 1) }}</div><div><strong>{{ user.name }}</strong><small>{{ user.email }} · {{ user.id }}</small></div></div><span class="role-pill">{{ user.role }}</span><span class="admin-balance">¥ {{ user.balance.toFixed(2) }}</span><span class="muted-text">{{ user.usage }}</span><span class="muted-text">{{ user.lastActive }}</span><span class="status-label" :class="user.status === '正常' ? 'success' : user.status === '待激活' ? 'is-queued' : 'muted'"><i></i>{{ user.status }}</span></button><div v-if="!filteredAdminUsers.length" class="empty-table">没有找到匹配用户</div></div></section>
<div v-if="selectedAdminUser" class="task-detail-drawer admin-user-drawer"><div class="drawer-head"><div><span class="panel-eyebrow">用户详情</span><h3>{{ selectedAdminUser.name }}</h3></div><button class="icon-button" @click="selectedAdminUser = null"><X :size="18" /></button></div><div class="user-profile-head"><div class="avatar large-avatar">{{ selectedAdminUser.name.slice(0, 1) }}</div><div><strong>{{ selectedAdminUser.email }}</strong><span>{{ selectedAdminUser.role }} · {{ selectedAdminUser.status }}</span></div></div><dl class="detail-list"><div><dt>用户 ID</dt><dd>{{ selectedAdminUser.id }}</dd></div><div><dt>额度余额</dt><dd>¥ {{ selectedAdminUser.balance.toFixed(2) }}</dd></div><div><dt>累计用量</dt><dd>{{ selectedAdminUser.usage }}</dd></div><div><dt>最近活跃</dt><dd>{{ selectedAdminUser.lastActive }}</dd></div></dl><div class="drawer-actions"><button class="button primary full-width" @click="openCreditForUser(selectedAdminUser)"><CircleDollarSign :size="15" /> 发放额度</button><button class="button secondary full-width" @click="notify('用户状态操作已记录(演示)')"><ShieldCheck :size="15" /> {{ selectedAdminUser.status === '已停用' ? '重新启用' : '停用用户' }}</button></div></div>
</template>
<template v-else-if="activeView === 'admin-models'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>模型与供应商</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><button class="button secondary" @click="notify('模型配置表单将在接入真实 API 后开放')"><Plus :size="16" /> 添加模型</button></div></section>
<section class="notice-banner admin-notice"><div class="notice-icon"><Cloud :size="18" /></div><div><strong>模型目录是统一能力层</strong><p>每个模型都需要声明能力类型、输入输出、调用模式、价格和并发上限,管理端的配置不会直接暴露供应商密钥。</p></div><button class="icon-button" @click="notify('模型 Schema 文档将在详细设计阶段开放')"><CircleHelp :size="16" /></button></section>
<section class="panel provider-panel provider-table-panel"><div class="panel-heading"><div><span class="panel-eyebrow">供应商接入</span><h3>渠道提供方</h3></div><span class="result-count">{{ providers.length }} 个供应商</span></div><div class="provider-table"><div class="provider-table-row provider-table-head"><span>供应商</span><span>覆盖能力</span><span>模型数</span><span>延迟</span><span>成功率</span><span>状态</span><span></span></div><div v-for="provider in providers" :key="provider.id" class="provider-table-row"><div class="provider-name"><span class="provider-health" :class="{ warning: provider.status !== '健康' }"><i></i></span><div><strong>{{ provider.name }}</strong><small>{{ provider.id }}</small></div></div><span class="muted-text">{{ provider.category }}</span><span class="muted-text">{{ provider.models }}</span><span class="muted-text">{{ provider.latency }}</span><b :class="provider.status === '健康' ? 'positive' : 'neutral'">{{ provider.successRate }}</b><span class="status-label" :class="provider.status === '健康' ? 'success' : provider.status === '波动' ? 'is-running' : 'muted'"><i></i>{{ provider.status }}</span><button class="toggle-switch" :class="{ active: provider.enabled }" @click="toggleProvider(provider)"><span></span></button></div></div></section>
<section class="model-admin-grid"><article v-for="model in models" :key="model.id" class="model-admin-card"><div class="model-card-top"><div class="model-symbol" :class="model.accent"><component :is="modelIcon(model)" :size="17" /></div><span class="status-label success"><i></i>已上线</span></div><h3>{{ model.name }}</h3><p>{{ model.description }}</p><div class="model-admin-meta"><span>{{ model.type }}</span><span>{{ model.mode }}</span><span>{{ model.availability }}%</span></div><button class="text-button" @click="notify(`${model.name} 的能力 Schema 已复制(演示)`)">查看能力 Schema <ArrowRight :size="14" /></button></article></section>
</template>
<template v-else-if="activeView === 'admin-routing'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>渠道与路由</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><span class="status-pill"><i></i>路由服务正常</span><button class="button secondary" @click="notify('路由策略模拟器将在下一轮开放')"><Play :size="15" /> 模拟路由</button></div></section>
<section class="routing-banner"><div class="routing-banner-orb"><SlidersHorizontal :size="25" /></div><div><span class="panel-eyebrow">SMART ROUTING</span><h3>按质量、速度、价格和可用性分配请求</h3><p>当前已启用 4 条模型路由,故障时自动执行重试与备用渠道切换。</p></div><div class="routing-health"><strong>99.96%</strong><span>路由成功率</span></div></section>
<section class="panel table-panel"><div class="panel-heading"><div><span class="panel-eyebrow">路由策略</span><h3>模型到渠道的映射</h3></div><button class="link-button" @click="notify('批量策略编辑将在详细设计阶段开放')">批量编辑 <ArrowUpRight :size="14" /></button></div><div class="route-table"><div class="route-table-row route-table-head"><span>模型</span><span>能力</span><span>主渠道</span><span>备用渠道</span><span>策略</span><span>健康</span><span>状态</span></div><div v-for="route in routeItems" :key="route.id" class="route-table-row"><div><strong>{{ route.model }}</strong><small>{{ route.id }}</small></div><span class="muted-text">{{ route.capability }}</span><span class="route-channel">{{ route.primary }}</span><span class="muted-text">{{ route.fallback }}</span><span class="role-pill">{{ route.policy }}</span><b class="positive">{{ route.health }}</b><button class="toggle-switch" :class="{ active: route.enabled }" @click="toggleRoute(route)"><span></span></button></div></div></section>
</template>
<template v-else-if="activeView === 'admin-queue'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>并发与队列</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><span class="admin-badge"><Gauge :size="15" />保护策略 {{ queueProtection ? '已开启' : '已关闭' }}</span><button class="button secondary" @click="queueProtection = !queueProtection; notify(`队列保护已${queueProtection ? '开启' : '关闭'}`)">{{ queueProtection ? '暂停保护' : '开启保护' }}</button></div></section>
<section class="capacity-overview"><article class="capacity-ring-card"><div class="capacity-ring"><span>68%</span><small>总并发</small></div><div><span class="panel-eyebrow">实时容量</span><h3>34 / 52</h3><p>当前运行中的请求与异步任务</p></div></article><article class="capacity-stat"><span class="metric-icon orange"><Clock3 :size="17" /></span><div><small>等待任务</small><strong>6</strong><span class="neutral">峰值 18</span></div></article><article class="capacity-stat"><span class="metric-icon cyan"><Timer :size="17" /></span><div><small>平均等待</small><strong>42s</strong><span class="positive">较昨日 -12%</span></div></article><article class="capacity-stat"><span class="metric-icon green"><CheckCircle2 :size="17" /></span><div><small>调度成功率</small><strong>99.94%</strong><span class="positive">稳定</span></div></article></section>
<section class="panel table-panel"><div class="panel-heading"><div><span class="panel-eyebrow">容量分组</span><h3>并发与排队状态</h3></div><button class="select-button">最近 15 分钟 <ChevronDown :size="14" /></button></div><div class="queue-table"><div class="queue-table-row queue-table-head"><span>资源组</span><span>运行中</span><span>并发上限</span><span>排队数</span><span>预计等待</span><span>状态</span></div><div v-for="group in queueGroups" :key="group.name" class="queue-table-row"><div><strong>{{ group.name }}</strong><small>{{ group.type }}</small></div><div class="queue-meter"><div class="progress-track"><i :style="{ width: `${Math.round(group.running / group.limit * 100)}%` }"></i></div><b>{{ group.running }}</b></div><span class="muted-text">{{ group.limit }}</span><span class="queue-count" :class="{ hot: group.queued > 1 }">{{ group.queued }}</span><span class="muted-text">{{ group.wait }}</span><span class="status-label" :class="group.status === '正常' ? 'success' : 'is-running'"><i></i>{{ group.status }}</span></div></div></section>
</template>
<template v-else-if="activeView === 'admin-billing'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>计费与订单</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><span class="admin-badge"><CreditCard :size="15" />第一版额度模式</span><button class="button secondary" @click="notify('真实充值和订单流程将在商业规则确认后开放')">配置规则</button></div></section>
<section class="notice-banner billing-admin-notice"><div class="notice-icon"><CircleDollarSign :size="18" /></div><div><strong>充值与套餐暂未启用</strong><p>当前采用邀请码 + 管理员发放额度。下面展示的是未来按模型能力配置计费规则的位置,不会产生真实订单。</p></div><span class="coming-soon-tag">COMING SOON</span></section>
<section class="billing-admin-grid"><article class="billing-admin-metric"><span>本周期额度发放</span><strong>¥ 8,420.00</strong><small>48 个用户 · + 16.8%</small></article><article class="billing-admin-metric"><span>本周期实际消耗</span><strong>¥ 1,824.60</strong><small>覆盖 6 类模型能力</small></article><article class="billing-admin-metric"><span>待对账流水</span><strong>¥ 0.00</strong><small>真实支付尚未开放</small></article></section>
<section class="panel table-panel"><div class="panel-heading"><div><span class="panel-eyebrow">价格目录</span><h3>模型计费规则</h3></div><button class="link-button" @click="notify('批量导入价格将在支付方案确定后开放')">导入价格 <ArrowUpRight :size="14" /></button></div><div class="pricing-table"><div class="pricing-table-row pricing-table-head"><span>模型</span><span>计费单位</span><span>输入 / 基础</span><span>输出 / 结果</span><span>扣费规则</span><span>状态</span></div><div v-for="item in pricingItems" :key="item.model" class="pricing-table-row"><strong>{{ item.model }}</strong><span class="muted-text">{{ item.unit }}</span><span class="mono-text">{{ item.input }}</span><span class="mono-text">{{ item.output }}</span><span class="muted-text">{{ item.rule }}</span><span class="status-label" :class="item.status === '已生效' ? 'success' : 'is-queued'"><i></i>{{ item.status }}</span></div></div></section>
</template>
<template v-else-if="activeView === 'admin-audit'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>日志与审计</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><button class="button secondary" @click="notify('审计日志导出任务已创建(演示)')"><Download :size="15" /> 导出日志</button></div></section>
<section class="audit-toolbar panel"><div class="catalog-search admin-search"><Search :size="15" /><input v-model="auditQuery" placeholder="搜索操作人、动作或目标" /></div><div class="filter-tabs compact"><button class="active">全部事件</button><button>管理员操作</button><button>风险事件</button></div><button class="select-button">最近 7 天 <ChevronDown :size="14" /></button></section>
<section class="panel table-panel"><div class="panel-heading"><div><span class="panel-eyebrow">不可篡改记录</span><h3>运营事件</h3></div><span class="result-count">{{ filteredAuditEvents.length }} 条事件</span></div><div class="audit-table"><div class="audit-table-row audit-table-head"><span>时间</span><span>操作人</span><span>动作</span><span>目标</span><span>来源 IP</span><span>级别</span></div><div v-for="event in filteredAuditEvents" :key="`${event.time}-${event.action}`" class="audit-table-row"><span class="muted-text mono-text">{{ event.time }}</span><span class="audit-actor">{{ event.actor }}</span><strong>{{ event.action }}</strong><span class="muted-text">{{ event.target }}</span><span class="muted-text mono-text">{{ event.ip }}</span><span class="audit-level" :class="event.level === '风险' ? 'danger' : event.level === '重要' ? 'warning' : ''"><i></i>{{ event.level }}</span></div></div></section>
</template>
<template v-else-if="activeView === 'admin-settings'">
<section class="page-intro"><div><span class="eyebrow">{{ currentMeta.eyebrow }}</span><h1>平台设置</h1><p>{{ currentMeta.description }}</p></div><div class="intro-actions"><span class="admin-badge"><ShieldCheck :size="15" />仅管理员可见</span><button class="button primary" @click="saveSettings"><Check :size="15" /> 保存设置</button></div></section>
<section class="settings-layout"><article class="panel settings-panel"><div class="panel-heading"><div><span class="panel-eyebrow">注册与准入</span><h3>用户注册策略</h3></div><LockKeyhole :size="18" class="settings-heading-icon" /></div><p class="settings-description">第一版优先使用邀请码控制用户规模,同时为手机号和邮箱公开注册预留开关。</p><div class="settings-list"><label class="settings-row"><span><strong>邀请码注册</strong><small>只有获得邀请码的用户可以创建账号</small></span><button class="toggle-switch" :class="{ active: platformSettings.inviteOnly }" @click="platformSettings.inviteOnly = !platformSettings.inviteOnly"><span></span></button></label><label class="settings-row"><span><strong>邮箱公开注册</strong><small>后续可开放邮箱验证码注册</small></span><button class="toggle-switch" :class="{ active: platformSettings.emailSignup }" @click="platformSettings.emailSignup = !platformSettings.emailSignup"><span></span></button></label><label class="settings-row"><span><strong>手机号公开注册</strong><small>地区与短信服务确认后开放</small></span><button class="toggle-switch" :class="{ active: platformSettings.phoneSignup }" @click="platformSettings.phoneSignup = !platformSettings.phoneSignup"><span></span></button></label></div></article><article class="panel settings-panel"><div class="panel-heading"><div><span class="panel-eyebrow">额度与体验</span><h3>内测运营策略</h3></div><CircleDollarSign :size="18" class="settings-heading-icon" /></div><p class="settings-description">控制额度发放方式和平台维护期的用户提示,真实支付规则后续单独配置。</p><div class="settings-list"><label class="settings-row"><span><strong>新用户自动发放额度</strong><small>关闭后由管理员手动发放</small></span><button class="toggle-switch" :class="{ active: platformSettings.autoCredit }" @click="platformSettings.autoCredit = !platformSettings.autoCredit"><span></span></button></label><label class="settings-row"><span><strong>显示维护公告</strong><small>在用户端顶部显示服务状态提示</small></span><button class="toggle-switch" :class="{ active: platformSettings.maintenanceNotice }" @click="platformSettings.maintenanceNotice = !platformSettings.maintenanceNotice"><span></span></button></label></div><div class="settings-callout"><AlertTriangle :size="15" /><span>保存后会记录到平台审计日志。</span></div></article></section>
</template>
</template>
<main class="content">
<UserConsole v-if="portal === 'user'" :view="activeView" @navigate="navigate" @notify="notify" />
<AdminConsole v-else :view="activeView" @navigate="navigate" @notify="notify" />
</main>
</section>
</div>
<div v-if="showInviteModal" class="modal-backdrop" @click.self="showInviteModal = false"><div class="modal-card"><div class="modal-head"><div><span class="eyebrow">NEW INVITATION</span><h2>创建邀请码</h2></div><button class="icon-button" @click="showInviteModal = false"><X :size="18" /></button></div><p class="modal-description">先以邮箱作为邀请对象,用户激活后再由管理员发放额度。</p><label class="field-label">用户邮箱</label><input v-model="inviteEmail" class="modal-input" placeholder="例如:developer@example.com" autofocus /><label class="field-label">初始角色</label><div class="scope-options"><button v-for="role in ['普通用户', '平台运营', '模型运营']" :key="role" :class="{ active: inviteRole === role }" @click="inviteRole = role as AdminUser['role']"><span class="radio-dot"></span><span><strong>{{ role }}</strong><small>{{ role === '普通用户' ? '仅使用模型和查看自己的资源' : '可访问部分管理模块' }}</small></span><Check v-if="inviteRole === role" :size="16" /></button></div><div class="modal-footer"><button class="button secondary" @click="showInviteModal = false">取消</button><button class="button primary" @click="createInvite"><Send :size="16" /> 创建邀请</button></div></div></div>
<div v-if="showCreateKeyModal" class="modal-backdrop" @click.self="showCreateKeyModal = false"><div class="modal-card"><div class="modal-head"><div><span class="eyebrow">NEW CREDENTIAL</span><h2>创建 API Key</h2></div><button class="icon-button" @click="showCreateKeyModal = false"><X :size="18" /></button></div><p class="modal-description">为不同的应用或环境创建独立凭证,方便管理权限与用量。</p><label class="field-label">Key 名称</label><input v-model="keyName" class="modal-input" placeholder="例如:生产环境 / 个人项目" autofocus /><label class="field-label">权限范围</label><div class="scope-options"><button :class="{ active: keyScope === '全部模型' }" @click="keyScope = '全部模型'"><span class="radio-dot"></span><span><strong>全部模型</strong><small>可以调用工作区中的所有模型</small></span><Check v-if="keyScope === '全部模型'" :size="16" /></button><button :class="{ active: keyScope === '文本 / 多模态' }" @click="keyScope = '文本 / 多模态'"><span class="radio-dot"></span><span><strong>文本 / 多模态</strong><small>仅限文本和视觉相关模型</small></span><Check v-if="keyScope === '文本 / 多模态'" :size="16" /></button></div><div class="modal-footer"><button class="button secondary" @click="showCreateKeyModal = false">取消</button><button class="button primary" @click="createKey"><KeyRound :size="16" /> 生成 Key</button></div></div></div>
<div v-if="showSecretModal" class="modal-backdrop" @click.self="showSecretModal = false"><div class="modal-card secret-modal"><div class="secret-success"><div><CheckCircle2 :size="25" /></div><span>API Key 创建成功</span></div><h2>请立即保存你的 Key</h2><p class="modal-description">出于安全原因,完整 Key 只会展示这一次。关闭后将无法再次查看。</p><div class="secret-value"><code>{{ showApiKey ? newKeySecret : `${newKeySecret.slice(0, 10)}••••••••••••` }}</code><button @click="showApiKey = !showApiKey"><EyeOff v-if="showApiKey" :size="16" /><Eye v-else :size="16" /></button><button @click="copyText(newKeySecret, '新 API Key')"><Copy :size="16" /></button></div><div class="secret-warning"><AlertTriangle :size="16" /><span>不要将 Key 提交到公开仓库或分享给他人。</span></div><button class="button primary full-width" @click="showSecretModal = false; showApiKey = false">我已安全保存</button></div></div>
<div v-if="selectedModel" class="model-detail-backdrop" @click="selectedModel = null"></div>
<div v-if="selectedModel" class="model-detail-drawer"><div class="drawer-head"><div><span class="panel-eyebrow">MODEL DETAILS</span><h3>{{ selectedModel.name }}</h3></div><button class="icon-button" @click="selectedModel = null"><X :size="18" /></button></div><div class="model-detail-hero"><div class="model-symbol large" :class="selectedModel.accent"><component :is="modelIcon(selectedModel)" :size="21" /></div><div><span>{{ selectedModel.vendor }}</span><strong>{{ selectedModel.type }} · {{ selectedModel.mode }}调用</strong></div></div><p class="model-detail-description">{{ selectedModel.description }}</p><div class="model-detail-status"><span class="status-label success"><i></i>服务正常</span><strong>{{ selectedModel.availability }}%</strong><small>近 30 天可用性</small></div><dl class="detail-list model-detail-list"><div><dt>模型名称</dt><dd>{{ selectedModel.id }} <Copy :size="13" @click="copyText(selectedModel!.id, '模型名称')" /></dd></div><div><dt>典型延迟</dt><dd>{{ selectedModel.latency }}</dd></div><div><dt>能力规格</dt><dd>{{ selectedModel.context }}</dd></div><div><dt>接口模式</dt><dd>{{ selectedModel.mode === '异步' ? '/v1/tasks' : '/v1/chat/completions' }}</dd></div></dl><div class="model-detail-callout"><Info :size="16" /><span>{{ selectedModel.mode === '异步' ? '该模型提交后进入任务队列,可在任务中心查询进度和结果。' : '该模型支持通过统一标准接口调用,可直接用于现有 AI 应用。' }}</span></div><div class="drawer-actions"><button class="button primary full-width" @click="openModel(selectedModel)"><Play :size="15" /> 在线试用</button><button class="button secondary full-width" @click="navigate('docs'); selectedModel = null"><BookOpen :size="15" /> 查看接入文档</button></div></div>
<div v-if="selectedAdminUser" class="drawer-backdrop" @click="selectedAdminUser = null"></div>
<div v-if="selectedTask" class="drawer-backdrop" @click="selectedTask = null"></div>
<Transition name="toast"><div v-if="toastMessage" class="toast-message"><CheckCircle2 :size="17" /><span>{{ toastMessage }}</span><button @click="toastMessage = ''"><X :size="14" /></button></div></Transition>
</div>
<Transition name="toast"><div v-if="toastMessage" class="toast"><ShieldCheck :size="17" /><span>{{ toastMessage }}</span><button @click="toastMessage = ''"><X :size="15" /></button></div></Transition>
</template>
+15
View File
@@ -0,0 +1,15 @@
<script setup lang="ts">
import { X } from 'lucide-vue-next'
defineProps<{ title: string; eyebrow?: string }>()
defineEmits<{ close: [] }>()
</script>
<template>
<div class="slide-overlay" @click="$emit('close')"></div>
<aside class="slide-panel">
<header><div><span>{{ eyebrow ?? 'DETAILS' }}</span><h2>{{ title }}</h2></div><button class="icon-button" @click="$emit('close')"><X :size="18" /></button></header>
<div class="slide-content"><slot /></div>
<footer><slot name="footer" /></footer>
</aside>
</template>
+16
View File
@@ -0,0 +1,16 @@
<script setup lang="ts">
import { X } from 'lucide-vue-next'
defineProps<{ title: string; eyebrow?: string }>()
defineEmits<{ close: [] }>()
</script>
<template>
<div class="modal-overlay" @click.self="$emit('close')">
<section class="modal">
<header><div><span>{{ eyebrow ?? 'MOYI CONSOLE' }}</span><h2>{{ title }}</h2></div><button class="icon-button" @click="$emit('close')"><X :size="18" /></button></header>
<div class="modal-body"><slot /></div>
<footer><slot name="footer" /></footer>
</section>
</div>
</template>
+115
View File
@@ -0,0 +1,115 @@
import {
Activity,
BarChart3,
Blocks,
Bot,
Box,
Boxes,
CircleDollarSign,
FileClock,
FileText,
Gauge,
Image,
KeyRound,
LayoutDashboard,
MessageSquareText,
Mic2,
Network,
Settings2,
ShieldCheck,
SlidersHorizontal,
Sparkles,
Users,
Video,
} from 'lucide-vue-next'
import type { AdminUser, ApiKeyItem, ModelItem, NavGroup, ProviderItem, RouteItem, TaskItem } from './types'
export const userNavigation: NavGroup[] = [
{
label: '工作台',
items: [
{ id: 'overview', label: '总览', icon: LayoutDashboard },
{ id: 'models', label: '模型广场', icon: Blocks },
{ id: 'playground', label: '在线调试', icon: Sparkles },
],
},
{
label: '开发者',
items: [
{ id: 'keys', label: 'API Keys', icon: KeyRound },
{ id: 'tasks', label: '任务中心', icon: FileClock, badge: '2' },
{ id: 'usage', label: '用量与额度', icon: BarChart3 },
{ id: 'docs', label: '接入文档', icon: FileText },
],
},
]
export const adminNavigation: NavGroup[] = [
{
label: '平台概览',
items: [{ id: 'admin-overview', label: '管理总览', icon: LayoutDashboard }],
},
{
label: '资源运营',
items: [
{ id: 'admin-users', label: '用户与额度', icon: Users },
{ id: 'admin-models', label: '模型与供应商', icon: Boxes },
{ id: 'admin-routing', label: '渠道与路由', icon: Network },
{ id: 'admin-capacity', label: '并发与队列', icon: Gauge, badge: '3' },
{ id: 'admin-billing', label: '计费配置', icon: CircleDollarSign },
],
},
{
label: '平台治理',
items: [
{ id: 'admin-audit', label: '日志与审计', icon: ShieldCheck },
{ id: 'admin-settings', label: '平台设置', icon: Settings2 },
],
},
]
export const models: ModelItem[] = [
{ id: 'moyi-text-pro', name: 'MOYI Text Pro', provider: '供应商 A', type: '文本', mode: '流式', description: '面向复杂推理、代码生成与长文本分析的通用模型。', latency: '0.8s', specification: '128K 上下文', availability: '99.98%', accent: 'violet', icon: MessageSquareText },
{ id: 'moyi-vision', name: 'MOYI Vision', provider: '供应商 A', type: '多模态', mode: '同步', description: '理解图片、文档和界面内容,支持视觉问答。', latency: '1.2s', specification: '图文输入', availability: '99.95%', accent: 'cyan', icon: Image },
{ id: 'aisoulmate-3d', name: 'AI SoulMate 3D', provider: '模灵科技', type: '3D', mode: '异步', description: '从文字或图片生成可下载的 3D 资产。', latency: '2–5 min', specification: 'GLB / OBJ', availability: '99.90%', accent: 'orange', icon: Box },
{ id: 'moyi-image', name: 'MOYI Image', provider: '供应商 B', type: '图像', mode: '异步', description: '面向创意生产的高质量图像生成模型。', latency: '8s', specification: '最高 2K', availability: '99.92%', accent: 'pink', icon: Sparkles },
{ id: 'moyi-video', name: 'MOYI Motion', provider: '供应商 B', type: '视频', mode: '异步', description: '将文字或首帧转化为短视频片段。', latency: '1–3 min', specification: '720p / 5s', availability: '98.76%', accent: 'blue', icon: Video },
{ id: 'moyi-audio', name: 'MOYI Audio', provider: '供应商 C', type: '音频', mode: '同步', description: '语音转写、摘要与音频内容理解。', latency: '1.4s', specification: '60 min / file', availability: '99.94%', accent: 'green', icon: Mic2 },
]
export const initialKeys: ApiKeyItem[] = [
{ id: 1, name: 'AI SoulMate 生产环境', value: 'sk-moyi-••••••••8H2K', scope: '全部模型', createdAt: '2026-08-14', lastUsed: '刚刚', status: '正常' },
{ id: 2, name: '本地开发调试', value: 'sk-moyi-••••••••Q7P1', scope: '文本 / 多模态', createdAt: '2026-08-06', lastUsed: '2 小时前', status: '正常' },
{ id: 3, name: '旧版演示环境', value: 'sk-moyi-••••••••M4D9', scope: '全部模型', createdAt: '2026-07-29', lastUsed: '12 天前', status: '已停用' },
]
export const initialTasks: TaskItem[] = [
{ id: 'task_9f3a82', name: '文字生成 3D', model: 'AI SoulMate 3D', status: '执行中', progress: 72, createdAt: '今天 14:32', duration: '01:48', result: '预计还需约 45 秒' },
{ id: 'task_9f3a71', name: '产品概念图', model: 'MOYI Image', status: '排队中', progress: 18, createdAt: '今天 14:28', duration: '00:32', result: '前方还有 2 个任务' },
{ id: 'task_9f39b8', name: '图片生成 3D', model: 'AI SoulMate 3D', status: '已完成', progress: 100, createdAt: '今天 13:56', duration: '02:16', result: 'asset_3d_0826.glb' },
{ id: 'task_9f37a2', name: '文字生成视频', model: 'MOYI Motion', status: '失败', progress: 46, createdAt: '今天 11:20', duration: '00:58', result: '上游容量暂时不足' },
]
export const initialUsers: AdminUser[] = [
{ id: 'usr_1024', name: '林默', email: 'linmo@moling.tech', role: '平台管理员', balance: 286.4, usage: '¥ 42.80', lastActive: '刚刚', status: '正常' },
{ id: 'usr_1023', name: 'AI SoulMate 服务', email: 'service@aisoulmate.cn', role: '模型运营', balance: 1200, usage: '¥ 386.20', lastActive: '3 分钟前', status: '正常' },
{ id: 'usr_1022', name: '陈屿', email: 'chenyu@example.com', role: '普通用户', balance: 68.2, usage: '¥ 18.60', lastActive: '2 小时前', status: '正常' },
{ id: 'usr_1021', name: '周青', email: 'zhouqing@example.com', role: '普通用户', balance: 0, usage: '¥ 0.00', lastActive: '尚未登录', status: '待激活' },
{ id: 'usr_1018', name: '测试账号 03', email: 'test03@example.com', role: '普通用户', balance: 4.8, usage: '¥ 9.40', lastActive: '12 天前', status: '已停用' },
]
export const initialProviders: ProviderItem[] = [
{ id: 'provider-moyi', name: '模灵科技模型服务', capability: '3D / 自有模型', models: 3, latency: '820 ms', successRate: '99.98%', status: '健康', enabled: true },
{ id: 'provider-a', name: '供应商 A', capability: '文本 / 多模态', models: 8, latency: '1.18 s', successRate: '99.95%', status: '健康', enabled: true },
{ id: 'provider-b', name: '供应商 B', capability: '图像 / 视频', models: 5, latency: '8.4 s', successRate: '98.76%', status: '波动', enabled: true },
{ id: 'provider-c', name: '供应商 C', capability: '备用渠道', models: 4, latency: '—', successRate: '—', status: '维护中', enabled: false },
]
export const initialRoutes: RouteItem[] = [
{ id: 'route-text', model: 'MOYI Text Pro', capability: '文本 / 流式', primary: '供应商 A · cn-01', fallback: '供应商 C · backup', policy: '加权优先', health: '99.98%', enabled: true },
{ id: 'route-vision', model: 'MOYI Vision', capability: '视觉 / 同步', primary: '供应商 A · vision', fallback: '模灵科技模型服务', policy: '低延迟优先', health: '99.95%', enabled: true },
{ id: 'route-3d', model: 'AI SoulMate 3D', capability: '3D / 异步', primary: '模灵科技模型服务', fallback: '无备用渠道', policy: '固定渠道', health: '99.90%', enabled: true },
{ id: 'route-video', model: 'MOYI Motion', capability: '视频 / 异步', primary: '供应商 B · video', fallback: '无备用渠道', policy: '容量优先', health: '98.76%', enabled: true },
]
export const metricIcons = { Activity, Bot, SlidersHorizontal }
+155 -349
View File
@@ -1,360 +1,166 @@
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');
:root {
--ink: #162033;
--ink-soft: #56637a;
--ink-faint: #8f9bad;
--line: #e7ebf2;
--line-strong: #d8dfeb;
--surface: #ffffff;
--surface-soft: #f7f9fc;
--navy: #0b1220;
--navy-2: #111b2f;
--violet: #7357f2;
--violet-light: #eeeaff;
--cyan: #15a9c5;
--cyan-light: #e6f9fb;
--orange: #f39a4e;
--orange-light: #fff1e4;
--green: #26a675;
--green-light: #e9f8f1;
--red: #dc6772;
--shadow-sm: 0 4px 14px rgba(31, 45, 70, 0.05);
--shadow-md: 0 18px 45px rgba(30, 43, 68, 0.1);
--shadow-lg: 0 26px 65px rgba(15, 27, 49, 0.16);
}
:root { --sidebar:#111827;--canvas:#f5f7fb;--surface:#fff;--soft:#f8fafc;--text:#172033;--text-soft:#536078;--muted:#8792a5;--border:#e4e8ef;--primary:#6848e8;--primary-soft:#f0edff;--cyan:#2b9ba7;--cyan-soft:#e9f8f8;--green:#209b6e;--green-soft:#e9f8f2;--orange:#d17a2f;--orange-soft:#fff3e6;--red:#d24b5f;--red-soft:#fff0f2;--shadow:0 1px 3px rgba(20,30,50,.04);--sidebar-width:256px;--topbar-height:68px; }
*{box-sizing:border-box}html,body,#app{min-height:100%}body{margin:0;color:var(--text);font-family:Manrope,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--canvas);-webkit-font-smoothing:antialiased}button,input,textarea{color:inherit;font:inherit}button{border:0;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}input,textarea{outline:none}code,kbd,.mono{font-family:"DM Mono",Consolas,monospace}
.app{min-height:100vh}.sidebar{width:var(--sidebar-width);display:flex;flex-direction:column;padding:20px 16px 16px;color:#b8c2d3;background:var(--sidebar);position:fixed;inset:0 auto 0 0;z-index:40;transition:width .22s ease,transform .22s ease}.workspace{min-height:100vh;margin-left:var(--sidebar-width);transition:margin-left .22s ease}.sidebar-collapsed .sidebar{width:76px;padding-inline:12px}.sidebar-collapsed .workspace{margin-left:76px}.sidebar-brand{height:42px;display:flex;align-items:center;gap:11px;padding:0 7px}.brand-mark{width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;border-radius:10px;color:#fff;font-size:17px;font-weight:800;background:linear-gradient(140deg,#977fff,#6042d8);box-shadow:0 8px 22px rgba(105,74,230,.32);position:relative}.brand-mark span{width:7px;height:7px;border:1.5px solid #fff;border-radius:50%;position:absolute;top:5px;right:5px}.brand-name{min-width:0;display:flex;flex-direction:column;gap:2px;white-space:nowrap}.brand-name strong{color:#fff;font-size:15px}.brand-name span{color:#738099;font-family:"DM Mono",monospace;font-size:8px;letter-spacing:.08em}.context-card{min-height:58px;display:flex;align-items:center;gap:10px;padding:9px;margin:22px 0 18px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(255,255,255,.035)}.context-avatar{width:31px;height:31px;display:grid;place-items:center;flex:0 0 31px;border-radius:8px;color:#4f3daa;font-size:12px;font-weight:800;background:#c7bcff}.context-card>div:last-child{min-width:0;display:flex;flex-direction:column;gap:2px}.context-card strong{overflow:hidden;color:#f1f4fa;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.context-card span{color:#7e8a9f;font-size:9px}.navigation{flex:1;overflow-y:auto;scrollbar-width:none}.nav-group{margin-bottom:20px}.nav-group>p{margin:0 10px 7px;color:#647087;font-size:9px;font-weight:700;letter-spacing:.12em}.nav-link{width:100%;min-height:40px;display:flex;align-items:center;gap:12px;padding:0 11px;margin:2px 0;border-radius:8px;color:#929db1;text-align:left;background:transparent;transition:.16s ease}.nav-link:hover{color:#fff;background:rgba(255,255,255,.055)}.nav-link.active{color:#fff;background:linear-gradient(90deg,rgba(112,79,236,.27),rgba(112,79,236,.1));box-shadow:inset 2px 0 0 #9c89fa}.nav-link span{flex:1;font-size:12px;font-weight:600;white-space:nowrap}.nav-link em{min-width:20px;height:20px;display:grid;place-items:center;border-radius:6px;color:#c5baff;font-size:9px;font-style:normal;background:rgba(120,92,231,.2)}.sidebar-footer{padding-top:10px}.balance-card{padding:13px;margin-bottom:10px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:linear-gradient(145deg,rgba(108,79,221,.2),rgba(255,255,255,.025))}.balance-card>span{color:#8e9ab0;font-size:9px}.balance-card strong{display:block;margin:5px 0 10px;color:#fff;font-size:18px}.balance-card>div{height:4px;overflow:hidden;border-radius:5px;background:rgba(255,255,255,.1)}.balance-card i{width:68%;height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,#8c76f5,#71d1db)}.balance-card small{display:block;margin-top:7px;color:#8491a7;font-size:8px}.security-card{display:flex;align-items:center;gap:8px;padding:12px;margin-bottom:10px;border:1px solid rgba(255,255,255,.08);border-radius:9px;color:#9e93ed;font-size:9px;line-height:1.5;background:rgba(255,255,255,.035)}.collapse-control{width:100%;min-height:37px;display:flex;align-items:center;gap:12px;padding:0 11px;color:#66738a;text-align:left;background:transparent}.collapse-control span{font-size:10px;white-space:nowrap}.sidebar-collapsed .brand-name,.sidebar-collapsed .context-card>div:last-child,.sidebar-collapsed .nav-group>p,.sidebar-collapsed .nav-link span,.sidebar-collapsed .nav-link em,.sidebar-collapsed .balance-card,.sidebar-collapsed .security-card,.sidebar-collapsed .collapse-control span{display:none}.sidebar-collapsed .context-card{justify-content:center;padding:7px}
.topbar{height:var(--topbar-height);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,3vw,40px);border-bottom:1px solid var(--border);background:rgba(255,255,255,.9);backdrop-filter:blur(14px);position:sticky;top:0;z-index:30}.topbar-left,.topbar-actions,.breadcrumb{display:flex;align-items:center}.breadcrumb{gap:8px;color:var(--muted);font-size:12px}.breadcrumb strong{color:var(--text)}.topbar-actions{gap:10px}.global-search{width:245px;height:36px;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--border);border-radius:8px;color:var(--muted);background:var(--soft)}.global-search span{flex:1;text-align:left;font-size:10px}.global-search kbd{padding:2px 5px;border:1px solid var(--border);border-radius:4px;font-size:8px;background:#fff}.portal-switch{height:36px;display:inline-flex;align-items:center;gap:7px;padding:0 11px;border:1px solid #d9d2fb;border-radius:8px;color:#5c47ba;font-size:10px;font-weight:700;background:#f7f5ff}.admin-mode .portal-switch{border-color:#cfe6e3;color:#247f74;background:#f2faf8}.icon-button{width:34px;height:34px;display:inline-grid;place-items:center;flex:0 0 34px;padding:0;border:1px solid transparent;border-radius:8px;color:var(--text-soft);background:transparent}.icon-button:hover{border-color:var(--border);background:var(--soft)}.user-menu{height:38px;display:flex;align-items:center;gap:8px;padding:0 0 0 10px;border-left:1px solid var(--border);background:transparent}.user-menu>span{width:31px;height:31px;display:grid;place-items:center;border-radius:50%;color:#fff;font-size:11px;font-weight:700;background:linear-gradient(145deg,#8874ee,#4c3da4)}.user-menu>div{display:flex;flex-direction:column;align-items:flex-start;gap:1px}.user-menu strong{font-size:10px}.user-menu small{color:var(--muted);font-size:8px}.content{width:min(100%,1480px);padding:32px clamp(20px,3vw,40px) 64px;margin:0 auto}.page-stack{display:flex;flex-direction:column;gap:16px}
.page-heading{min-height:78px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding-bottom:6px}.page-heading.compact{align-items:center}.page-heading>div:first-child>span,.panel-header>div>span,.section-title span,.eyebrow,.routing-hero small,.capacity-main small{display:block;color:var(--muted);font-family:"DM Mono",monospace;font-size:9px;font-weight:500;letter-spacing:.1em}.page-heading h1{margin:7px 0 6px;font-size:clamp(26px,3vw,34px);letter-spacing:-.045em;line-height:1.1}.page-heading p{margin:0;color:var(--text-soft);font-size:12px}.heading-actions{display:flex;align-items:center;gap:9px}.health-badge,.admin-badge{min-height:34px;display:inline-flex;align-items:center;gap:7px;padding:0 10px;border:1px solid #cfe7de;border-radius:8px;color:var(--green);font-size:9px;font-weight:700;background:#f3fbf8}.health-badge i{width:6px;height:6px;border-radius:50%;background:var(--green);box-shadow:0 0 0 3px rgba(32,155,110,.12)}.admin-badge{border-color:#ded8ff;color:#654bc9;background:#f7f5ff}.button{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 14px;border:1px solid transparent;border-radius:8px;font-size:10px;font-weight:700;white-space:nowrap;transition:.16s ease}.button.primary{color:#fff;background:linear-gradient(135deg,var(--primary),#5637ce);box-shadow:0 6px 16px rgba(100,70,220,.18)}.button.primary:hover{transform:translateY(-1px);box-shadow:0 9px 22px rgba(100,70,220,.26)}.button.secondary{border-color:#d7dde7;background:#fff}.button.secondary:hover{border-color:#bbb1f2;color:var(--primary)}.button.light{color:#4b37ae;background:#fff}.button.glass{border-color:rgba(255,255,255,.16);color:#e9e5ff;background:rgba(255,255,255,.07)}.button.disabled{color:#8c95a4;background:#eef1f5}.button.full{width:100%}.button.small{min-height:34px}.text-link{display:inline-flex;align-items:center;gap:5px;padding:0;color:var(--primary);font-size:10px;font-weight:700;background:transparent}.select-button{min-height:34px;display:inline-flex;align-items:center;gap:6px;padding:0 10px;border:1px solid var(--border);border-radius:7px;color:var(--text-soft);font-size:9px;background:#fff}
.connection-strip{min-height:64px;display:flex;align-items:center;gap:16px;padding:11px 14px;border:1px solid var(--border);border-radius:11px;background:#fff;box-shadow:var(--shadow)}.connection-main{min-width:270px;display:flex;align-items:center;gap:10px}.connection-main>div{display:flex;flex-direction:column;gap:3px}.connection-main small{color:var(--muted);font-size:8px}.connection-main strong{font-family:"DM Mono",monospace;font-size:10px}.connection-tags{flex:1;display:flex;justify-content:flex-end;gap:6px}.connection-tags span{display:inline-flex;align-items:center;gap:5px;padding:5px 7px;border-radius:5px;color:var(--text-soft);font-size:8px;background:var(--soft)}.connection-tags i,.availability i{width:5px;height:5px;border-radius:50%;background:var(--green)}.welcome-panel{min-height:330px;display:grid;grid-template-columns:1.05fr .95fr;overflow:hidden;border-radius:16px;color:#fff;background:linear-gradient(115deg,#171d38,#292553 66%,#25334f);position:relative}.welcome-panel:before{content:'';width:500px;height:500px;border:1px solid rgba(173,161,255,.12);border-radius:50%;position:absolute;right:-220px;top:-260px}.welcome-copy{display:flex;justify-content:center;flex-direction:column;padding:42px;position:relative;z-index:2}.welcome-copy>span{display:inline-flex;align-items:center;gap:6px;color:#aa9cf6;font-family:"DM Mono",monospace;font-size:9px;letter-spacing:.08em}.welcome-copy h2{margin:16px 0 14px;font-size:clamp(38px,4.5vw,57px);letter-spacing:-.065em;line-height:1.03}.welcome-copy h2 em{color:#a797ff;font-style:normal}.welcome-copy p{max-width:500px;margin:0 0 25px;color:#aab4ce;font-size:12px;line-height:1.75}.welcome-copy>div{display:flex;gap:9px}.welcome-visual{min-height:330px;position:relative}.visual-core{width:82px;height:82px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.25);border-radius:26px;color:#fff;font-size:30px;font-weight:800;background:linear-gradient(145deg,#8b76f0,#563dc1);box-shadow:0 24px 55px rgba(36,25,88,.5);position:absolute;left:50%;top:50%;z-index:2;transform:translate(-50%,-50%)}.orbit{border:1px solid rgba(166,151,255,.22);border-radius:50%;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.orbit-one{width:210px;height:210px}.orbit-two{width:315px;height:315px;border-style:dashed}.visual-chip{display:inline-flex;align-items:center;gap:7px;padding:9px 11px;border:1px solid rgba(255,255,255,.12);border-radius:9px;color:#d8dcf0;font-size:9px;background:rgba(255,255,255,.07);backdrop-filter:blur(9px);position:absolute;z-index:3}.chip-one{left:8%;top:20%}.chip-two{right:9%;top:33%}.chip-three{left:20%;bottom:15%}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.metric-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.metric-card{min-width:0;min-height:104px;display:flex;align-items:center;gap:12px;padding:17px;border:1px solid var(--border);border-radius:11px;background:#fff;box-shadow:var(--shadow)}.metric-card>div{min-width:0;display:flex;flex-direction:column;gap:4px}.metric-card small{color:var(--muted);font-size:9px}.metric-card strong{overflow:hidden;font-size:clamp(17px,2vw,22px);letter-spacing:-.045em;text-overflow:ellipsis;white-space:nowrap}.metric-card em{display:inline-flex;align-items:center;gap:4px;color:var(--muted);font-size:8px;font-style:normal}.positive{color:var(--green)!important}.icon-tile{width:38px;height:38px;display:grid;place-items:center;flex:0 0 38px;border-radius:10px}.icon-tile.violet{color:var(--primary);background:var(--primary-soft)}.icon-tile.cyan{color:var(--cyan);background:var(--cyan-soft)}.icon-tile.orange{color:var(--orange);background:var(--orange-soft)}.icon-tile.green{color:var(--green);background:var(--green-soft)}.icon-tile.light{color:#c5b9ff;background:rgba(255,255,255,.08)}.panel{min-width:0;border:1px solid var(--border);border-radius:11px;background:#fff;box-shadow:var(--shadow)}.two-column{display:grid;gap:13px}.two-column.wide-left{grid-template-columns:minmax(0,1.45fr) minmax(300px,.75fr)}.two-column.equal{grid-template-columns:repeat(2,minmax(0,1fr))}.two-column.narrow-left{grid-template-columns:minmax(280px,.7fr) minmax(0,1.3fr)}.chart-panel,.activity-panel,.health-panel,.quick-credit,.ledger{padding:20px}.panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.panel-header h3{margin:5px 0 0;font-size:14px;letter-spacing:-.025em}.panel-header>small{color:var(--muted);font-size:9px}.chart-summary{display:flex;align-items:center;gap:9px;margin:19px 0 4px}.chart-summary strong{font-size:24px;letter-spacing:-.05em}.chart-summary span{padding:4px 6px;border-radius:5px;font-size:8px;background:var(--green-soft)}.bar-chart{height:150px;display:flex;align-items:flex-end;gap:clamp(8px,1.4vw,15px);padding:14px 6px 0}.bar-chart.large{height:235px;padding-top:30px}.bar-chart>div{height:100%;display:flex;align-items:center;justify-content:flex-end;flex:1;flex-direction:column;gap:7px}.bar-chart i{width:100%;max-width:44px;display:block;border-radius:5px 5px 2px 2px;background:linear-gradient(180deg,#8069ed,#b8adf7)}.bar-chart span{color:var(--muted);font-size:8px}.activity-list{margin-top:13px}.activity-list>div{min-height:59px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #f0f2f6}.activity-list>div:last-child{border:0}.activity-dot{width:29px;height:29px;display:grid;place-items:center;flex:0 0 29px;border-radius:8px}.activity-dot.green{color:var(--green);background:var(--green-soft)}.activity-dot.violet{color:var(--primary);background:var(--primary-soft)}.activity-dot.orange{color:var(--orange);background:var(--orange-soft)}.activity-dot.cyan{color:var(--cyan);background:var(--cyan-soft)}.activity-list p{min-width:0;display:flex;flex:1;flex-direction:column;gap:3px;margin:0}.activity-list strong{overflow:hidden;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.activity-list small,.activity-list time{color:var(--muted);font-size:8px}.section-title{display:flex;align-items:flex-end;justify-content:space-between;padding-top:12px}.section-title h2{margin:5px 0 0;font-size:17px}
.model-grid{display:grid;gap:13px}.model-grid.featured,.model-grid.catalog{grid-template-columns:repeat(3,minmax(0,1fr))}.model-card{min-width:0;min-height:220px;display:flex;flex-direction:column;padding:18px;border:1px solid var(--border);border-radius:11px;background:#fff;box-shadow:var(--shadow);cursor:pointer;transition:.18s ease}.model-card:hover{border-color:#c9c0f5;box-shadow:0 12px 28px rgba(51,38,120,.08);transform:translateY(-2px)}.model-card-top,.model-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.model-icon{width:42px;height:42px;display:grid;place-items:center;flex:0 0 42px;border-radius:11px;color:var(--primary);background:var(--primary-soft)}.model-icon.cyan{color:var(--cyan);background:var(--cyan-soft)}.model-icon.orange{color:var(--orange);background:var(--orange-soft)}.model-icon.pink{color:#cb6d92;background:#ffedf4}.model-icon.blue{color:#5684d4;background:#edf3ff}.model-icon.green{color:var(--green);background:var(--green-soft)}.availability{display:inline-flex;align-items:center;gap:5px;color:#61957f;font-family:"DM Mono",monospace;font-size:8px}.model-card h3{margin:17px 0 7px;font-size:14px}.model-card p{min-height:40px;margin:0;color:var(--text-soft);font-size:10px;line-height:1.7}.model-card footer{display:flex;align-items:center;justify-content:space-between;padding-top:14px;margin-top:auto;border-top:1px solid #f0f2f6;color:var(--muted);font-size:9px}.filter-bar{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:#fff}.tabs{display:flex;align-items:center;gap:3px}.tabs button{min-height:32px;padding:0 11px;border-radius:7px;color:var(--text-soft);font-size:9px;background:transparent}.tabs button:hover,.tabs button.active{color:var(--primary);background:var(--primary-soft)}.tabs button.active{font-weight:700}.tabs.compact button{min-height:29px;padding-inline:8px;font-size:8px}.search-input{width:240px;height:36px;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--border);border-radius:8px;color:var(--muted);background:var(--soft)}.search-input:focus-within{border-color:#bdb2f2;box-shadow:0 0 0 3px rgba(104,72,232,.07)}.search-input input{min-width:0;width:100%;border:0;font-size:10px;background:transparent}.catalog-card{min-height:286px}.model-title{margin-top:17px}.model-title h3{margin:0}.model-title>span{padding:4px 6px;border-radius:5px;color:var(--primary);font-size:8px;background:var(--primary-soft)}.provider{margin-top:5px;color:var(--muted);font-size:8px}.model-specs{display:flex;flex-wrap:wrap;gap:10px;padding:12px 0;margin-top:12px;border-top:1px solid #f0f2f6;border-bottom:1px solid #f0f2f6}.model-specs span{display:inline-flex;align-items:center;gap:4px;color:var(--muted);font-size:8px}.mode-tag{padding:5px 7px;border-radius:5px;color:var(--green);background:var(--green-soft)}.mode-tag.async{color:var(--orange);background:var(--orange-soft)}.empty-state{min-height:280px;display:flex;align-items:center;justify-content:center;flex-direction:column;grid-column:1/-1;gap:7px;color:var(--muted)}.empty-state strong{color:var(--text-soft);font-size:12px}.empty-state span{font-size:9px}
.playground-grid{display:grid;grid-template-columns:minmax(330px,.88fr) minmax(380px,1.12fr);gap:13px}.request-panel,.response-panel{min-height:570px;display:flex;flex-direction:column;padding:20px}.form-label{display:flex;justify-content:space-between;margin:19px 0 7px;color:var(--text-soft);font-size:9px;font-weight:700}.form-label small{color:var(--muted);font-weight:400}.model-picker{width:100%;min-height:55px;display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--border);border-radius:9px;text-align:left;background:var(--soft)}.model-picker .model-icon{width:34px;height:34px;flex-basis:34px;border-radius:9px}.model-picker>div{flex:1;display:flex;flex-direction:column;gap:3px}.model-picker strong{font-size:10px}.model-picker small{color:var(--muted);font-size:8px}.segment{display:flex;padding:3px;border-radius:8px;background:#eef1f5}.segment button{min-height:32px;flex:1;border-radius:6px;color:var(--muted);font-size:9px;background:transparent}.segment button.active{color:var(--primary);font-weight:700;background:#fff;box-shadow:0 2px 5px rgba(20,30,50,.07)}.request-panel textarea{min-height:175px;resize:vertical;padding:12px;border:1px solid var(--border);border-radius:9px;font-size:11px;line-height:1.7;background:var(--soft)}.request-panel textarea:focus{border-color:#bdb2f2;box-shadow:0 0 0 3px rgba(104,72,232,.07)}.request-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:20px;margin-top:auto;color:var(--muted);font-size:8px}.request-footer>span{display:inline-flex;align-items:center;gap:5px}.spinner{width:13px;height:13px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}.response-state{display:flex;align-items:center;justify-content:center;flex:1;flex-direction:column;text-align:center}.response-state strong{margin-top:18px;font-size:13px}.response-state p{margin:7px 0 0;color:var(--muted);font-size:9px}.loading-orbit{width:66px;height:66px;display:grid;place-items:center;border:1px solid #d8d0fb;border-radius:50%;animation:spin 4s linear infinite}.loading-orbit:before{content:'';width:39px;height:39px;border:1px dashed #a5d9de;border-radius:50%}.loading-orbit i{width:7px;height:7px;border-radius:50%;background:var(--primary);position:absolute;transform:translateY(-32px)}.response-icon{width:58px;height:58px;display:grid;place-items:center;border-radius:17px;color:var(--primary);background:var(--primary-soft)}.response-result{display:flex;align-items:flex-start;justify-content:flex-start;flex:1;flex-direction:column;padding-top:25px}.response-result>div{width:100%;display:flex;align-items:center;justify-content:space-between}.response-result>div small{color:var(--muted);font-family:"DM Mono",monospace;font-size:8px}.response-result>p{max-width:700px;margin:25px 0;font-size:12px;line-height:1.9}
.notice{min-height:66px;display:flex;align-items:center;gap:11px;padding:13px 15px;border:1px solid #ded9fa;border-radius:10px;color:var(--primary);background:#faf9ff}.notice>div{flex:1}.notice strong{display:block;color:var(--text);font-size:10px}.notice p{margin:4px 0 0;color:var(--text-soft);font-size:9px;line-height:1.5}.warning-notice{border-color:#f0dcc6;color:var(--orange);background:#fffaf4}.table-card{overflow:hidden;padding:20px}.table-toolbar{align-items:center}.toolbar-controls{display:flex;align-items:center;gap:8px}.responsive-table{width:100%;overflow-x:auto;margin-top:14px}table{width:100%;min-width:760px;border-collapse:collapse;table-layout:auto}th{height:36px;color:var(--muted);font-family:"DM Mono",monospace;font-size:8px;font-weight:500;text-align:left;white-space:nowrap}td{height:64px;padding:8px 12px 8px 0;border-top:1px solid #eef1f5;color:var(--text-soft);font-size:9px;vertical-align:middle}td strong{color:var(--text);font-size:9px}tr.clickable{cursor:pointer}.clickable:hover td{background:#fbfbfe}.entity-cell{min-width:170px;display:flex;align-items:center;gap:9px}.entity-cell .icon-tile{width:32px;height:32px;flex-basis:32px;border-radius:8px}.entity-cell>div{min-width:0;display:flex;flex-direction:column;gap:3px}.entity-cell strong{overflow:hidden;max-width:210px;text-overflow:ellipsis;white-space:nowrap}.entity-cell small{color:var(--muted);font-size:8px}.code-value{display:inline-flex;align-items:center;gap:7px;padding:6px 8px;border-radius:6px;color:var(--text-soft);background:var(--soft)}.code-value code{font-size:8px}.status-chip{width:max-content;display:inline-flex;align-items:center;gap:5px;padding:5px 7px;border-radius:5px;color:var(--text-soft);font-size:8px;font-weight:700;background:#f0f2f5}.status-chip i{width:5px;height:5px;border-radius:50%;background:currentColor}.status-chip.success,.status-chip.已完成{color:var(--green);background:var(--green-soft)}.status-chip.warning,.status-chip.执行中{color:var(--orange);background:var(--orange-soft)}.status-chip.queued,.status-chip.排队中{color:#7462c2;background:var(--primary-soft)}.status-chip.muted{color:#8992a1}.status-chip.失败{color:var(--red);background:var(--red-soft)}.compact-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.compact-metrics article{min-height:80px;display:flex;align-items:center;gap:11px;padding:14px 16px;border:1px solid var(--border);border-radius:10px;color:var(--primary);background:#fff}.compact-metrics article>div{display:flex;flex-direction:column;gap:3px}.compact-metrics span{color:var(--muted);font-size:8px}.compact-metrics strong{color:var(--text);font-size:18px}.progress-cell,.table-progress{display:flex;align-items:center;gap:8px}.progress-cell>span,.table-progress>span,.drawer-progress>span{width:90px;height:5px;overflow:hidden;border-radius:5px;background:#edf0f4}.progress-cell i,.table-progress i,.drawer-progress i{height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,var(--primary),#a393f3)}.stacked-cell{display:flex;flex-direction:column;gap:3px}.stacked-cell small{color:var(--muted);font-size:8px}
.credit-hero{min-height:140px;display:flex;align-items:center;justify-content:space-between;padding:24px 28px;border-radius:13px;color:#fff;background:linear-gradient(110deg,#171d38,#292553)}.credit-hero>div:first-child{display:flex;flex-direction:column;gap:6px}.credit-hero span{color:#a8b1ca;font-size:9px}.credit-hero strong{font-size:30px;letter-spacing:-.05em}.credit-hero p{margin:0;color:#939fbc;font-size:9px}.credit-circle{width:82px;height:82px;display:flex;align-items:center;justify-content:center;flex-direction:column;border:7px solid rgba(255,255,255,.1);border-top-color:#9e8bf3;border-radius:50%}.credit-circle span{color:#fff;font-size:16px;font-weight:800}.credit-circle small{color:#9da8c4;font-size:7px}.ledger>div{margin-top:11px}.ledger p{min-height:64px;display:flex;align-items:center;gap:9px;margin:0;border-bottom:1px solid #eef1f5}.ledger p:last-child{border:0}.ledger p>span:nth-child(2){display:flex;flex:1;flex-direction:column;gap:3px}.ledger strong{font-size:9px}.ledger small{color:var(--muted);font-size:8px}.ledger b{font-family:"DM Mono",monospace;font-size:9px}.docs-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:13px;align-items:start}.docs-menu{display:flex;flex-direction:column;padding:14px 9px;position:sticky;top:88px}.docs-menu>span{padding:8px 9px 5px;color:var(--muted);font-family:"DM Mono",monospace;font-size:8px;letter-spacing:.08em}.docs-menu button{min-height:34px;padding:0 9px;border-radius:7px;color:var(--text-soft);text-align:left;font-size:9px;background:transparent}.docs-menu button.active{color:var(--primary);font-weight:700;background:var(--primary-soft)}.docs-content{max-width:900px;padding:32px}.docs-content>h2{margin:9px 0;font-size:27px;letter-spacing:-.045em}.docs-content>p{margin:0 0 24px;color:var(--text-soft);font-size:11px}.docs-content>section{display:grid;grid-template-columns:34px 1fr;gap:13px;padding:25px 0;border-top:1px solid var(--border)}.docs-content section>b{width:29px;height:29px;display:grid;place-items:center;border:1px solid #d8d0fb;border-radius:8px;color:var(--primary);font-family:"DM Mono",monospace;font-size:8px;background:var(--primary-soft)}.docs-content h3{margin:3px 0 7px;font-size:13px}.docs-content section p{margin:0 0 13px;color:var(--text-soft);font-size:10px}.docs-content pre{overflow-x:auto;padding:15px;border-radius:9px;color:#dbe2f5;font-size:9px;line-height:1.7;background:#151b2d}.docs-note{display:flex;gap:9px;padding:13px;color:var(--cyan);background:var(--cyan-soft)}.docs-note p{margin:0;color:var(--text-soft);font-size:9px;line-height:1.6}
.health-list{margin-top:12px}.health-list>div{min-height:64px;display:flex;align-items:center;gap:9px;border-bottom:1px solid #eef1f5}.health-list>div:last-child{border:0}.provider-mark{width:32px;height:32px;display:grid;place-items:center;flex:0 0 32px;border-radius:8px;color:var(--primary);font-size:11px;font-weight:800;background:var(--primary-soft)}.health-list p{min-width:0;display:flex;flex:1;flex-direction:column;gap:3px;margin:0}.health-list strong{font-size:9px}.health-list small{color:var(--muted);font-size:8px}.health-list b{color:var(--green);font-family:"DM Mono",monospace;font-size:8px}.quick-credit{display:flex;flex-direction:column}.quick-credit>p{flex:1;margin:16px 0;color:var(--text-soft);font-size:9px;line-height:1.7}.avatar-small{width:32px;height:32px;display:grid;place-items:center;flex:0 0 32px;border-radius:50%;color:#fff;font-size:10px;font-weight:700;background:linear-gradient(145deg,#8874ee,#4c3da4)}.role-tag{display:inline-block;padding:5px 7px;border-radius:5px;color:#6653b8;font-size:8px;background:var(--primary-soft)}.switch{width:36px;height:20px;padding:2px;border-radius:11px;background:#dfe4eb;transition:.18s ease}.switch span{width:16px;height:16px;display:block;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(20,30,50,.16);transition:.18s ease}.switch.active{background:var(--primary)}.switch.active span{transform:translateX(16px)}.admin-model-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.admin-model-grid article{min-height:180px;padding:17px;border:1px solid var(--border);border-radius:10px;background:#fff}.admin-model-grid article>div{display:flex;align-items:center;justify-content:space-between}.admin-model-grid h3{margin:14px 0 6px;font-size:12px}.admin-model-grid p{min-height:34px;margin:0;color:var(--text-soft);font-size:9px;line-height:1.65}.admin-model-grid footer{display:flex;gap:5px;padding-top:12px;margin-top:12px;border-top:1px solid #eef1f5}.admin-model-grid footer span{padding:4px 6px;border-radius:5px;color:var(--text-soft);font-size:8px;background:var(--soft)}.routing-hero{min-height:126px;display:flex;align-items:center;gap:16px;padding:22px;border-radius:13px;color:#fff;background:linear-gradient(110deg,#171d38,#292553)}.routing-hero>div:nth-child(2){flex:1}.routing-hero h2{margin:6px 0;font-size:17px}.routing-hero p{margin:0;color:#9ca7c2;font-size:9px}.routing-hero>div:last-child{display:flex;align-items:flex-end;flex-direction:column;gap:3px}.routing-hero>div:last-child strong{color:#aaeed9;font-size:25px}.routing-hero>div:last-child span{color:#8e9ab7;font-size:8px}.capacity-grid{display:grid;grid-template-columns:1.25fr repeat(3,minmax(0,1fr));gap:13px}.capacity-main{min-height:110px;display:flex;align-items:center;gap:14px;padding:16px;border:1px solid #dcd6fa;border-radius:11px;background:linear-gradient(145deg,#fbfaff,#f4f1ff)}.capacity-ring{width:68px;height:68px;display:flex;align-items:center;justify-content:center;flex:0 0 68px;flex-direction:column;border:7px solid #ddd7f8;border-top-color:var(--primary);border-radius:50%}.capacity-ring strong{font-size:14px}.capacity-ring span{color:var(--muted);font-size:7px}.capacity-main h2{margin:5px 0 2px;font-size:20px}.capacity-main p{margin:0;color:var(--muted);font-size:8px}.table-progress>span{width:80px}.queue-number{width:28px;height:28px;display:grid;place-items:center;border-radius:7px;font-family:"DM Mono",monospace;font-size:8px;background:#f0f2f5}.queue-number.hot{color:var(--orange);background:var(--orange-soft)}.audit-filter .search-input{flex:1}.audit-filter .tabs{margin-left:auto}.risk-tag{width:max-content;display:inline-flex;align-items:center;gap:5px;padding:5px 7px;border-radius:5px;font-size:8px;background:#f0f2f5}.risk-tag i{width:5px;height:5px;border-radius:50%;background:currentColor}.risk-tag.重要{color:var(--orange);background:var(--orange-soft)}.risk-tag.风险{color:var(--red);background:var(--red-soft)}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.settings-card{padding:20px}.settings-card>p{margin:15px 0;color:var(--text-soft);font-size:9px;line-height:1.7}.setting-list{border-top:1px solid var(--border)}.setting-list>div{min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #eef1f5}.setting-list>div>span{display:flex;flex-direction:column;gap:4px}.setting-list strong{font-size:9px}.setting-list small{color:var(--muted);font-size:8px}
.slide-overlay,.modal-overlay{background:rgba(12,18,31,.38);backdrop-filter:blur(3px);position:fixed;inset:0;z-index:70}.slide-panel{width:min(420px,100vw);display:flex;flex-direction:column;padding:24px;border-left:1px solid var(--border);background:#fff;box-shadow:-18px 0 50px rgba(20,30,50,.16);position:fixed;inset:0 0 0 auto;z-index:71;animation:slide-in .22s ease}.slide-panel>header,.modal>header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.slide-panel header span,.modal header span{color:var(--muted);font-family:"DM Mono",monospace;font-size:8px;letter-spacing:.1em}.slide-panel h2,.modal h2{margin:6px 0 0;font-size:20px;letter-spacing:-.035em}.slide-content{flex:1;overflow-y:auto;padding:20px 1px}.slide-panel>footer{display:flex;flex-direction:column;gap:8px;padding-top:15px;border-top:1px solid var(--border)}.drawer-model-head,.user-profile{display:flex;align-items:center;gap:10px}.drawer-model-head>div,.user-profile>div{display:flex;flex-direction:column;gap:4px}.drawer-model-head small,.user-profile small{color:var(--muted);font-size:8px}.drawer-model-head strong,.user-profile strong{font-size:10px}.drawer-description{margin:18px 0;color:var(--text-soft);font-size:10px;line-height:1.8}.detail-health,.task-drawer-status{display:flex;align-items:center;justify-content:space-between;padding:13px;border-radius:8px;background:var(--green-soft)}.detail-health>strong{color:var(--green);font-size:17px}.detail-list{margin:18px 0;border-top:1px solid var(--border)}.detail-list>div{min-height:50px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #eef1f5}.detail-list dt{color:var(--muted);font-size:9px}.detail-list dd{display:flex;align-items:center;gap:6px;margin:0;font-size:9px;text-align:right}.detail-list code{font-size:8px}.drawer-note{display:flex;gap:8px;padding:11px;border-radius:8px;color:var(--text-soft);font-size:9px;line-height:1.6;background:var(--soft)}.drawer-note svg{flex:0 0 16px;color:var(--cyan)}.drawer-progress{padding:18px 0}.drawer-progress>span{width:100%;display:block}.drawer-progress small{display:block;margin-top:8px;color:var(--muted);font-size:8px}.avatar-large{width:48px;height:48px;display:grid;place-items:center;flex:0 0 48px;border-radius:50%;color:#fff;font-size:16px;font-weight:800;background:linear-gradient(145deg,#8874ee,#4c3da4)}.modal-overlay{display:grid;place-items:center;padding:18px;z-index:80}.modal{width:min(440px,100%);max-height:calc(100vh - 36px);overflow-y:auto;padding:24px;border:1px solid rgba(255,255,255,.6);border-radius:14px;background:#fff;box-shadow:0 14px 35px rgba(20,30,50,.12);animation:modal-in .2s ease}.modal-body{padding-top:12px}.modal>footer{display:flex;justify-content:flex-end;gap:8px;padding-top:18px;margin-top:18px;border-top:1px solid var(--border)}.modal-description{margin:0 0 18px;color:var(--text-soft);font-size:9px;line-height:1.7}.modal-description.centered{text-align:center}.text-input,.input-with-prefix{width:100%;height:40px;padding:0 11px;border:1px solid var(--border);border-radius:8px;font-size:10px;background:var(--soft)}.text-input:focus,.input-with-prefix:focus-within{border-color:#bdb2f2;box-shadow:0 0 0 3px rgba(104,72,232,.07)}.option-list{display:flex;flex-direction:column;gap:7px}.option-list button{min-height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 11px;border:1px solid var(--border);border-radius:8px;background:#fff}.option-list button.active{border-color:#c8bff4;color:var(--primary);background:#faf9ff}.option-list button>span{display:flex;align-items:center;gap:9px}.option-list button i{width:12px;height:12px;border:1px solid #d7dde7;border-radius:50%}.option-list button.active i{border:3px solid var(--primary)}.option-list strong{font-size:9px}.secret-success{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px;color:var(--green)}.secret-success strong{font-size:10px}.secret-box{display:flex;align-items:center;gap:7px;padding:10px;border:1px dashed #c8bff4;border-radius:8px;color:var(--primary);background:#faf9ff}.secret-box code{overflow:hidden;flex:1;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.secret-box button{display:grid;padding:2px;color:var(--primary);background:transparent}.input-with-prefix{display:flex;align-items:center;gap:8px;color:var(--muted)}.input-with-prefix input{min-width:0;flex:1;border:0;background:transparent}.input-with-prefix span{font-size:9px}.toast{max-width:calc(100vw - 32px);display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid #d5eade;border-radius:9px;color:var(--green);box-shadow:0 14px 35px rgba(20,30,50,.12);font-size:9px;font-weight:700;background:#f4fbf8;position:fixed;right:24px;bottom:22px;z-index:100}.toast span{flex:1}.toast button{display:grid;padding:0;color:#6b8f80;background:transparent}.toast-enter-active,.toast-leave-active{transition:.2s ease}.toast-enter-from,.toast-leave-to{opacity:0;transform:translateLine truncated
@keyframes spin{to{transform:rotate(360deg)}}@keyframes slide-in{from{transform:translateX(100%)}}@keyframes modal-in{from{opacity:0;transform:translateY(8px) scale(.98)}}
@media(max-width:1180px){.global-search{width:190px}.connection-tags span:nth-child(-n+2){display:none}.metric-grid,.capacity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.model-grid.catalog,.admin-model-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar-controls{align-items:flex-end;flex-direction:column}}
@media(max-width:900px){.sidebar{transform:translateX(-100%)}.sidebar.mobile-open{width:min(280px,86vw);transform:translateX(0)}.workspace,.sidebar-collapsed .workspace{margin-left:0}.sidebar-collapsed .sidebar.mobile-open .brand-name,.sidebar-collapsed .sidebar.mobile-open .context-card>div:last-child,.sidebar-collapsed .sidebar.mobile-open .nav-group>p,.sidebar-collapsed .sidebar.mobile-open .nav-link span,.sidebar-collapsed .sidebar.mobile-open .nav-link em,.sidebar-collapsed .sidebar.mobile-open .security-card{display:flex}.sidebar-collapsed .sidebar.mobile-open .balance-card{display:block}.mobile-overlay{background:rgba(12,18,31,.38);position:fixed;inset:0;z-index:39}.mobile-only{display:inline-grid}.desktop-only{display:none!important}.topbar{padding-inline:18px}.topbar-left{gap:5px}.portal-switch span,.user-menu>div{display:none}.portal-switch{width:36px;justify-content:center;padding:0}.content{padding:24px 18px 50px}.welcome-panel{grid-template-columns:1fr}.welcome-visual{min-height:220px;opacity:.78}.welcome-copy{padding:32px 28px 8px}.two-column.wide-left,.two-column.equal,.two-column.narrow-left,.playground-grid,.settings-grid{grid-template-columns:1fr}.model-grid.featured{grid-template-columns:repeat(2,minmax(0,1fr))}.docs-layout{grid-template-columns:1fr}.docs-menu{display:none}.filter-bar{align-items:stretch;flex-direction:column}.filter-bar .tabs{overflow-x:auto}.filter-bar .search-input{width:100%}.audit-filter .tabs{margin-left:0}.table-toolbar{align-items:flex-start;flex-direction:column}.toolbar-controls{width:100%;align-items:stretch}.toolbar-controls .search-input{width:100%}}
@media(max-width:600px){.topbar{height:60px}.breadcrumb>span,.breadcrumb svg{display:none}.user-menu{padding-left:5px;border:0}.content{padding:18px 14px 42px}.page-stack{gap:12px}.page-heading,.page-heading.compact{min-height:0;align-items:flex-start;flex-direction:column;padding:6px 0}.page-heading h1{font-size:27px}.heading-actions{width:100%}.heading-actions .button{flex:1}.connection-strip{align-items:stretch;flex-direction:column}.connection-main{min-width:0}.connection-tags{display:none}.welcome-panel{min-height:500px}.welcome-copy{padding:28px 22px 0}.welcome-copy h2{font-size:41px}.welcome-copy>div{align-items:stretch;flex-direction:column}.welcome-visual{min-height:250px}.metric-grid,.metric-grid.three,.capacity-grid,.compact-metrics{grid-template-columns:1fr}.metric-card{min-height:92px}.model-grid.featured,.model-grid.catalog,.admin-model-grid{grid-template-columns:1fr}.tabs.compact{width:100%;overflow-x:auto}.request-panel,.response-panel{min-height:520px;padding:16px}.request-footer{align-items:stretch;flex-direction:column}.request-footer .button{width:100%}.credit-hero{align-items:flex-start;flex-direction:column;gap:20px;padding:22px}.docs-content{padding:20px 16px}.docs-content>section{grid-template-columns:1fr}.routing-hero{align-items:flex-start;flex-wrap:wrap}.routing-hero>div:last-child{align-items:flex-start;width:100%}.filter-bar.audit-filter .tabs{width:100%}.slide-panel{width:100%;padding:20px}.modal{padding:20px}.modal>footer{flex-direction:column-reverse}.modal>footer .button{width:100%}.toast{right:14px;bottom:14px}}
* { box-sizing: border-box; }
:root{--sidebar:#071426;--canvas:#f4f7fb;--primary:#5b43d6;--primary-soft:#f0edff;--cyan:#16b9d5;--cyan-soft:#e8faff;--brand-cyan:#19d8ed;--brand-blue:#2388d5;--brand-purple:#7045d6}
.brand-mark{overflow:hidden;border-radius:11px;background:linear-gradient(145deg,#10385d,#161c51);box-shadow:0 8px 22px rgba(25,216,237,.18)}.brand-mark img{width:43px;height:43px;object-fit:contain;filter:drop-shadow(0 0 5px rgba(25,216,237,.35))}.context-avatar{overflow:hidden;border:1px solid rgba(46,210,235,.38);background:#0d2946}.context-avatar img{width:37px;height:37px;object-fit:contain}.nav-link.active{background:linear-gradient(90deg,rgba(21,185,213,.2),rgba(103,67,210,.22));box-shadow:inset 2px 0 0 var(--brand-cyan)}.nav-link em{color:#a8f5ff;background:rgba(26,198,221,.15)}.balance-card{background:linear-gradient(145deg,rgba(15,151,190,.2),rgba(104,67,210,.18))}.balance-card i{background:linear-gradient(90deg,var(--brand-cyan),#7d67e8)}.portal-switch{border-color:#c9ddf2;color:#256aae;background:#f1f8ff}.button.primary{background:linear-gradient(135deg,#1abdd4,#6344d5);box-shadow:0 6px 16px rgba(37,141,207,.2)}.button.primary:hover{box-shadow:0 9px 22px rgba(70,67,204,.3)}.button.secondary:hover{border-color:#8adbe7;color:#1388a8}.welcome-panel{background:linear-gradient(115deg,#071a31 4%,#0c2e50 52%,#291b65 100%)}.welcome-panel:after{content:'';width:480px;height:480px;border-radius:50%;background:radial-gradient(circle,rgba(27,213,238,.2),transparent 66%);position:absolute;right:-90px;bottom:-270px}.welcome-copy>span{color:#82eef8}.welcome-copy h2 em{color:#61e6f2}.welcome-visual{isolation:isolate}.welcome-visual:before{content:'';width:360px;height:360px;border-radius:50%;background:radial-gradient(circle,rgba(42,218,239,.18),rgba(95,66,210,.13) 48%,transparent 70%);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:-1}.visual-core{width:120px;height:120px;border:1px solid rgba(130,245,255,.45);border-radius:34px;background:rgba(2,20,39,.5);box-shadow:0 0 0 10px rgba(26,216,237,.06),0 24px 55px rgba(16,12,72,.62);backdrop-filter:blur(8px)}.visual-core img{width:102px;height:102px;object-fit:contain;filter:drop-shadow(0 0 12px rgba(24,218,241,.45))}.orbit{border-color:rgba(91,224,239,.24)}.orbit-two{border-color:rgba(136,117,232,.25)}.visual-chip{border-color:rgba(92,225,239,.2);color:#d9f9ff;background:rgba(6,33,58,.56)}.icon-tile.cyan{color:#129fbc;background:var(--cyan-soft)}
.account-menu-wrap{position:relative}.user-menu.active{background:var(--soft)}.account-popover{width:218px;padding:10px;border:1px solid var(--border);border-radius:11px;background:#fff;box-shadow:0 18px 45px rgba(20,30,50,.16);position:absolute;right:0;top:47px;z-index:60}.account-popover header{display:flex;align-items:center;gap:9px;padding:7px 7px 12px;border-bottom:1px solid var(--border)}.account-popover header>span{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;color:#fff;font-size:11px;font-weight:800;background:linear-gradient(145deg,#16cfe4,#6042d3)}.account-popover header>div{display:flex;flex-direction:column;gap:2px}.account-popover header strong{font-size:10px}.account-popover header small{color:var(--muted);font-size:8px}.account-popover>button{width:100%;height:36px;display:flex;align-items:center;gap:8px;padding:0 8px;margin-top:5px;border-radius:7px;color:var(--text-soft);font-size:9px;text-align:left;background:transparent}.account-popover>button:hover{background:var(--soft)}.account-popover>button.logout-button{color:var(--red)}.menu-pop-enter-active,.menu-pop-leave-active{transition:.16s ease}.menu-pop-enter-from,.menu-pop-leave-to{opacity:0;transform:translateY(-5px)}
.auth-page{width:100%;height:100dvh;min-height:100vh;display:grid;grid-template-columns:minmax(430px,.92fr) minmax(500px,1.08fr);overflow:hidden;background:#f6f8fc}.auth-showcase{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:clamp(22px,4vh,34px) clamp(34px,5vw,80px) 22px;color:#dbeaff;background:linear-gradient(145deg,#061527 0%,#0b2848 48%,#17134b 100%);position:relative}.auth-showcase:before{content:'';width:600px;height:600px;border:1px solid rgba(67,224,240,.14);border-radius:50%;position:absolute;right:-290px;top:-210px}.auth-showcase:after{content:'';width:540px;height:540px;border-radius:50%;background:radial-gradient(circle,rgba(18,205,232,.17),transparent 66%);position:absolute;right:-200px;bottom:-220px}.auth-brand,.auth-mobile-brand{display:flex;align-items:center;gap:11px;position:relative;z-index:2}.auth-brand-mark{width:42px;height:42px;display:grid;place-items:center;overflow:hidden;border:1px solid rgba(88,233,246,.45);border-radius:12px;background:rgba(4,26,49,.8);box-shadow:0 8px 25px rgba(15,213,237,.16)}.auth-brand-mark img{width:43px;height:43px;object-fit:contain}.auth-brand strong,.auth-mobile-brand strong{display:block;color:#fff;font-size:16px;letter-spacing:-.03em}.auth-brand small,.auth-mobile-brand small{display:block;margin-top:3px;color:#84b6d3;font-family:"DM Mono",monospace;font-size:8px;letter-spacing:.08em}.auth-story{max-width:500px;flex:1;min-height:0;display:flex;justify-content:center;flex-direction:column;margin:0;padding:24px 0 18px;position:relative;z-index:2}.auth-eyebrow{display:inline-flex;align-items:center;gap:7px;color:#71eaf5;font-family:"DM Mono",monospace;font-size:9px;letter-spacing:.1em}.auth-story h1{margin:20px 0 17px;color:#fff;font-size:clamp(44px,5vw,68px);letter-spacing:-.08em;line-height:1.02}.auth-story h1 em{color:#5be4f2;font-style:normal}.auth-story p{max-width:440px;margin:0;color:#a5bdd3;font-size:12px;line-height:1.85}.auth-capabilities{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:34px}.auth-capabilities>span{display:flex;flex-direction:column;gap:6px;padding:13px 12px;border:1px solid rgba(121,224,241,.16);border-radius:10px;background:rgba(7,40,69,.48);backdrop-filter:blur(9px)}.auth-capabilities svg{color:#5be4f2}.auth-capabilities b{color:#e7fbff;font-size:10px}.auth-capabilities small{color:#83abc6;font-size:8px}.auth-logo-visual{height:clamp(150px,25vh,280px);flex:0 1 clamp(150px,25vh,280px);min-height:0;display:grid;place-items:center;position:relative;z-index:1}.auth-logo-visual img{width:min(400px,90%);height:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 0 18px rgba(21,210,236,.28));position:relative;z-index:2}.auth-orbit{border:1px solid rgba(94,220,237,.22);border-radius:50%;position:absolute}.auth-orbit.orbit-a{width:min(300px,80%);height:min(170px,75%);transform:rotate(-18deg)}.auth-orbit.orbit-b{width:min(370px,92%);height:min(220px,95%);border-color:rgba(125,100,229,.24);transform:rotate(18deg)}.auth-showcase footer{display:flex;align-items:center;justify-content:space-between;flex:0 0 auto;color:#78a3bc;font-size:9px;position:relative;z-index:2}.auth-showcase footer span{display:inline-flex;align-items:center;gap:7px}.auth-showcase footer i{width:6px;height:6px;border-radius:50%;background:#44e5bb;box-shadow:0 0 0 4px rgba(68,229,187,.1)}.auth-form-area{height:100%;min-height:0;display:flex;align-items:center;justify-content:center;flex-direction:column;overflow:hidden;padding:32px 28px}.auth-mobile-brand{display:none}.auth-card{width:min(100%,440px);max-height:calc(100dvh - 120px);overflow:auto;padding:34px 40px;border:1px solid #e5e9f1;border-radius:17px;background:#fff;box-shadow:0 18px 55px rgba(34,53,87,.08)}.auth-card-header{text-align:center}.auth-invite-badge{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:6px;color:#1688a2;font-size:8px;font-weight:700;background:#e8faff}.auth-card-header h2{margin:16px 0 7px;color:var(--text);font-size:26px;letter-spacing:-.05em}.auth-card-header p{margin:0;color:var(--muted);font-size:10px}.auth-mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:25px 0 20px;border-radius:8px;background:#f0f3f7}.auth-mode-tabs button{height:35px;border-radius:6px;color:var(--muted);font-size:10px;font-weight:700;background:transparent}.auth-mode-tabs button.active{color:var(--primary);background:#fff;box-shadow:0 2px 6px rgba(20,30,50,.08)}.auth-form{display:flex;flex-direction:column;gap:14px}.auth-form label>span:first-child{display:block;margin-bottom:7px;color:var(--text-soft);font-size:9px;font-weight:700}.auth-input{height:44px;display:flex;align-items:center;gap:9px;padding:0 12px;border:1px solid #dfe5ed;border-radius:8px;color:#9aa6b7;background:#fbfcfe;transition:.16s ease}.auth-input:focus-within{border-color:#6bdce9;box-shadow:0 0 0 3px rgba(26,196,215,.1);background:#fff}.auth-input input{min-width:0;flex:1;border:0;color:var(--text);font-size:10px;backgLine truncated
@media(max-width:900px){.auth-page{display:block}.auth-showcase{min-height:300px;padding:24px 22px 22px}.auth-brand{display:none}.auth-story{margin:0;padding:14px 0 18px}.auth-story h1{margin:13px 0 10px;font-size:42px}.auth-story p{max-width:600px;font-size:10px}.auth-capabilities{display:none}.auth-logo-visual{height:115px;position:absolute;right:-25px;bottom:-13px;width:280px;opacity:.72}.auth-logo-visual img{width:270px}.auth-orbit.orbit-a{width:220px;height:120px}.auth-orbit.orbit-b{width:270px;height:155px}.auth-showcase footer{display:none}.auth-form-area{min-height:calc(100vh - 300px);align-items:center;padding:30px 18px}.auth-mobile-brand{display:flex;margin-bottom:20px}.auth-mobile-brand img{width:36px;height:36px;object-fit:contain}.auth-card{padding:29px 28px}}
@media(max-width:520px){.auth-showcase{min-height:260px}.auth-story h1{font-size:36px}.auth-story p{max-width:260px;font-size:9px}.auth-logo-visual{right:-80px;bottom:-25px;opacity:.5}.auth-form-area{min-height:calc(100vh - 260px);padding:22px 14px}.auth-card{padding:25px 20px;border-radius:14px}.auth-card-header h2{font-size:23px}.auth-mode-tabs{margin-top:21px}.auth-code-row{grid-template-columns:1fr 92px}}
@media(min-width:901px){.auth-showcase{display:grid;grid-template-rows:auto auto minmax(120px,1fr) auto}.auth-story{display:block;min-height:auto;flex:none;padding:clamp(20px,3.2vh,36px) 0 clamp(14px,2vh,24px)}.auth-logo-visual{width:100%;height:100%;max-height:320px;min-height:0;align-self:end;overflow:hidden;flex:none}.auth-logo-visual img{width:100%;height:100%;max-width:420px;max-height:100%;object-fit:contain}.auth-showcase footer{margin-top:10px}}
@media(min-width:901px) and (max-height:820px){.auth-showcase{padding-top:20px;padding-bottom:18px}.auth-story{padding:16px 0 12px}.auth-story h1{margin:13px 0 10px;font-size:clamp(42px,4.2vw,58px)}.auth-story p{font-size:10px;line-height:1.65}.auth-capabilities{margin-top:20px}.auth-capabilities>span{gap:4px;padding:9px 10px}.auth-logo-visual{max-height:220px}.auth-showcase footer{margin-top:6px}}
.brand-mark img,.context-avatar img,.auth-brand-mark img{display:block;width:100%;height:100%;object-fit:contain}
html, body, #app { min-height: 100%; margin: 0; }
/* Readability baseline */
:root{--text:#172033;--text-soft:#475467;--muted:#667085;--border:#dfe4ec}
body{font-size:14px;text-rendering:optimizeLegibility}
input::placeholder,textarea::placeholder{color:#7c8799;opacity:1}
body {
background: #f5f7fb;
color: var(--ink);
font-family: 'Manrope', 'Noto Sans SC', sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
}
/* Dark navigation contrast */
.sidebar{color:#c4cfde}
.brand-name span{color:#91a7bf;font-size:10px}
.context-card strong{font-size:13px}
.context-card span{color:#9aabc0;font-size:11px}
.nav-group>p{color:#8797ad;font-size:10px}
.nav-link{color:#aebaca}
.nav-link span{font-size:13px}
.nav-link em{font-size:10px}
.balance-card>span{color:#a5b4c8;font-size:11px}
.balance-card small{color:#9dacc0;font-size:10px}
.security-card{color:#b9b0f4;font-size:11px}
.collapse-control{color:#91a0b5}
.collapse-control span{font-size:11px}
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
input, textarea { outline: 0; }
/* Global navigation and actions */
.global-search span,.portal-switch{font-size:12px}
.global-search kbd{color:#596579;font-size:10px}
.user-menu strong{font-size:12px}
.user-menu small{font-size:10px}
.page-heading>div:first-child>span,.panel-header>div>span,.section-title span,.eyebrow,.routing-hero small,.capacity-main small{color:#596579;font-size:11px}
.page-heading p{font-size:14px;line-height:1.6}
.health-badge,.admin-badge{font-size:11px}
.button{font-size:12px}
.text-link{font-size:12px}
.select-button{font-size:11px}
.app-shell { min-height: 100vh; display: flex; background: #f6f8fb; }
.sidebar { width: 248px; flex: 0 0 248px; min-height: 100vh; padding: 24px 16px 16px; display: flex; flex-direction: column; color: #b5bfd1; background: var(--navy); transition: width .25s ease, flex-basis .25s ease; position: relative; z-index: 30; }
.sidebar.is-collapsed { width: 76px; flex-basis: 76px; padding-left: 12px; padding-right: 12px; }
.brand-block { height: 44px; display: flex; align-items: center; gap: 11px; padding: 0 8px; margin-bottom: 25px; }
.brand-mark { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 17px; font-weight: 800; letter-spacing: -.08em; background: linear-gradient(145deg, #9c84ff 0%, #5b40d7 100%); box-shadow: 0 7px 18px rgba(113, 80, 240, .32); position: relative; }
.brand-mark:after { content: ''; width: 7px; height: 7px; border: 1.5px solid rgba(255,255,255,.82); border-radius: 50%; position: absolute; right: 4px; top: 4px; }
.brand-mark i { width: 5px; height: 5px; border-radius: 50%; background: #8ef0ee; position: absolute; bottom: 5px; left: 5px; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { color: #f6f8ff; font-size: 15px; letter-spacing: .02em; }
.brand-copy span { color: #71809b; font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .09em; }
.workspace-switcher { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 9px; margin-bottom: 24px; border: 1px solid rgba(172, 189, 217, .14); border-radius: 11px; background: rgba(255,255,255,.045); }
.workspace-avatar { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 8px; color: #4d3db5; font-size: 12px; font-weight: 800; background: #c7bdff; }
.workspace-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.workspace-copy strong { overflow: hidden; color: #ecf0fa; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy span { color: #748199; font-size: 10px; }
.workspace-switcher svg { color: #73809a; }
.side-nav { flex: 1; }
.nav-group { margin-bottom: 22px; }
.nav-label { margin: 0 10px 8px; color: #5c6a83; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-item { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 11px; margin: 3px 0; border-radius: 9px; color: #8996ad; text-align: left; background: transparent; transition: .18s ease; }
.nav-item:hover { color: #f2f4fb; background: rgba(255,255,255,.065); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(122, 91, 245, .25), rgba(98, 74, 204, .12)); box-shadow: inset 2px 0 0 #a393ff; }
.nav-item span { flex: 1; font-size: 12px; font-weight: 600; }
.nav-item em { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 6px; color: #b9adff; font-family: 'DM Mono', monospace; font-size: 10px; font-style: normal; background: rgba(121, 94, 235, .21); }
.sidebar-bottom { display: flex; flex-direction: column; gap: 3px; }
.credit-mini-card { padding: 14px; margin: 6px 0 13px; border: 1px solid rgba(166,183,216,.12); border-radius: 12px; background: linear-gradient(145deg, rgba(105, 82, 207, .22), rgba(255,255,255,.035)); }
.credit-mini-head { display: flex; justify-content: space-between; margin-bottom: 10px; color: #8796b0; font-size: 10px; }
.credit-mini-card > strong { display: block; color: #fff; font-size: 18px; letter-spacing: -.03em; }
.credit-progress { height: 4px; overflow: hidden; margin: 12px 0 7px; border-radius: 10px; background: rgba(255,255,255,.12); }
.credit-progress span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #8875f8, #9cdcf0); }
.credit-mini-card small { color: #8d9ab1; font-size: 10px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; color: var(--violet); font-size: 12px; font-weight: 700; background: transparent; }
.credit-mini-card .text-button { margin-top: 11px; color: #bab0ff; font-size: 10px; }
.collapse-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px; margin-top: 8px; color: #66738a; text-align: left; background: transparent; }
.collapse-button:hover { color: #d7ddeb; }
.collapse-button span { font-size: 11px; }
.icon-button { width: 33px; height: 33px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 8px; color: var(--ink-soft); background: transparent; transition: .18s ease; }
.icon-button:hover { border-color: var(--line); color: var(--ink); background: var(--surface-soft); }
.mobile-close, .mobile-menu { display: none; }
/* Dashboard cards and supporting text */
.connection-main small{font-size:11px}
.connection-main strong{font-size:12px}
.connection-tags span{font-size:10px}
.welcome-copy>span{font-size:11px}
.welcome-copy p{color:#c1cee0;font-size:14px}
.visual-chip{color:#ecfbff;font-size:11px}
.metric-card small{font-size:11px}
.metric-card em{font-size:10px}
.panel-header>small{font-size:11px}
.chart-summary span,.bar-chart span{font-size:10px}
.activity-list strong{font-size:12px}
.activity-list small,.activity-list time{font-size:10px}
.availability,.provider{font-size:10px}
.model-card p{font-size:12px}
.model-card footer{font-size:11px}
.tabs button{font-size:11px}
.tabs.compact button{font-size:10px}
.search-input input{font-size:12px}
.model-title>span,.model-specs span{font-size:10px}
.empty-state span{font-size:11px}
.main-column { flex: 1; min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.78); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.topbar-left, .topbar-actions, .breadcrumb, .topbar-user { display: flex; align-items: center; }
.breadcrumb { gap: 9px; color: var(--ink-faint); font-size: 12px; }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.breadcrumb svg { color: #b4bdcb; }
.topbar-actions { gap: 13px; }
.portal-switch { min-height: 33px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid #ded8ff; border-radius: 8px; color: #6652ca; font-size: 10px; font-weight: 700; background: #f8f6ff; transition: .18s ease; }
.portal-switch:hover { border-color: #c5b9ff; background: #f2efff; transform: translateY(-1px); }
.portal-switch.is-admin { border-color: #cfe8e6; color: #2d837a; background: #f2faf9; }
.admin-context-card { display: flex; flex-direction: column; gap: 7px; padding: 12px; margin: 6px 0 13px; border: 1px solid rgba(166,183,216,.12); border-radius: 11px; color: #7d8ba4; font-size: 9px; line-height: 1.55; background: rgba(255,255,255,.04); }
.admin-context-card span { display: flex; align-items: center; gap: 6px; color: #b7acf8; font-weight: 700; }
.admin-context-card strong { color: #9aa6bb; font-size: 9px; font-weight: 500; }
.global-search { width: 250px; height: 37px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: #9ba7b8; background: #fbfcfe; position: relative; }
.global-search:focus-within { border-color: #c6bcff; box-shadow: 0 0 0 3px rgba(116,87,242,.08); }
.global-search input { width: 100%; border: 0; color: var(--ink); font-size: 11px; background: transparent; }
.global-search input::placeholder { color: #a5afbd; }
.global-search kbd { padding: 2px 5px; border: 1px solid #e2e6ed; border-radius: 4px; color: #a0a9b8; font-family: 'DM Mono', monospace; font-size: 9px; white-space: nowrap; background: #fff; }
.search-results { width: 290px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-md); background: #fff; position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; }
.search-results button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 7px; color: var(--ink); text-align: left; background: transparent; }
.search-results button:hover { background: var(--surface-soft); }
.search-results button span { flex: 1; font-size: 11px; font-weight: 700; }
.search-results button small { color: var(--ink-faint); font-size: 10px; }
.notification-button { position: relative; }
.notification-button i { width: 5px; height: 5px; border: 1px solid #fff; border-radius: 50%; background: #ef6d79; position: absolute; top: 7px; right: 7px; }
.topbar-user { gap: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border: 2px solid #e1dcff; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; background: linear-gradient(145deg, #8874ee, #4c3da4); }
.user-name { display: flex; flex-direction: column; gap: 1px; }
.user-name strong { color: var(--ink); font-size: 11px; }
.user-name span { color: var(--ink-faint); font-size: 9px; }
.topbar-user > svg { color: #9ba7b8; }
.page-content { max-width: 1500px; padding: 38px 42px 70px; margin: 0 auto; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-intro.compact-intro { align-items: center; margin-bottom: 24px; }
.eyebrow, .panel-eyebrow { display: block; color: #8995a9; font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.page-intro h1 { margin: 7px 0 7px; color: var(--ink); font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.055em; line-height: 1.1; }
.compact-intro h1 { margin-top: 5px; font-size: 25px; }
.page-intro p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.wave { display: inline-block; margin-left: 4px; color: #f7aa5d; font-size: 19px; transform: rotate(-13deg); }
.intro-actions { display: flex; align-items: center; gap: 10px; }
.status-pill, .latency-badge, .admin-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #dcedeb; border-radius: 8px; color: #3d8d75; font-size: 10px; font-weight: 700; background: #f3fbf8; }
.status-pill i, .latency-badge i { width: 6px; height: 6px; border-radius: 50%; background: #33bb86; box-shadow: 0 0 0 3px rgba(51,187,134,.13); }
.admin-badge { border-color: #ded8ff; color: #6f5cd2; background: #f7f5ff; }
.admin-badge.subtle { padding: 6px 9px; font-size: 9px; }
.admin-module-placeholder { min-height: 390px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 55px; text-align: center; }
.placeholder-symbol { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 20px; border: 1px solid #ddd7ff; border-radius: 18px; color: var(--violet); background: linear-gradient(145deg, #f8f6ff, #eeebff); box-shadow: 0 12px 28px rgba(100,75,220,.1); }
.admin-module-placeholder h2 { margin: 9px 0 10px; color: var(--ink); font-size: 25px; letter-spacing: -.04em; }
.admin-module-placeholder > p { max-width: 570px; margin: 0; color: var(--ink-faint); font-size: 12px; line-height: 1.8; }
.placeholder-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.placeholder-tags span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); font-size: 9px; background: #fafbfc; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; color: var(--ink); font-size: 11px; font-weight: 700; transition: .18s ease; }
.button.primary { color: #fff; background: linear-gradient(135deg, #7357f2, #6045d8); box-shadow: 0 7px 16px rgba(104, 75, 226, .18); }
.button.primary:hover { box-shadow: 0 9px 22px rgba(104, 75, 226, .3); transform: translateY(-1px); }
.button.secondary { border-color: var(--line-strong); background: #fff; }
.button.secondary:hover { border-color: #bbb1f5; color: var(--violet); background: #fbfaff; }
.button.ghost-light { border-color: rgba(255,255,255,.16); color: #d7d9ef; background: rgba(255,255,255,.075); }
.button.ghost-light:hover { background: rgba(255,255,255,.13); }
.disabled-button { color: #a4adba; background: #eef1f5; }
.full-width { width: 100%; }
.link-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; color: var(--violet); font-size: 11px; font-weight: 700; background: transparent; }
.link-button:hover { color: #4a35b7; }
/* Forms, playground and notices */
.form-label{font-size:12px}
.model-picker strong{font-size:12px}
.model-picker small{font-size:10px}
.segment button{font-size:11px}
.request-panel textarea{font-size:13px}
.request-footer{font-size:11px}
.response-state p{font-size:11px}
.response-result>div small{font-size:10px}
.notice strong{font-size:12px}
.notice p{font-size:11px;line-height:1.65}
.hero-card { min-height: 342px; overflow: hidden; padding: 42px 44px; border-radius: 17px; color: #fff; background: #141b32; box-shadow: var(--shadow-lg); isolation: isolate; position: relative; }
.hero-card:before { content: ''; width: 540px; height: 540px; border: 1px solid rgba(163,151,255,.13); border-radius: 50%; position: absolute; right: 55px; top: -145px; }
.hero-card:after { content: ''; width: 380px; height: 380px; border: 1px dashed rgba(130,229,237,.13); border-radius: 50%; position: absolute; right: 140px; top: -65px; }
.hero-grid { position: absolute; inset: 0; opacity: .2; background-image: linear-gradient(rgba(172,188,240,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(172,188,240,.14) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(90deg, transparent 23%, #000 75%); z-index: -1; }
.hero-orb { border-radius: 50%; filter: blur(2px); position: absolute; z-index: -1; }
.orb-one { width: 360px; height: 360px; right: 95px; top: -86px; opacity: .4; background: radial-gradient(circle at 38% 44%, rgba(115,87,242,.8), transparent 67%); }
.orb-two { width: 320px; height: 320px; right: 280px; bottom: -200px; opacity: .28; background: radial-gradient(circle at 45% 45%, rgba(35,200,210,.78), transparent 68%); }
.hero-content { max-width: 485px; position: relative; z-index: 2; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; color: #a4ace2; font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .11em; }
.hero-content h2 { margin: 22px 0 14px; font-size: clamp(39px, 4.2vw, 58px); font-weight: 700; letter-spacing: -.075em; line-height: .99; }
.hero-content h2 em { color: #aa9cff; font-style: normal; }
.hero-content > p { max-width: 390px; margin: 0; color: #9ba5c1; font-size: 13px; line-height: 1.85; }
.hero-actions { display: flex; gap: 10px; margin-top: 27px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 27px; color: #7d89a7; font-size: 10px; }
.hero-note span { display: inline-flex; align-items: center; gap: 5px; }
.hero-note svg { color: #8f84ef; }
.hero-model-stack { width: 415px; height: 300px; position: absolute; right: 49px; top: 19px; }
.stack-core { width: 142px; height: 142px; display: grid; place-items: center; border: 1px solid rgba(178,168,255,.36); border-radius: 50%; position: absolute; right: 112px; top: 74px; background: rgba(14, 22, 47, .55); box-shadow: 0 0 70px rgba(112,83,236,.25), inset 0 0 25px rgba(116, 98, 232,.22); }
.core-ring { border: 1px solid rgba(158,147,255,.38); border-radius: 50%; position: absolute; inset: 13px; animation: spin 16s linear infinite; }
.core-ring:before, .core-ring:after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #9c91ff; position: absolute; }
.core-ring:before { top: -3px; left: 45%; }.core-ring:after { bottom: 18%; right: -2px; }
.ring-inner { inset: 27px; border-color: rgba(108,220,226,.35); animation-direction: reverse; animation-duration: 11s; }
.core-mark { width: 55px; height: 55px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 17px; color: #fff; font-size: 25px; font-weight: 800; background: linear-gradient(145deg, #8776ed, #5544b0); box-shadow: 0 12px 30px rgba(68,52,174,.4); }
.floating-model-card { width: 145px; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid rgba(194,202,255,.16); border-radius: 10px; box-shadow: 0 16px 35px rgba(0,0,0,.18); background: rgba(30, 39, 72, .72); backdrop-filter: blur(10px); position: absolute; }
.floating-model-card span { color: #9aa6c1; font-size: 9px; }.floating-model-card strong { margin-left: auto; color: #e6e6f9; font-size: 9px; font-weight: 600; }
.card-a { top: 34px; left: 19px; }.card-b { bottom: 33px; left: 5px; }.card-c { top: 116px; right: 0; }
.mini-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; }.mini-icon.violet { color: #b6a9ff; background: rgba(117,91,244,.23); }.mini-icon.orange { color: #ffc083; background: rgba(243,154,78,.2); }.mini-icon.cyan { color: #8fe4eb; background: rgba(21,169,197,.19); }
/* Data tables and status */
th{color:#596579;font-size:11px}
td{color:#475467;font-size:12px}
td strong{font-size:12px}
.entity-cell small,.stacked-cell small{font-size:10px}
.code-value code{font-size:10px}
.status-chip,.role-tag,.queue-number,.risk-tag{font-size:10px}
.compact-metrics span{font-size:10px}
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-top: 16px; }
.metric-card { min-height: 127px; display: flex; align-items: flex-start; gap: 11px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.metric-icon { width: 33px; height: 33px; flex: 0 0 33px; display: grid; place-items: center; border-radius: 9px; }.metric-icon.violet, .summary-icon.violet { color: var(--violet); background: var(--violet-light); }.metric-icon.cyan, .summary-icon.cyan { color: var(--cyan); background: var(--cyan-light); }.metric-icon.orange, .summary-icon.orange { color: var(--orange); background: var(--orange-light); }.metric-icon.green, .summary-icon.green { color: var(--green); background: var(--green-light); }
.metric-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }.metric-copy > span { color: var(--ink-faint); font-size: 10px; }.metric-copy > strong { color: var(--ink); font-size: 21px; letter-spacing: -.055em; line-height: 1.05; }.metric-copy > strong i { color: #98a2b2; font-size: 11px; font-style: normal; font-weight: 500; letter-spacing: 0; }.metric-copy small { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; }.metric-copy small i { color: #a0aab9; font-style: normal; font-weight: 400; }.positive { color: var(--green); }.neutral { color: var(--ink-faint); }.dot-live { width: 5px; height: 5px; border-radius: 50%; background: #2ab27f; }
.sparkline { height: 34px; display: flex; align-items: end; gap: 3px; margin: auto 0 2px auto; }.sparkline span { width: 4px; min-height: 4px; border-radius: 3px 3px 1px 1px; }.violet-line span { background: #b5aaff; }.cyan-line span { background: #92dfe5; }
.metric-ring { width: 39px; height: 39px; margin: auto 1px 1px auto; position: relative; }.metric-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }.metric-ring circle { fill: none; stroke-width: 4; }.ring-track { stroke: #f0e6dc; }.ring-value { stroke: var(--orange); stroke-linecap: round; stroke-dasharray: 68 100; }.metric-ring span { color: var(--orange); font-family: 'DM Mono', monospace; font-size: 8px; position: absolute; inset: 0; display: grid; place-items: center; }
.availability-bars { display: flex; align-items: end; gap: 3px; height: 34px; margin: auto 1px 2px auto; }.availability-bars i { width: 4px; border-radius: 3px 3px 1px 1px; background: #8ad7b7; }.availability-bars i:nth-child(1) { height: 53%; }.availability-bars i:nth-child(2) { height: 69%; }.availability-bars i:nth-child(3) { height: 47%; }.availability-bars i:nth-child(4) { height: 86%; }.availability-bars i:nth-child(5) { height: 60%; }.availability-bars i:nth-child(6) { height: 77%; }.availability-bars i:nth-child(7) { height: 91%; }
/* Usage, documentation and administration */
.credit-hero span,.credit-hero p{color:#c0cbe0;font-size:11px}
.credit-circle small,.capacity-ring span{font-size:10px}
.ledger strong,.ledger b{font-size:11px}
.ledger small{font-size:10px}
.docs-menu>span{font-size:10px}
.docs-menu button{font-size:11px}
.docs-content section>b{font-size:10px}
.docs-content section p{font-size:12px}
.docs-content pre{font-size:11px}
.docs-note p{font-size:11px}
.health-list strong{font-size:12px}
.health-list small,.health-list b{font-size:10px}
.quick-credit>p,.admin-model-grid p,.settings-card>p{font-size:12px}
.admin-model-grid footer span{font-size:10px}
.routing-hero p{color:#bdc8dd;font-size:11px}
.routing-hero>div:last-child span,.capacity-main p{font-size:10px}
.setting-list strong{font-size:12px}
.setting-list small{font-size:10px}
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr); gap: 14px; margin-top: 14px; }.panel { border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }.usage-panel, .activity-panel, .usage-detail-panel, .ledger-panel { padding: 22px 23px; }.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }.panel-heading h3 { margin: 6px 0 0; color: var(--ink); font-size: 15px; letter-spacing: -.025em; }.select-button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); font-size: 10px; background: #fff; }.select-button:hover { border-color: #c8c0f7; color: var(--violet); }.usage-summary { display: flex; align-items: center; gap: 9px; margin-top: 22px; }.usage-summary strong { color: var(--ink); font-size: 25px; letter-spacing: -.05em; }.usage-summary strong small { color: var(--ink-faint); font-size: 10px; font-weight: 500; letter-spacing: 0; }.trend-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 5px; color: var(--green); font-size: 9px; font-weight: 700; background: var(--green-light); }.summary-note { color: var(--ink-faint); font-size: 10px; }.bar-chart { height: 145px; display: flex; align-items: end; gap: 15px; padding: 20px 8px 0; }.bar-column { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 7px; position: relative; }.bar-column .bar-value { visibility: hidden; color: var(--ink-soft); font-family: 'DM Mono', monospace; font-size: 8px; transition: .18s ease; }.bar-column:hover .bar-value { visibility: visible; }.bar-track { width: 100%; height: 100%; display: flex; align-items: end; border-radius: 5px 5px 2px 2px; background: #f1f3f8; }.bar-track i { width: 100%; display: block; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #8875f4, #c4bbfc); }.bar-column:nth-child(4) .bar-track i, .large-chart .bar-column:nth-child(4) .bar-track i { background: linear-gradient(180deg, #7155ea, #b0a4f5); }.bar-column small { color: var(--ink-faint); font-size: 9px; }.activity-list { margin-top: 17px; }.activity-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f0f2f6; }.activity-item:last-child { border-bottom: 0; }.activity-icon { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 8px; }.activity-icon.success, .activity-icon.green { color: var(--green); background: var(--green-light); }.activity-icon.violet { color: var(--violet); background: var(--violet-light); }.activity-icon.orange { color: var(--orange); background: var(--orange-light); }.activity-icon.cyan { color: var(--cyan); background: var(--cyan-light); }.activity-item > div:nth-child(2) { min-width: 0; flex: 1; }.activity-item strong { display: block; color: var(--ink); font-size: 10px; }.activity-item p { overflow: hidden; margin: 3px 0 0; color: var(--ink-faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.activity-item time { color: #abb3c0; font-size: 9px; white-space: nowrap; }.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 31px 0 15px; }.section-heading h3 { margin: 6px 0 0; font-size: 15px; letter-spacing: -.03em; }.model-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }.model-preview-card { min-height: 190px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; transition: .2s ease; }.model-preview-card:hover, .catalog-card:hover { border-color: #cbc3fa; box-shadow: 0 12px 30px rgba(60,46,136,.1); transform: translateY(-2px); }.model-card-top, .catalog-card-head { display: flex; align-items: center; justify-content: space-between; }.model-symbol { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; color: var(--violet); background: var(--violet-light); }.model-symbol.large { width: 42px; height: 42px; border-radius: 11px; }.model-symbol.small { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; }.model-symbol.cyan { color: var(--cyan); background: var(--cyan-light); }.model-symbol.orange { color: var(--orange); background: var(--orange-light); }.model-symbol.pink { color: #dc7298; background: #ffedf4; }.model-symbol.blue { color: #5e88d7; background: #eaf1ff; }.model-symbol.green { color: var(--green); background: var(--green-light); }.availability-dot { display: inline-flex; align-items: center; gap: 4px; color: #68a88e; font-family: 'DM Mono', monospace; font-size: 8px; }.availability-dot i { width: 5px; height: 5px; border-radius: 50%; background: #49bb89; }.model-preview-card h4 { margin: 19px 0 7px; color: var(--ink); font-size: 13px; letter-spacing: -.025em; }.model-preview-card p { display: -webkit-Line truncated
/* Drawers, modals and feedback */
.slide-panel header span,.modal header span{font-size:10px}
.drawer-model-head small,.user-profile small{font-size:10px}
.drawer-model-head strong,.user-profile strong{font-size:12px}
.drawer-description{font-size:12px}
.detail-list dt,.detail-list dd{font-size:11px}
.detail-list code{font-size:10px}
.drawer-note{font-size:11px}
.drawer-progress small{font-size:10px}
.modal-description{font-size:12px}
.text-input,.input-with-prefix{font-size:12px}
.option-list strong,.secret-success strong{font-size:11px}
.secret-box code,.input-with-prefix span{font-size:10px}
.toast{font-size:11px}
.account-popover header strong{font-size:12px}
.account-popover header small{font-size:10px}
.account-popover>button{font-size:11px}
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px; margin-bottom: 19px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }.filter-tabs { display: flex; align-items: center; gap: 4px; }.filter-tabs button { padding: 8px 13px; border-radius: 7px; color: var(--ink-soft); font-size: 11px; background: transparent; }.filter-tabs button:hover { color: var(--violet); background: #f8f6ff; }.filter-tabs button.active { color: var(--violet); font-weight: 700; background: var(--violet-light); }.filter-tabs.compact button { padding: 6px 8px; font-size: 9px; }.catalog-search { width: 245px; height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: #a4adbc; }.catalog-search:focus-within { border-color: #c7befa; }.catalog-search input { width: 100%; border: 0; color: var(--ink); font-size: 10px; background: transparent; }.model-catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }.catalog-card { min-height: 280px; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; transition: .2s ease; }.more-button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border-radius: 7px; color: var(--ink-faint); background: transparent; }.more-button:hover { color: var(--ink); background: var(--surface-soft); }.catalog-title { display: flex; align-items: center; gap: 8px; margin-top: 18px; }.catalog-title h3 { margin: 0; color: var(--ink); font-size: 15px; letter-spacing: -.03em; }.model-type { padding: 4px 6px; border-radius: 5px; color: var(--violet); font-size: 9px; background: var(--violet-light); }.vendor-name { margin-top: 5px; color: var(--ink-faint); font-size: 9px; }.catalog-card > p { min-height: 39px; margin: 17px 0; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }.model-specs { display: flex; gap: 11px; padding: 12px 0; border-top: 1px solid #f0f2f6; border-bottom: 1px solid #f0f2f6; color: var(--ink-faint); font-size: 9px; }.model-specs span { display: inline-flex; align-items: center; gap: 4px; }.catalog-card-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; margin-top: auto; }.mode-tag { padding: 5px 7px; border-radius: 5px; color: #558c73; font-size: 9px; background: var(--green-light); }.mode-tag.async { color: #b77a3d; background: var(--orange-light); }.empty-state, .empty-table { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 250px; grid-column: 1 / -1; color: var(--ink-faint); }.empty-state svg { color: #c2cad7; }.empty-state strong { color: var(--ink-soft); font-size: 13px; }.empty-state span { font-size: 10px; }
.playground-layout { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(400px, 1.15fr); gap: 15px; }.playground-input, .playground-output { min-height: 585px; padding: 22px; }.playground-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 25px; }.playground-head h3 { margin: 6px 0 0; font-size: 15px; }.field-label { display: flex; justify-content: space-between; margin: 0 0 8px; color: var(--ink-soft); font-size: 10px; font-weight: 700; }.model-select { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-align: left; background: #fbfcfe; }.model-select:hover { border-color: #c6bcf7; }.model-select > span { flex: 1; display: flex; flex-direction: column; gap: 3px; }.model-select strong { font-size: 11px; }.model-select small { color: var(--ink-faint); font-size: 9px; }.model-select > svg { color: var(--ink-faint); }.playground-input > .field-label:not(:first-of-type) { margin-top: 21px; }.mode-switch { display: flex; padding: 3px; border-radius: 8px; background: #f2f4f8; }.mode-switch button { flex: 1; padding: 8px; border-radius: 6px; color: var(--ink-faint); font-size: 10px; background: transparent; }.mode-switch button.active { color: var(--violet); font-weight: 700; background: #fff; box-shadow: 0 2px 5px rgba(37,50,74,.07); }.prompt-label { margin-top: 22px !important; }.prompt-label span { color: #adb5c1; font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 400; }.playground-input textarea { width: 100%; min-height: 167px; resize: vertical; padding: 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: 11px; line-height: 1.8; background: #fbfcfe; }.playground-input textarea:focus { border-color: #bdb3f6; box-shadow: 0 0 0 3px rgba(115,87,242,.08); }.prompt-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }.prompt-hints button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); font-size: 9px; background: #fff; }.prompt-hints button:hover { border-color: #c9c0fa; color: var(--violet); }.run-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 24px; margin-top: auto; color: var(--ink-faint); font-size: 9px; }.run-footer > span { display: inline-flex; align-items: center; gap: 4px; }.run-button { min-width: 111px; }.spinner { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }.output-actions { display: flex; gap: 3px; }.output-actions .icon-button { width: 29px; height: 29px; border-color: var(--line); }.output-loading, .output-empty, .output-result { min-height: 460px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }.output-loading strong { margin-top: 22px; color: var(--ink); font-size: 14px; }.output-loading p, .output-empty p { margin: 8px 0 0; color: var(--ink-faint); font-size: 10px; line-height: 1.8; }.loading-orbit { width: 74px; height: 74px; border: 1px solid #d8d1ff; border-radius: 50%; display: grid; place-items: center; position: relative; animation: spin 9s linear infinite; }.loading-orbit:before { content: ''; width: 45px; height: 45px; border: 1px dashed #abdfe5; border-radius: 50%; }.loading-orbit span { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); position: absolute; }.loading-orbit span:nth-child(1) { top: -4px; }.loading-orbit span:nth-child(2) { right: 4px; bottom: 15px; background: var(--cyan); }.loading-orbit span:nth-child(3) { bottom: -3px; left: 18px; background: var(--orange); }.output-empty { color: var(--ink); }.empty-illustration { width: 92px; height: 92px; display: grid; place-items: center; border: 1px dashed #d3cef3; border-radius: 50%; margin-bottom: 20px; position: relative; }.empty-illustration > div { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 15px; color: var(--violet); background: var(--violet-light); }.empty-illustration i { width: 5px; height: 5px; border-radius: 50%; background: #9f91f3; position: absolute; }.empty-illustration i:nth-of-type(1) { top: 8px; right: 12px; }.empty-illustration i:nth-of-type(2) { bottom: 10px; left: 12px; background: #9edce3; }.empty-illustration i:nth-of-type(3) { top: 45%; right: -3px; background: #f6b26f; }.output-empty strong { font-size: 14px; }.empty-shortcuts { display: flex; align-items: center; gap: 5px; margin-top: 19px; color: #a0aab8; font-size: 9px; }.empty-shortcuts kbd { padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink-soft); font-family: 'DM Mono', monospace; background: #fff; }.empty-shortcuts small { margin-left: 6px; color: #bac1cd; }.output-result { align-items: stretch; justify-content: flex-start; paddinLine truncated
.notice-banner, .key-guidance { display: flex; align-items: center; gap: 13px; padding: 14px 17px; margin-bottom: 15px; border: 1px solid #e0ddf9; border-radius: 11px; background: #faf9ff; }.notice-icon, .guidance-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 9px; color: var(--violet); background: var(--violet-light); }.notice-banner > div:nth-child(2), .key-guidance > div:nth-child(2) { flex: 1; }.notice-banner strong, .key-guidance strong { display: block; color: var(--ink); font-size: 11px; }.notice-banner p, .key-guidance p { margin: 4px 0 0; color: var(--ink-faint); font-size: 10px; line-height: 1.5; }.table-panel { padding: 22px 23px; }.table-tools { display: flex; align-items: center; gap: 10px; }.result-count { color: var(--ink-faint); font-size: 10px; }.data-table { margin-top: 20px; }.table-row { min-height: 66px; display: grid; grid-template-columns: 1.55fr 1.5fr 1fr 1fr .8fr 34px; align-items: center; gap: 12px; border-bottom: 1px solid #f0f2f6; }.table-row:last-child { border-bottom: 0; }.table-head { min-height: 34px; border-bottom: 1px solid var(--line); color: #9ca7b7; font-family: 'DM Mono', monospace; font-size: 9px; }.key-name, .task-name { display: flex; align-items: center; gap: 9px; min-width: 0; }.key-icon, .task-icon { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 29px; border-radius: 8px; color: var(--violet); background: var(--violet-light); }.key-name > div:nth-child(2), .task-name > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }.key-name strong, .task-name strong { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.key-name small, .task-name small { color: var(--ink-faint); font-family: 'DM Mono', monospace; font-size: 8px; }.key-value { display: inline-flex; align-items: center; gap: 8px; width: max-content; padding: 6px 8px; border-radius: 6px; color: var(--ink-soft); background: #f8f9fc; }.key-value:hover { color: var(--violet); background: var(--violet-light); }.key-value code { font-family: 'DM Mono', monospace; font-size: 9px; }.scope-text, .muted-text { color: var(--ink-soft); font-size: 10px; }.muted-text { color: var(--ink-faint); }.status-label { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 10px; font-weight: 700; }.status-label i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }.status-label.muted { color: #a1aab7; }.status-label.is-running { color: var(--orange); }.status-label.is-queued { color: #8b82cf; }.status-label.is-success { color: var(--green); }.status-label.is-failed { color: var(--red); }.key-guidance { margin-top: 15px; border-color: #d8eef0; background: #f5fcfc; }.key-guidance .guidance-icon { color: var(--cyan); background: var(--cyan-light); }
.task-summary-grid, .ops-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 15px; }.task-summary-card, .ops-metric { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }.summary-icon { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 33px; border-radius: 9px; }.task-summary-card div, .ops-metric div { display: flex; flex-direction: column; gap: 3px; }.task-summary-card small, .ops-metric small { color: var(--ink-faint); font-size: 9px; }.task-summary-card strong, .ops-metric strong { color: var(--ink); font-size: 19px; letter-spacing: -.05em; }.task-table .table-row { grid-template-columns: 1.5fr 1.1fr 1.35fr 1fr .85fr 25px; }.task-row { width: 100%; padding: 0; color: inherit; text-align: left; background: transparent; }.task-row:hover { background: #fbfbff; }.task-icon.is-running { color: var(--orange); background: var(--orange-light); }.task-icon.is-queued { color: #8b82cf; background: #efedff; }.task-icon.is-success { color: var(--green); background: var(--green-light); }.task-icon.is-failed { color: var(--red); background: #fff0f2; }.model-name { color: var(--ink-soft); font-size: 10px; }.progress-cell { display: flex; align-items: center; gap: 8px; }.progress-cell small { color: var(--ink-faint); font-family: 'DM Mono', monospace; font-size: 8px; }.progress-track { height: 5px; flex: 1; overflow: hidden; border-radius: 9px; background: #eef0f5; }.progress-track i { height: 100%; display: block; border-radius: inherit; background: #9387ec; }.progress-track i.is-running { background: var(--orange); }.progress-track i.is-success { background: var(--green); }.progress-track i.is-failed { background: var(--red); }.task-row .muted-text { display: flex; flex-direction: column; gap: 2px; }.task-row .muted-text small { color: #b1bac7; font-size: 8px; }.drawer-backdrop { position: fixed; inset: 0; background: rgba(11,18,32,.2); z-index: 39; }.task-detail-drawer { width: 355px; padding: 24px; border-left: 1px solid var(--line); box-shadow: -14px 0 45px rgba(22,32,51,.12); background: #fff; position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; animation: drawer-in .25s ease; }.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; }.drawer-head h3 { margin: 7px 0 0; font-size: 17px; }.drawer-status { display: flex; align-items: center; justify-content: space-between; padding: 14px; margin-top: 29px; border-radius: 10px; background: #f8f9fc; }.drawer-status strong { color: var(--ink); font-family: 'DM Mono', monospace; font-size: 17px; }.drawer-progress { padding: 18px 0 20px; }.drawer-progress span { display: block; margin-top: 9px; color: var(--ink-faint); font-size: 10px; }.detail-list { margin: 0 0 26px; border-top: 1px solid var(--line); }.detail-list div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f0f2f6; }.detail-list dt { color: var(--ink-faint); font-size: 10px; }.detail-list dd { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--ink); font-family: 'DM Mono', monospace; font-size: 9px; }.detail-list dd svg { cursor: pointer; color: var(--violet); }.empty-table { min-height: 160px; font-size: 11px; }
.billing-banner { min-height: 110px; display: flex; align-items: center; gap: 17px; padding: 20px 24px; margin-bottom: 15px; overflow: hidden; border-radius: 13px; color: #fff; background: linear-gradient(110deg, #171d37, #252552); position: relative; }.billing-banner:after { content: ''; width: 390px; height: 190px; border: 1px solid rgba(163,151,255,.2); border-radius: 50%; position: absolute; right: 80px; top: -100px; }.billing-art { width: 55px; height: 55px; display: grid; place-items: center; flex: 0 0 55px; border: 1px solid rgba(168,157,255,.37); border-radius: 17px; color: #bdb3ff; background: rgba(133,113,242,.18); position: relative; z-index: 1; }.billing-orbit { width: 70px; height: 70px; border: 1px dashed rgba(174,162,255,.4); border-radius: 50%; position: absolute; animation: spin 13s linear infinite; }.billing-banner > div:nth-child(2) { flex: 1; position: relative; z-index: 1; }.billing-banner h3 { margin: 6px 0 5px; color: #fff; font-size: 16px; font-weight: 600; }.billing-banner h3 strong { color: #b9adff; font-weight: 700; }.billing-banner p { margin: 0; color: #9aa6c5; font-size: 10px; }.billing-banner .button { position: relative; z-index: 1; }.usage-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 15px; }.large-chart { height: 230px; padding-top: 35px; }.large-chart .bar-column .bar-track { background: #f3f4f8; }.usage-legend { display: flex; flex-wrap: wrap; gap: 15px; padding-top: 17px; margin-top: 5px; border-top: 1px solid #f0f2f6; color: var(--ink-faint); font-size: 9px; }.legend-dot { width: 6px; height: 6px; display: inline-block; margin-right: 5px; border-radius: 50%; }.legend-dot.violet { background: var(--violet); }.legend-dot.orange { background: var(--orange); }.legend-dot.cyan { background: var(--cyan); }.usage-big-number { display: flex; align-items: center; gap: 9px; margin-top: 20px; }.usage-big-number strong { color: var(--ink); font-size: 27px; letter-spacing: -.06em; }.usage-big-number small { color: var(--ink-faint); font-size: 9px; }.usage-big-number .positive { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 5px; font-size: 9px; background: var(--green-light); }.ledger-list { margin-top: 21px; }.ledger-item { display: grid; grid-template-columns: 30px 1fr auto; column-gap: 9px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0f2f6; position: relative; }.ledger-item:last-child { border-bottom: 0; }.ledger-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; }.ledger-icon.plus { color: var(--green); background: var(--green-light); }.ledger-icon.minus { color: var(--orange); background: var(--orange-light); }.ledger-item > div:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }.ledger-item strong { color: var(--ink); font-size: 10px; }.ledger-item span { color: var(--ink-faint); font-size: 8px; }.ledger-item time { grid-column: 2; margin-top: 3px; color: #aab3bf; font-size: 8px; }.ledger-item .amount { grid-column: 3; grid-row: 1 / 3; color: var(--ink-soft); font-family: 'DM Mono', monospace; font-size: 10px; font-weight: 500; }.ledger-item .amount.plus { color: var(--green); }
.docs-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 15px; align-items: start; }.docs-nav { display: flex; flex-direction: column; padding: 17px 10px; position: sticky; top: 95px; }.docs-nav-label { padding: 4px 10px 8px; color: #9aa4b3; font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }.docs-nav-label.second { padding-top: 22px; }.docs-nav button { min-height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border-radius: 7px; color: var(--ink-soft); text-align: left; font-size: 10px; background: transparent; }.docs-nav button:hover { color: var(--violet); background: #f8f6ff; }.docs-nav button.active { color: var(--violet); font-weight: 700; background: var(--violet-light); }.docs-article { max-width: 780px; padding: 7px 35px 45px; }.docs-article-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); }.docs-article-heading h2 { margin: 9px 0 10px; font-size: 27px; letter-spacing: -.055em; }.docs-article-heading p { max-width: 650px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }.docs-step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 27px 0; border-bottom: 1px solid var(--line); }.step-number { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #d7d1ff; border-radius: 8px; color: var(--violet); font-family: 'DM Mono', monospace; font-size: 9px; background: var(--violet-light); }.docs-step h3 { margin: 3px 0 7px; font-size: 14px; }.docs-step p { margin: 0 0 15px; color: var(--ink-soft); font-size: 11px; line-height: 1.8; }.code-card { overflow: hidden; border: 1px solid #232a43; border-radius: 9px; background: #151b2d; box-shadow: 0 12px 24px rgba(18, 25, 45, .12); }.code-card-head { height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid rgba(255,255,255,.08); }.code-card-head > span { display: flex; gap: 4px; }.code-card-head > span i { width: 6px; height: 6px; border-radius: 50%; background: #f18d88; }.code-card-head > span i:nth-child(2) { background: #f0c776; }.code-card-head > span i:nth-child(3) { background: #83d3a4; }.code-card-head small { color: #7f8ba7; font-family: 'DM Mono', monospace; font-size: 8px; }.code-card-head button { margin-left: auto; padding: 3px; color: #8995b3; background: transparent; }.code-card-head button:hover { color: #fff; }.code-card pre { overflow: auto; padding: 15px 17px 18px; margin: 0; color: #ccd4f1; font-family: 'DM Mono', monospace; font-size: 10px; line-height: 1.85; }.compact-code pre { padding-top: 13px; padding-bottom: 13px; }.docs-callout { display: flex; gap: 12px; padding: 16px; margin-top: 26px; border: 1px solid #ccecef; border-radius: 9px; background: #f2fcfc; }.docs-callout > div { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 29px; border-radius: 8px; color: var(--cyan); background: var(--cyan-light); }.docs-callout p { margin: 0; color: #5e7781; font-size: 10px; line-height: 1.8; }.docs-callout strong { color: #276f7c; }
.ops-metric { min-height: 95px; }.ops-metric div { flex: 1; }.ops-metric strong { font-size: 21px; }.ops-metric .positive, .ops-metric .neutral { font-size: 9px; }.ops-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 15px; margin-bottom: 15px; }.admin-credit-panel, .provider-panel, .ops-log-panel { padding: 22px 23px; }.admin-credit-panel > p { margin: 16px 0 20px; color: var(--ink-faint); font-size: 10px; line-height: 1.75; }.admin-credit-panel .field-label { margin-top: 15px; }.admin-input { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: #a2acba; }.admin-input input { width: 100%; border: 0; color: var(--ink); font-size: 10px; background: transparent; }.admin-input span { color: var(--ink-faint); font-size: 10px; }.admin-credit-panel .button { margin-top: 22px; }.provider-list { margin-top: 18px; }.provider-list > div { display: grid; grid-template-columns: 13px 1fr auto 45px; gap: 9px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0f2f6; }.provider-list > div:last-child { border-bottom: 0; }.provider-health { width: 8px; height: 8px; display: grid; place-items: center; border-radius: 50%; background: #daf4e8; }.provider-health i { width: 4px; height: 4px; border-radius: 50%; background: var(--green); }.provider-health.warning { background: #fff0d9; }.provider-health.warning i { background: var(--orange); }.provider-list > div > div { display: flex; flex-direction: column; gap: 3px; }.provider-list strong { color: var(--ink); font-size: 10px; }.provider-list small, .provider-latency { color: var(--ink-faint); font-size: 8px; }.provider-list b { color: var(--green); font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 500; }.provider-latency { text-align: right; }.ops-log-panel { margin-top: 15px; }.ops-log-list { margin-top: 12px; }.ops-log-list > div { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f0f2f6; }.ops-log-list > div:last-child { border-bottom: 0; }.ops-log-list > div > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 3px; }.ops-log-list strong { color: var(--ink); font-size: 10px; }.ops-log-list small { color: var(--ink-faint); font-size: 9px; }.ops-log-list time { color: #aab3bf; font-size: 9px; }
.modal-backdrop { display: grid; place-items: center; padding: 20px; background: rgba(11,18,32,.42); backdrop-filter: blur(4px); position: fixed; inset: 0; z-index: 60; }.modal-card { width: min(100%, 430px); padding: 25px; border: 1px solid rgba(255,255,255,.55); border-radius: 15px; box-shadow: var(--shadow-lg); background: #fff; animation: modal-in .25s ease; }.modal-head { display: flex; align-items: flex-start; justify-content: space-between; }.modal-head h2 { margin: 6px 0 0; color: var(--ink); font-size: 20px; letter-spacing: -.05em; }.modal-description { margin: 13px 0 22px; color: var(--ink-faint); font-size: 10px; line-height: 1.7; }.modal-input { width: 100%; height: 40px; padding: 0 11px; margin-bottom: 19px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 11px; background: #fbfcfe; }.modal-input:focus { border-color: #bdb3f6; box-shadow: 0 0 0 3px rgba(115,87,242,.08); }.scope-options { display: flex; flex-direction: column; gap: 7px; }.scope-options button { display: flex; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; text-align: left; background: #fff; }.scope-options button.active { border-color: #c4bafa; background: #faf9ff; }.scope-options button > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 3px; }.scope-options strong { color: var(--ink); font-size: 10px; }.scope-options small { color: var(--ink-faint); font-size: 9px; }.scope-options button > svg { color: var(--violet); }.radio-dot { width: 12px; height: 12px; border: 1px solid #ccd3df; border-radius: 50%; position: relative; }.scope-options button.active .radio-dot { border-color: var(--violet); }.scope-options button.active .radio-dot:after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); position: absolute; inset: 2px; }.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding-top: 23px; margin-top: 21px; border-top: 1px solid var(--line); }.secret-modal { text-align: center; }.secret-success { display: inline-flex; flex-direction: column; align-items: center; gap: 9px; color: var(--green); font-size: 11px; font-weight: 700; }.secret-success > div { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 15px; background: var(--green-light); }.secret-modal h2 { margin: 18px 0 7px; font-size: 21px; letter-spacing: -.05em; }.secret-value { display: flex; align-items: center; gap: 7px; padding: 10px 11px; margin: 18px 0 11px; border: 1px dashed #cbc3fa; border-radius: 8px; color: var(--violet); text-align: left; background: #faf9ff; }.secret-value code { overflow: hidden; flex: 1; font-family: 'DM Mono', monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.secret-value button { display: grid; padding: 2px; color: var(--violet); background: transparent; }.secret-warning { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 21px; color: #bc814a; font-size: 9px; }.secret-warning svg { flex: 0 0 16px; }
.toast-message { display: flex; align-items: center; gap: 9px; max-width: min(380px, calc(100vw - 32px)); padding: 11px 13px; border: 1px solid #d8ede4; border-radius: 9px; color: #3b826c; box-shadow: var(--shadow-md); font-size: 10px; font-weight: 700; background: #f5fcf8; position: fixed; right: 26px; bottom: 25px; z-index: 100; }.toast-message > svg { color: var(--green); }.toast-message span { flex: 1; }.toast-message button { display: grid; padding: 1px; color: #7a9a8d; background: transparent; }.toast-enter-active, .toast-leave-active { transition: .25s ease; }.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateY(12px); }
.quick-connect-bar { min-height: 62px; display: flex; align-items: center; gap: 18px; padding: 11px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.quick-connect-title { min-width: 260px; display: flex; align-items: center; gap: 10px; }
.quick-connect-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 9px; color: var(--violet); background: var(--violet-light); }
.quick-connect-title > div:last-child { display: flex; flex-direction: column; gap: 3px; }
.quick-connect-title span { color: var(--ink-faint); font-size: 8px; }
.quick-connect-title strong { color: var(--ink); font-family: 'DM Mono', monospace; font-size: 10px; }
.quick-connect-meta { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.quick-connect-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 5px; color: var(--ink-soft); font-size: 8px; background: #f6f8fb; }
.quick-connect-meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.admin-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 15px; }
.admin-summary-card, .capacity-stat { min-height: 94px; display: flex; align-items: center; gap: 11px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.admin-summary-card > div, .capacity-stat > div { display: flex; flex-direction: column; gap: 3px; }
.admin-summary-card small, .capacity-stat small { color: var(--ink-faint); font-size: 9px; }
.admin-summary-card strong, .capacity-stat strong { color: var(--ink); font-size: 20px; letter-spacing: -.04em; }
.admin-summary-card .positive, .admin-summary-card .neutral, .capacity-stat .positive, .capacity-stat .neutral { font-size: 9px; }
.admin-search { width: 220px; }
.admin-user-table .table-row { grid-template-columns: 1.75fr .85fr .75fr .65fr .75fr .7fr; }
.admin-user-row { width: 100%; padding: 0; color: inherit; text-align: left; background: transparent; }
.admin-user-row:hover { background: #fbfbff; }
.mini-avatar { width: 30px; height: 30px; flex: 0 0 30px; border-width: 1px; }
.role-pill { width: max-content; padding: 5px 7px; border-radius: 5px; color: #6759b5; font-size: 9px; background: #f2efff; }
.admin-balance { color: var(--ink); font-family: 'DM Mono', monospace; font-size: 10px; font-weight: 700; }
.admin-user-drawer { z-index: 45; }
.user-profile-head { display: flex; align-items: center; gap: 11px; padding: 18px 0 22px; }
.large-avatar { width: 48px; height: 48px; flex: 0 0 48px; font-size: 16px; }
.user-profile-head > div:last-child { display: flex; flex-direction: column; gap: 5px; }
.user-profile-head strong { color: var(--ink); font-size: 11px; }
.user-profile-head span { color: var(--ink-faint); font-size: 9px; }
.drawer-actions { display: flex; flex-direction: column; gap: 8px; }
.admin-notice { border-color: #d8eef0; background: #f6fcfc; }
.admin-notice .notice-icon { color: var(--cyan); background: var(--cyan-light); }
.provider-table-panel { padding: 22px 23px; }
.provider-table, .route-table, .queue-table, .pricing-table, .audit-table { margin-top: 18px; }
.provider-table-row { min-height: 62px; display: grid; grid-template-columns: 1.5fr 1fr .45fr .65fr .65fr .7fr 42px; align-items: center; gap: 12px; border-bottom: 1px solid #f0f2f6; }
.provider-table-head, .route-table-head, .queue-table-head, .pricing-table-head, .audit-table-head { min-height: 34px !important; color: #9ca7b7; font-family: 'DM Mono', monospace; font-size: 8px; }
.provider-name { display: flex; align-items: center; gap: 9px; }
.provider-name > div { display: flex; flex-direction: column; gap: 3px; }
.provider-name strong { color: var(--ink); font-size: 10px; }
.provider-name small { color: var(--ink-faint); font-family: 'DM Mono', monospace; font-size: 8px; }
.toggle-switch { width: 36px; height: 20px; padding: 2px; border-radius: 12px; background: #dfe4eb; transition: .2s ease; }
.toggle-switch span { width: 16px; height: 16px; display: block; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(20,30,50,.18); transition: .2s ease; }
.toggle-switch.active { background: var(--violet); }
.toggle-switch.active span { transform: translateX(16px); }
.model-admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 15px; }
.model-admin-card { min-height: 225px; display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.model-admin-card h3 { margin: 16px 0 7px; color: var(--ink); font-size: 13px; }
.model-admin-card > p { min-height: 36px; margin: 0; color: var(--ink-faint); font-size: 9px; line-height: 1.7; }
.model-admin-meta { display: flex; gap: 6px; padding: 13px 0; margin: 13px 0; border-top: 1px solid #f0f2f6; border-bottom: 1px solid #f0f2f6; }
.model-admin-meta span { padding: 4px 6px; border-radius: 5px; color: var(--ink-soft); font-size: 8px; background: #f5f7fa; }
.routing-banner { min-height: 122px; display: flex; align-items: center; gap: 17px; padding: 22px 24px; margin-bottom: 15px; overflow: hidden; border-radius: 13px; color: #fff; background: linear-gradient(110deg, #171d37, #292654); position: relative; }
.routing-banner-orb { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 52px; border: 1px solid rgba(174,162,255,.35); border-radius: 16px; color: #bcb1ff; background: rgba(133,113,242,.17); }
.routing-banner > div:nth-child(2) { flex: 1; }
.routing-banner h3 { margin: 6px 0 5px; color: #fff; font-size: 16px; }
.routing-banner p { margin: 0; color: #98a4c3; font-size: 9px; }
.routing-health { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.routing-health strong { color: #aef0dc; font-size: 25px; letter-spacing: -.05em; }
.routing-health span { color: #8592b2; font-size: 8px; }
.route-table-row { min-height: 66px; display: grid; grid-template-columns: 1.2fr .8fr 1.15fr 1fr .8fr .55fr 42px; align-items: center; gap: 12px; border-bottom: 1px solid #f0f2f6; }
.route-table-row > div:first-child, .queue-table-row > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.route-table-row strong, .queue-table-row strong { color: var(--ink); font-size: 10px; }
.route-table-row small, .queue-table-row small { color: var(--ink-faint); font-family: 'DM Mono', monospace; font-size: 8px; }
.route-channel { color: var(--ink-soft); font-size: 9px; font-weight: 700; }
.capacity-overview { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 13px; margin-bottom: 15px; }
.capacity-ring-card { min-height: 112px; display: flex; align-items: center; gap: 15px; padding: 17px; border: 1px solid #ddd8ff; border-radius: 12px; background: linear-gradient(145deg, #fbfaff, #f5f3ff); }
.capacity-ring { width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; flex-direction: column; flex: 0 0 68px; border: 7px solid #d8d1fb; border-top-color: var(--violet); border-radius: 50%; }
.capacity-ring span { color: var(--ink); font-size: 15px; font-weight: 800; }
.capacity-ring small { color: var(--ink-faint); font-size: 7px; }
.capacity-ring-card > div:last-child h3 { margin: 6px 0 3px; color: var(--ink); font-size: 18px; }
.capacity-ring-card > div:last-child p { margin: 0; color: var(--ink-faint); font-size: 8px; }
.queue-table-row { min-height: 64px; display: grid; grid-template-columns: 1.4fr 1.2fr .7fr .65fr .8fr .8fr; align-items: center; gap: 13px; border-bottom: 1px solid #f0f2f6; }
.queue-meter { display: flex; align-items: center; gap: 8px; }
.queue-meter b { width: 20px; color: var(--ink); font-family: 'DM Mono', monospace; font-size: 9px; }
.queue-count { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; color: #657085; font-family: 'DM Mono', monospace; font-size: 9px; background: #f1f3f7; }
.queue-count.hot { color: #b66f2c; background: var(--orange-light); }
.billing-admin-notice { border-color: #eadff9; background: #fbf8ff; }
.coming-soon-tag { margin-left: auto; padding: 6px 8px; border-radius: 6px; color: #8069d8; font-family: 'DM Mono', monospace; font-size: 8px; background: #eee9ff; }
.billing-admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 15px; }
.billing-admin-metric { min-height: 110px; display: flex; justify-content: center; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.billing-admin-metric span { color: var(--ink-faint); font-size: 9px; }
.billing-admin-metric strong { margin: 7px 0 4px; color: var(--ink); font-size: 22px; letter-spacing: -.05em; }
.billing-admin-metric small { color: var(--green); font-size: 8px; }
.pricing-table-row { min-height: 62px; display: grid; grid-template-columns: 1.1fr 1fr .8fr .8fr 1fr .8fr; align-items: center; gap: 12px; border-bottom: 1px solid #f0f2f6; }
.pricing-table-row strong { color: var(--ink); font-size: 10px; }
.mono-text { font-family: 'DM Mono', monospace; font-size: 9px !important; }
.audit-toolbar { display: flex; align-items: center; gap: 13px; padding: 12px; margin-bottom: 15px; }
.audit-toolbar .admin-search { flex: 1; }
.audit-table-row { min-height: 62px; display: grid; grid-template-columns: 1fr .7fr .9fr 1.35fr .75fr .55fr; align-items: center; gap: 12px; border-bottom: 1px solid #f0f2f6; }
.audit-table-row strong { color: var(--ink); font-size: 9px; }
.audit-actor { color: var(--ink-soft); font-size: 9px; font-weight: 700; }
.audit-level { width: max-content; display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 5px; color: #6a768c; font-size: 8px; background: #f1f3f6; }
.audit-level i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.audit-level.warning { color: #b47537; background: var(--orange-light); }
.audit-level.danger { color: var(--red); background: #fff0f2; }
.settings-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.settings-panel { padding: 22px 23px; }
.settings-heading-icon { color: var(--violet); }
.settings-description { margin: 15px 0 18px; color: var(--ink-faint); font-size: 10px; line-height: 1.7; }
.settings-list { border-top: 1px solid var(--line); }
.settings-row { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #f0f2f6; }
.settings-row > span { display: flex; flex-direction: column; gap: 4px; }
.settings-row strong { color: var(--ink); font-size: 10px; }
.settings-row small { color: var(--ink-faint); font-size: 9px; }
.settings-callout { display: flex; align-items: center; gap: 7px; padding: 10px; margin-top: 18px; border-radius: 7px; color: #a2703d; font-size: 9px; background: var(--orange-light); }
.model-detail-backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(11,18,32,.24); backdrop-filter: blur(2px); }
.model-detail-drawer { width: 410px; padding: 25px; border-left: 1px solid var(--line); box-shadow: -14px 0 45px rgba(22,32,51,.15); background: #fff; position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; animation: drawer-in .25s ease; }
.model-detail-hero { display: flex; align-items: center; gap: 11px; padding: 22px 0 18px; }
.model-detail-hero > div:last-child { display: flex; flex-direction: column; gap: 4px; }
.model-detail-hero span { color: var(--ink-faint); font-size: 9px; }
.model-detail-hero strong { color: var(--ink); font-size: 11px; }
.model-detail-description { margin: 0 0 18px; color: var(--ink-soft); font-size: 11px; line-height: 1.8; }
.model-detail-status { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 14px; border-radius: 9px; background: #f5faf8; }
.model-detail-status strong { color: var(--green); font-size: 18px; }
.model-detail-status small { grid-column: 1 / -1; margin-top: 5px; color: var(--ink-faint); font-size: 8px; }
.model-detail-list { margin-top: 20px; }
.model-detail-callout { display: flex; gap: 8px; padding: 11px; margin-bottom: 20px; border-radius: 8px; color: #64778d; font-size: 9px; line-height: 1.6; background: #f4f7fa; }
.model-detail-callout svg { flex: 0 0 16px; color: var(--cyan); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (max-width: 1180px) {
.page-content { padding-left: 28px; padding-right: 28px; }.topbar { padding: 0 28px; }.hero-model-stack { right: 0; transform: scale(.84); transform-origin: right center; }.metrics-grid { grid-template-columns: repeat(2, 1fr); }.model-preview-grid { grid-template-columns: repeat(2, 1fr); }.model-catalog-grid { grid-template-columns: repeat(2, 1fr); }.task-table .table-row { grid-template-columns: 1.4fr 1fr 1.25fr .85fr .8fr 22px; }
.admin-summary-grid, .capacity-overview { grid-template-columns: repeat(2, 1fr); }
.quick-connect-meta span:nth-child(n+2) { display: none; }
.provider-table-panel, .table-panel { overflow-x: auto; }
.provider-table, .route-table, .queue-table, .pricing-table, .audit-table, .admin-user-table { min-width: 900px; }
}
@media (max-width: 860px) {
.sidebar { width: 248px; flex-basis: 248px; position: fixed; transform: translateX(-100%); transition: transform .25s ease; }.sidebar.is-mobile-open { transform: translateX(0); }.sidebar.is-collapsed { width: 248px; flex-basis: 248px; padding-left: 16px; padding-right: 16px; }.sidebar.is-collapsed .brand-copy, .sidebar.is-collapsed .workspace-switcher, .sidebar.is-collapsed .nav-label, .sidebar.is-collapsed .nav-item span, .sidebar.is-collapsed .credit-mini-card, .sidebar.is-collapsed .collapse-button span { display: flex; }.sidebar.is-collapsed .brand-block { padding-left: 8px; }.sidebar-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(11,18,32,.35); }.mobile-close, .mobile-menu { display: inline-grid; }.mobile-close { margin-left: auto; color: #a7b2c9; }.mobile-menu { margin-right: 9px; }.topbar { height: 64px; padding: 0 18px; }.global-search { width: 190px; }.user-name, .topbar-user > svg { display: none; }.page-content { padding: 29px 18px 55px; }.hero-card { min-height: 435px; padding: 32px 27px; }.hero-model-stack { opacity: .72; right: -64px; top: 155px; transform: scale(.68); }.hero-content { max-width: 74%; }.dashboard-grid, .playground-layout, .usage-layout, .ops-grid { grid-template-columns: 1fr; }.docs-layout { grid-template-columns: 1fr; }.docs-nav { display: none; }.docs-article { max-width: none; padding-left: 0; padding-right: 0; }.task-summary-grid, .ops-metrics { grid-template-columns: repeat(2, 1fr); }.table-panel { overflow-x: auto; }.data-table { min-width: 780px; }.notice-banner, .key-guidance { align-items: flex-start; }.key-guidance .button { margin-left: auto; }.billing-banner { align-items: flex-start; flex-wrap: wrap; }.billing-banner > div:nth-child(2) { min-width: calc(100% - 80px); }.billing-banner .button { margin-left: 72px; }.catalog-toolbar { align-items: stretch; flex-direction: column; }.catalog-search { width: 100%; }
.quick-connect-bar { align-items: flex-start; flex-wrap: wrap; }
.quick-connect-title { flex: 1; }
.quick-connect-meta { display: none; }
.model-admin-grid, .billing-admin-grid, .settings-layout { grid-template-columns: 1fr; }
.audit-toolbar { align-items: stretch; flex-direction: column; }
.audit-toolbar .catalog-search { width: 100%; }
}
@media (max-width: 560px) {
.topbar-actions { gap: 5px; }.global-search { width: 38px; padding: 0 10px; }.global-search input, .global-search kbd { display: none; }.topbar-user { padding-left: 5px; border: 0; }.page-intro, .page-intro.compact-intro { align-items: flex-start; flex-direction: column; gap: 16px; }.intro-actions { width: 100%; }.intro-actions .button { flex: 1; }.hero-card { min-height: 500px; padding: 29px 22px; }.hero-content { max-width: 100%; }.hero-content h2 { font-size: 42px; }.hero-content > p { max-width: 320px; }.hero-actions { flex-direction: column; width: 155px; }.hero-note { gap: 9px; }.hero-model-stack { right: -130px; top: 265px; transform: scale(.66); }.metrics-grid, .model-preview-grid, .model-catalog-grid, .task-summary-grid, .ops-metrics { grid-template-columns: 1fr; }.metric-card { min-height: 112px; }.section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }.usage-panel, .activity-panel, .usage-detail-panel, .ledger-panel, .playground-input, .playground-output, .table-panel, .admin-credit-panel, .provider-panel, .ops-log-panel { padding: 18px 16px; }.bar-chart { gap: 7px; }.playground-input, .playground-output { min-height: 550px; }.run-footer { align-items: flex-start; flex-direction: column; }.run-button { width: 100%; }.billing-banner { padding: 18px; }.billing-banner > div:nth-child(2) { min-width: calc(100% - 70px); }.billing-banner .button { margin-left: 0; }.key-guidance { flex-wrap: wrap; }.key-guidance .button { width: 100%; margin-left: 47px; }.docs-step { grid-template-columns: 1fr; }.step-number { margin-bottom: -3px; }.docs-article-heading h2 { font-size: 24px; }.task-detail-drawer { width: min(355px, 100%); }.toast-message { right: 16px; bottom: 16px; }
.admin-summary-grid, .capacity-overview, .billing-admin-grid { grid-template-columns: 1fr; }
.quick-connect-title { min-width: 100%; }
.quick-connect-bar > .button { width: 100%; }
.model-detail-drawer { width: 100%; }
.routing-banner { align-items: flex-start; flex-wrap: wrap; }
.routing-health { align-items: flex-start; width: 100%; }
.coming-soon-tag { display: none; }
}
@media (max-width: 860px) {
.portal-switch span, .portal-switch > svg:last-child { display: none; }
}
@media (max-width: 560px) {
.portal-switch { padding: 0 8px; }
.topbar-user { display: none; }
.admin-module-placeholder { min-height: 330px; padding: 35px 20px; }
}
/* Authentication readability */
.auth-brand small,.auth-mobile-brand small{color:#9bbbd0;font-size:10px}
.auth-eyebrow{font-size:11px}
.auth-story p{color:#bdcce0;font-size:13px}
.auth-capabilities b{font-size:12px}
.auth-capabilities small{color:#a7bfd2;font-size:10px}
.auth-showcase footer{color:#9bb4c8;font-size:10px}
.auth-invite-badge{font-size:10px}
.auth-card-header p{font-size:12px}
.auth-mode-tabs button{font-size:12px}
.auth-form label>span:first-child{font-size:12px}
.auth-input input{font-size:12px}
.auth-form-options>button{font-size:11px}
.check-row{font-size:11px!important}
.auth-submit{font-size:13px}
.auth-demo-tip{color:#65758a;font-size:10px}
.invite-notice strong{font-size:11px}
.invite-notice small{color:#506f80;font-size:10px}
.register-channel button,.auth-code-row>button{font-size:11px}
.terms-row em{color:#5f6f83;font-size:10px}
.auth-back,.auth-support,.auth-support button{font-size:11px}
.reset-success p{font-size:12px}
.sidebar-brand{height:auto;min-height:50px;margin-bottom:24px}.brand-name strong{font-size:14px}.navigation{min-height:0}
+86
View File
@@ -0,0 +1,86 @@
import type { Component } from 'vue'
export type Portal = 'user' | 'admin'
export type ModelType = '文本' | '多模态' | '图像' | '3D' | '视频' | '音频'
export type CallMode = '同步' | '流式' | '异步'
export type TaskStatus = '排队中' | '执行中' | '已完成' | '失败'
export interface NavItem {
id: string
label: string
icon: Component
badge?: string
}
export interface NavGroup {
label: string
items: NavItem[]
}
export interface ModelItem {
id: string
name: string
provider: string
type: ModelType
mode: CallMode
description: string
latency: string
specification: string
availability: string
accent: string
icon: Component
}
export interface ApiKeyItem {
id: number
name: string
value: string
scope: string
createdAt: string
lastUsed: string
status: '正常' | '已停用'
}
export interface TaskItem {
id: string
name: string
model: string
status: TaskStatus
progress: number
createdAt: string
duration: string
result: string
}
export interface AdminUser {
id: string
name: string
email: string
role: string
balance: number
usage: string
lastActive: string
status: '正常' | '待激活' | '已停用'
}
export interface ProviderItem {
id: string
name: string
capability: string
models: number
latency: string
successRate: string
status: '健康' | '波动' | '维护中'
enabled: boolean
}
export interface RouteItem {
id: string
model: string
capability: string
primary: string
fallback: string
policy: string
health: string
enabled: boolean
}
+167
View File
@@ -0,0 +1,167 @@
<script setup lang="ts">
import { computed, reactive, ref } from 'vue'
import {
Activity,
AlertTriangle,
ArrowRight,
BarChart3,
Box,
Boxes,
Check,
CheckCircle2,
ChevronDown,
CircleDollarSign,
Clock3,
Cloud,
Copy,
Download,
Gauge,
KeyRound,
Network,
Plus,
Search,
Settings2,
ShieldCheck,
SlidersHorizontal,
Timer,
TrendingUp,
Users,
WalletCards,
} from 'lucide-vue-next'
import { initialProviders, initialRoutes, initialUsers, models } from '../data'
import type { AdminUser, ProviderItem, RouteItem } from '../types'
import SlidePanel from '../components/SlidePanel.vue'
import UiModal from '../components/UiModal.vue'
defineProps<{ view: string }>()
const emit = defineEmits<{ navigate: [view: string]; notify: [message: string] }>()
const users = ref<AdminUser[]>(structuredClone(initialUsers))
const providers = ref<ProviderItem[]>(structuredClone(initialProviders))
const routes = ref<RouteItem[]>(structuredClone(initialRoutes))
const userQuery = ref('')
const userStatus = ref('全部')
const selectedUser = ref<AdminUser | null>(null)
const invitationOpen = ref(false)
const inviteEmail = ref('')
const inviteRole = ref('普通用户')
const creditOpen = ref(false)
const creditAmount = ref('100')
const auditQuery = ref('')
const queueProtection = ref(true)
const settings = reactive({ inviteOnly: true, emailSignup: false, phoneSignup: false, automaticCredit: false, maintenanceNotice: true, auditRetention: true })
const filteredUsers = computed(() => {
const query = userQuery.value.trim().toLowerCase()
return users.value.filter((user) => (userStatus.value === '全部' || user.status === userStatus.value) && (!query || `${user.name} ${user.email} ${user.id}`.toLowerCase().includes(query)))
})
const queueGroups = [
{ name: '文本与多模态', type: '同步 / 流式', running: 16, limit: 24, queued: 0, wait: '< 1s', status: '正常' },
{ name: 'AI SoulMate 3D', type: '异步任务', running: 6, limit: 8, queued: 3, wait: '约 48s', status: '接近上限' },
{ name: '图像生成', type: '异步任务', running: 9, limit: 16, queued: 1, wait: '约 12s', status: '正常' },
{ name: '视频生成', type: '异步任务', running: 3, limit: 4, queued: 2, wait: '约 2m', status: '接近上限' },
]
const pricing = [
{ model: 'MOYI Text Pro', unit: '百万 tokens', base: '¥ 8.00', output: '¥ 24.00', rule: '按实际用量', status: '已生效' },
{ model: 'MOYI Vision', unit: '千次调用', base: '¥ 36.00', output: '—', rule: '按调用次数', status: '已生效' },
{ model: 'AI SoulMate 3D', unit: '成功任务', base: '待填写', output: '—', rule: '仅成功扣费', status: '待配置' },
{ model: 'MOYI Motion', unit: '视频秒数', base: '待填写', output: '—', rule: '按结果时长', status: '待配置' },
]
const auditEvents = [
{ time: '今天 09:20:14', actor: '林默', action: '发放用户额度', target: 'usr_1023 · ¥300.00', source: '39.106.*.*', level: '普通' },
{ time: '昨天 18:42:08', actor: '林默', action: '调整模型并发', target: 'AI SoulMate 3D · 6 → 8', source: '39.106.*.*', level: '重要' },
{ time: '昨天 16:40:31', actor: '系统', action: '触发渠道降级', target: '供应商 B · video', source: 'internal', level: '风险' },
{ time: '08-17 14:16:22', actor: '模型运营', action: '更新路由策略', target: 'MOYI Vision · 低延迟优先', source: '10.24.*.*', level: '重要' },
{ time: '08-16 11:08:05', actor: '林默', action: '创建邀请码', target: 'MOYI-BETA-0821', source: '39.106.*.*', level: '普通' },
]
const filteredAudits = computed(() => {
const query = auditQuery.value.trim().toLowerCase()
return query ? auditEvents.filter((event) => `${event.actor} ${event.action} ${event.target}`.toLowerCase().includes(query)) : auditEvents
})
function createInvitation() {
const email = inviteEmail.value.trim()
if (!email.includes('@')) return emit('notify', '请输入有效邮箱地址')
users.value.unshift({ id: `usr_${1025 + users.value.length}`, name: email.split('@')[0], email, role: inviteRole.value, balance: 0, usage: '¥ 0.00', lastActive: '尚未登录', status: '待激活' })
inviteEmail.value = ''
inviteRole.value = '普通用户'
invitationOpen.value = false
emit('notify', '邀请已创建并加入待激活列表')
}
function openCredit(user?: AdminUser) {
if (user) selectedUser.value = user
creditAmount.value = '100'
creditOpen.value = true
}
function grantCredit() {
const amount = Number(creditAmount.value)
if (!selectedUser.value || !Number.isFinite(amount) || amount <= 0) return emit('notify', '请输入有效额度')
selectedUser.value.balance += amount
creditOpen.value = false
emit('notify', `已向 ${selectedUser.value.name} 发放 ${amount.toFixed(2)} 点额度`)
}
</script>
<template>
<div class="page-stack admin-pages">
<template v-if="view === 'admin-overview'">
<section class="page-heading compact"><div><span>ADMIN OVERVIEW</span><h1>管理总览</h1><p>掌握平台供给、用户、容量和风险状态。</p></div><div class="heading-actions"><span class="health-badge"><i></i>核心服务正常</span><button class="button secondary" @click="emit('notify', '数据已刷新')"><Activity :size="16" />刷新数据</button></div></section>
<section class="metric-grid"><article class="metric-card"><span class="icon-tile violet"><Users :size="18" /></span><div><small>内测用户</small><strong>48</strong><em class="positive"><TrendingUp :size="13" />本周 +6</em></div></article><article class="metric-card"><span class="icon-tile cyan"><Cloud :size="18" /></span><div><small>在线模型</small><strong>12</strong><em class="positive">100% 可用</em></div></article><article class="metric-card"><span class="icon-tile orange"><Gauge :size="18" /></span><div><small>等待任务</small><strong>6</strong><em>峰值 18</em></div></article><article class="metric-card"><span class="icon-tile green"><CircleDollarSign :size="18" /></span><div><small>今日额度消耗</small><strong>¥ 42.80</strong><em class="positive">低于预期</em></div></article></section>
<section class="two-column equal"><article class="panel chart-panel"><header class="panel-header"><div><span>PLATFORM TRAFFIC</span><h3>平台请求趋势</h3></div><button class="select-button">最近 7 天<ChevronDown :size="14" /></button></header><div class="chart-summary"><strong>62,481</strong><span class="positive">+16.2%</span></div><div class="bar-chart"><div v-for="(height, index) in [46,65,58,82,74,50,92]" :key="index"><i :style="{ height: `${height}%` }"></i><span>{{ ['一','二','三','四','五','六','日'][index] }}</span></div></div></article><article class="panel health-panel"><header class="panel-header"><div><span>GATEWAY HEALTH</span><h3>模型供给状态</h3></div><button class="text-link" @click="emit('navigate', 'admin-models')">管理供应商<ArrowRight :size="14" /></button></header><div class="health-list"><div v-for="provider in providers.slice(0, 3)" :key="provider.id"><span class="provider-mark">{{ provider.name.slice(0, 1) }}</span><p><strong>{{ provider.name }}</strong><small>{{ provider.capability }} · {{ provider.latency }}</small></p><b>{{ provider.successRate }}</b><span class="status-chip" :class="provider.status === '健康' ? 'success' : 'warning'"><i></i>{{ provider.status }}</span></div></div></article></section>
<section class="two-column narrow-left"><article class="panel quick-credit"><header class="panel-header"><div><span>CREDIT OPERATIONS</span><h3>快速发放额度</h3></div><ShieldCheck :size="18" /></header><p>从用户列表选择账号后发放内测额度,操作将写入审计日志。</p><button class="button primary full" @click="emit('navigate', 'admin-users')"><Users :size="16" />选择用户</button></article><article class="panel activity-panel"><header class="panel-header"><div><span>RECENT EVENTS</span><h3>最近运营事件</h3></div><button class="text-link" @click="emit('navigate', 'admin-audit')">审计日志<ArrowRight :size="14" /></button></header><div class="activity-list"><div><span class="activity-dot green"><Check :size="14" /></span><p><strong>额度发放完成</strong><small>林默向 AI SoulMate 服务发放 ¥300.00</small></p><time>今天 09:20</time></div><div><span class="activity-dot cyan"><SlidersHorizontal :size="14" /></span><p><strong>模型路由更新</strong><small>MOYI Vision 调整为低延迟优先</small></p><time>昨天 18:42</time></div><div><span class="activity-dot orange"><AlertTriangle :size="14" /></span><p><strong>队列容量提醒</strong><small>AI SoulMate 3D 接近并发上限</small></p><time>昨天 16:40</time></div></div></article></section>
</template>
<template v-else-if="view === 'admin-users'">
<section class="page-heading"><div><span>USERS & CREDITS</span><h1>用户与额度</h1><p>管理邀请、账号状态、角色和内测额度。</p></div><button class="button primary" @click="invitationOpen = true"><Plus :size="16" />创建邀请</button></section>
<section class="metric-grid"><article class="metric-card"><span class="icon-tile violet"><Users :size="18" /></span><div><small>用户总数</small><strong>{{ users.length }}</strong><em class="positive">本周 +6</em></div></article><article class="metric-card"><span class="icon-tile cyan"><CheckCircle2 :size="18" /></span><div><small>正常用户</small><strong>{{ users.filter((user) => user.status === '正常').length }}</strong><em class="positive">98.1%</em></div></article><article class="metric-card"><span class="icon-tile orange"><CircleDollarSign :size="18" /></span><div><small>已发放额度</small><strong>¥ 8,420</strong><em>本周期</em></div></article><article class="metric-card"><span class="icon-tile green"><Activity :size="18" /></span><div><small>今日活跃</small><strong>24</strong><em class="positive">+12.4%</em></div></article></section>
<section class="panel table-card"><header class="panel-header table-toolbar"><div><span>USER DIRECTORY</span><h3>用户列表</h3></div><div class="toolbar-controls"><label class="search-input"><Search :size="16" /><input v-model="userQuery" placeholder="搜索姓名、邮箱或 ID" /></label><div class="tabs compact"><button v-for="status in ['全部','正常','待激活','已停用']" :key="status" :class="{ active: userStatus === status }" @click="userStatus = status">{{ status }}</button></div></div></header><div class="responsive-table"><table class="user-table"><thead><tr><th>用户</th><th>角色</th><th>额度余额</th><th>累计用量</th><th>最近活跃</th><th>状态</th></tr></thead><tbody><tr v-for="user in filteredUsers" :key="user.id" class="clickable" @click="selectedUser = user"><td><div class="entity-cell"><span class="avatar-small">{{ user.name.slice(0, 1) }}</span><div><strong>{{ user.name }}</strong><small>{{ user.email }} · {{ user.id }}</small></div></div></td><td><span class="role-tag">{{ user.role }}</span></td><td><strong class="mono">¥ {{ user.balance.toFixed(2) }}</strong></td><td>{{ user.usage }}</td><td>{{ user.lastActive }}</td><td><span class="status-chip" :class="user.status === '正常' ? 'success' : user.status === '待激活' ? 'queued' : 'muted'"><i></i>{{ user.status }}</span></td></tr></tbody></table></div></section>
</template>
<template v-else-if="view === 'admin-models'">
<section class="page-heading"><div><span>MODELS & PROVIDERS</span><h1>模型与供应商</h1><p>配置统一模型目录、能力信息和上游渠道。</p></div><button class="button primary" @click="emit('notify', '添加模型表单将在接入真实后端后开放')"><Plus :size="16" />添加模型</button></section>
<section class="notice"><Cloud :size="19" /><div><strong>模型目录与上游渠道解耦</strong><p>用户只看到统一模型名称,供应商密钥、实际渠道和故障转移策略仅在管理端可见。</p></div></section>
<section class="panel table-card"><header class="panel-header"><div><span>PROVIDERS</span><h3>供应商渠道</h3></div><small>{{ providers.length }} 个供应商</small></header><div class="responsive-table"><table><thead><tr><th>供应商</th><th>覆盖能力</th><th>模型数</th><th>延迟</th><th>成功率</th><th>状态</th><th>启用</th></tr></thead><tbody><tr v-for="provider in providers" :key="provider.id"><td><div class="entity-cell"><span class="provider-mark">{{ provider.name.slice(0, 1) }}</span><div><strong>{{ provider.name }}</strong><small>{{ provider.id }}</small></div></div></td><td>{{ provider.capability }}</td><td>{{ provider.models }}</td><td>{{ provider.latency }}</td><td><strong class="positive">{{ provider.successRate }}</strong></td><td><span class="status-chip" :class="provider.status === '健康' ? 'success' : provider.status === '波动' ? 'warning' : 'muted'"><i></i>{{ provider.status }}</span></td><td><button class="switch" :class="{ active: provider.enabled }" @click="provider.enabled = !provider.enabled; emit('notify', `${provider.name} 已${provider.enabled ? '启用' : '停用'}`)"><span></span></button></td></tr></tbody></table></div></section>
<section class="section-title"><div><span>MODEL DIRECTORY</span><h2>统一模型目录</h2></div><button class="text-link" @click="emit('notify', '能力 Schema 文档将在详细设计阶段开放')">能力 Schema<ArrowRight :size="14" /></button></section>
<section class="admin-model-grid"><article v-for="model in models" :key="model.id"><div><span class="model-icon" :class="model.accent"><component :is="model.icon" :size="20" /></span><span class="status-chip success"><i></i>已上线</span></div><h3>{{ model.name }}</h3><p>{{ model.description }}</p><footer><span>{{ model.type }}</span><span>{{ model.mode }}</span><span>{{ model.availability }}</span></footer></article></section>
</template>
<template v-else-if="view === 'admin-routing'">
<section class="page-heading"><div><span>CHANNEL ROUTING</span><h1>渠道与路由</h1><p>管理渠道优先级、故障转移和模型映射。</p></div><div class="heading-actions"><span class="health-badge"><i></i>路由服务正常</span><button class="button secondary" @click="emit('notify', '路由模拟器将在下一轮开放')"><SlidersHorizontal :size="16" />模拟路由</button></div></section>
<section class="routing-hero"><span class="icon-tile light"><Network :size="22" /></span><div><small>SMART ROUTING</small><h2>按质量、速度、价格和可用性分配请求</h2><p>当前启用 4 条模型路由,故障时自动重试并切换备用渠道。</p></div><div><strong>99.96%</strong><span>路由成功率</span></div></section>
<section class="panel table-card"><header class="panel-header"><div><span>ROUTING POLICIES</span><h3>模型到渠道映射</h3></div><button class="text-link" @click="emit('notify', '批量编辑将在详细设计阶段开放')">批量编辑<ArrowRight :size="14" /></button></header><div class="responsive-table"><table class="routing-table"><thead><tr><th>模型</th><th>能力</th><th>主渠道</th><th>备用渠道</th><th>策略</th><th>健康</th><th>状态</th></tr></thead><tbody><tr v-for="route in routes" :key="route.id"><td><div class="stacked-cell"><strong>{{ route.model }}</strong><small>{{ route.id }}</small></div></td><td>{{ route.capability }}</td><td><strong>{{ route.primary }}</strong></td><td>{{ route.fallback }}</td><td><span class="role-tag">{{ route.policy }}</span></td><td><strong class="positive">{{ route.health }}</strong></td><td><button class="switch" :class="{ active: route.enabled }" @click="route.enabled = !route.enabled; emit('notify', `${route.model} 路由已${route.enabled ? '启用' : '暂停'}`)"><span></span></button></td></tr></tbody></table></div></section>
</template>
<template v-else-if="view === 'admin-capacity'">
<section class="page-heading"><div><span>CAPACITY CONTROL</span><h1>并发与队列</h1><p>查看实时并发、排队状态和容量保护。</p></div><div class="heading-actions"><span class="admin-badge"><ShieldCheck :size="15" />保护策略{{ queueProtection ? '已开启' : '已关闭' }}</span><button class="button secondary" @click="queueProtection = !queueProtection; emit('notify', `队列保护已${queueProtection ? '开启' : '关闭'}`)">{{ queueProtection ? '暂停保护' : '开启保护' }}</button></div></section>
<section class="capacity-grid"><article class="capacity-main"><div class="capacity-ring"><strong>68%</strong><span>总并发</span></div><div><small>REALTIME CAPACITY</small><h2>34 / 52</h2><p>正在运行的请求和异步任务</p></div></article><article class="metric-card"><span class="icon-tile orange"><Clock3 :size="18" /></span><div><small>等待任务</small><strong>6</strong><em>峰值 18</em></div></article><article class="metric-card"><span class="icon-tile cyan"><Timer :size="18" /></span><div><small>平均等待</small><strong>42s</strong><em class="positive">-12%</em></div></article><article class="metric-card"><span class="icon-tile green"><CheckCircle2 :size="18" /></span><div><small>调度成功率</small><strong>99.94%</strong><em class="positive">稳定</em></div></article></section>
<section class="panel table-card"><header class="panel-header"><div><span>CAPACITY GROUPS</span><h3>并发与排队状态</h3></div><button class="select-button">最近 15 分钟<ChevronDown :size="14" /></button></header><div class="responsive-table"><table><thead><tr><th>资源组</th><th>运行中</th><th>并发上限</th><th>排队数</th><th>预计等待</th><th>状态</th></tr></thead><tbody><tr v-for="group in queueGroups" :key="group.name"><td><div class="stacked-cell"><strong>{{ group.name }}</strong><small>{{ group.type }}</small></div></td><td><div class="table-progress"><span><i :style="{ width: `${group.running / group.limit * 100}%` }"></i></span><strong>{{ group.running }}</strong></div></td><td>{{ group.limit }}</td><td><span class="queue-number" :class="{ hot: group.queued > 1 }">{{ group.queued }}</span></td><td>{{ group.wait }}</td><td><span class="status-chip" :class="group.status === '正常' ? 'success' : 'warning'"><i></i>{{ group.status }}</span></td></tr></tbody></table></div></section>
</template>
<template v-else-if="view === 'admin-billing'">
<section class="page-heading"><div><span>BILLING OPERATIONS</span><h1>计费配置</h1><p>维护模型计费单位、价格和扣费规则。</p></div><button class="button secondary" @click="emit('notify', '真实充值和订单流程将在商业规则确认后开放')"><WalletCards :size="16" />支付能力预留</button></section>
<section class="notice warning-notice"><AlertTriangle :size="19" /><div><strong>当前仍采用管理员发放额度</strong><p>充值、订单和退款尚未启用。下面的价格目录只用于验证计费结构,不会产生真实支付。</p></div></section>
<section class="metric-grid three"><article class="metric-card"><span class="icon-tile violet"><CircleDollarSign :size="18" /></span><div><small>本期额度发放</small><strong>¥ 8,420</strong><em class="positive">+16.8%</em></div></article><article class="metric-card"><span class="icon-tile cyan"><BarChart3 :size="18" /></span><div><small>本期实际消耗</small><strong>¥ 1,824.60</strong><em>覆盖 6 类模型</em></div></article><article class="metric-card"><span class="icon-tile orange"><WalletCards :size="18" /></span><div><small>待对账流水</small><strong>¥ 0.00</strong><em>支付尚未开放</em></div></article></section>
<section class="panel table-card"><header class="panel-header"><div><span>PRICE CATALOG</span><h3>模型计费规则</h3></div><button class="button secondary small" @click="emit('notify', '批量导入将在规则确认后开放')"><Plus :size="15" />添加规则</button></header><div class="responsive-table"><table><thead><tr><th>模型</th><th>计费单位</th><th>输入 / 基础</th><th>输出 / 结果</th><th>扣费规则</th><th>状态</th></tr></thead><tbody><tr v-for="item in pricing" :key="item.model"><td><strong>{{ item.model }}</strong></td><td>{{ item.unit }}</td><td><code>{{ item.base }}</code></td><td><code>{{ item.output }}</code></td><td>{{ item.rule }}</td><td><span class="status-chip" :class="item.status === '已生效' ? 'success' : 'queued'"><i></i>{{ item.status }}</span></td></tr></tbody></table></div></section>
</template>
<template v-else-if="view === 'admin-audit'">
<section class="page-heading"><div><span>AUDIT LOGS</span><h1>日志与审计</h1><p>追踪运营操作、平台事件和高风险变更。</p></div><button class="button secondary" @click="emit('notify', '审计日志导出任务已创建')"><Download :size="16" />导出日志</button></section>
<section class="filter-bar audit-filter"><label class="search-input"><Search :size="16" /><input v-model="auditQuery" placeholder="搜索操作人、动作或目标" /></label><div class="tabs"><button class="active">全部事件</button><button>管理员操作</button><button>风险事件</button></div><button class="select-button">最近 7 天<ChevronDown :size="14" /></button></section>
<section class="panel table-card"><header class="panel-header"><div><span>IMMUTABLE RECORDS</span><h3>运营事件</h3></div><small>{{ filteredAudits.length }} 条记录</small></header><div class="responsive-table"><table class="audit-table"><thead><tr><th>时间</th><th>操作人</th><th>动作</th><th>目标</th><th>来源</th><th>级别</th></tr></thead><tbody><tr v-for="event in filteredAudits" :key="`${event.time}-${event.action}`"><td><code>{{ event.time }}</code></td><td>{{ event.actor }}</td><td><strong>{{ event.action }}</strong></td><td>{{ event.target }}</td><td><code>{{ event.source }}</code></td><td><span class="risk-tag" :class="event.level"><i></i>{{ event.level }}</span></td></tr></tbody></table></div></section>
</template>
<template v-else>
<section class="page-heading"><div><span>PLATFORM SETTINGS</span><h1>平台设置</h1><p>管理注册策略、内测规则和平台级配置。</p></div><button class="button primary" @click="emit('notify', '平台设置已保存并记录审计日志')"><Check :size="16" />保存设置</button></section>
<section class="settings-grid"><article class="panel settings-card"><header class="panel-header"><div><span>ACCESS CONTROL</span><h3>用户注册策略</h3></div><KeyRound :size="18" /></header><p>第一版通过邀请码控制用户规模,手机号和邮箱公开注册保留开关。</p><div class="setting-list"><div><span><strong>邀请码注册</strong><small>只有获得邀请码的用户可以创建账号</small></span><button class="switch" :class="{ active: settings.inviteOnly }" @click="settings.inviteOnly = !settings.inviteOnly"><span></span></button></div><div><span><strong>邮箱公开注册</strong><small>通过邮箱验证码公开注册</small></span><button class="switch" :class="{ active: settings.emailSignup }" @click="settings.emailSignup = !settings.emailSignup"><span></span></button></div><div><span><strong>手机号公开注册</strong><small>地区与短信服务确认后开放</small></span><button class="switch" :class="{ active: settings.phoneSignup }" @click="settings.phoneSignup = !settings.phoneSignup"><span></span></button></div></div></article><article class="panel settings-card"><header class="panel-header"><div><span>OPERATIONS</span><h3>内测运营策略</h3></div><Settings2 :size="18" /></header><p>配置新用户额度、维护公告和操作审计。</p><div class="setting-list"><div><span><strong>新用户自动发放额度</strong><small>关闭后由管理员手动发放</small></span><button class="switch" :class="{ active: settings.automaticCredit }" @click="settings.automaticCredit = !settings.automaticCredit"><span></span></button></div><div><span><strong>显示维护公告</strong><small>在用户端显示服务状态提示</small></span><button class="switch" :class="{ active: settings.maintenanceNotice }" @click="settings.maintenanceNotice = !settings.maintenanceNotice"><span></span></button></div><div><span><strong>保留操作审计</strong><small>敏感设置变更必须留痕</small></span><button class="switch" :class="{ active: settings.auditRetention }" @click="settings.auditRetention = !settings.auditRetention"><span></span></button></div></div></article></section>
</template>
<SlidePanel v-if="selectedUser" :title="selectedUser.name" eyebrow="USER DETAILS" @close="selectedUser = null"><div class="user-profile"><span class="avatar-large">{{ selectedUser.name.slice(0, 1) }}</span><div><strong>{{ selectedUser.email }}</strong><small>{{ selectedUser.role }} · {{ selectedUser.status }}</small></div></div><dl class="detail-list"><div><dt>用户 ID</dt><dd><code>{{ selectedUser.id }}</code><Copy :size="14" /></dd></div><div><dt>额度余额</dt><dd>¥ {{ selectedUser.balance.toFixed(2) }}</dd></div><div><dt>累计用量</dt><dd>{{ selectedUser.usage }}</dd></div><div><dt>最近活跃</dt><dd>{{ selectedUser.lastActive }}</dd></div></dl><template #footer><button class="button primary full" @click="openCredit(selectedUser)"><CircleDollarSign :size="16" />发放额度</button><button class="button secondary full" @click="emit('notify', '用户状态操作已记录')"><ShieldCheck :size="16" />{{ selectedUser.status === '已停用' ? '重新启用' : '停用用户' }}</button></template></SlidePanel>
<UiModal v-if="invitationOpen" title="创建用户邀请" eyebrow="NEW INVITATION" @close="invitationOpen = false"><p class="modal-description">邀请创建后,账号进入待激活状态;额度由管理员单独发放。</p><label class="form-label">用户邮箱</label><input v-model="inviteEmail" class="text-input" placeholder="developer@example.com" /><label class="form-label">初始角色</label><div class="option-list"><button v-for="role in ['普通用户','平台运营','模型运营']" :key="role" :class="{ active: inviteRole === role }" @click="inviteRole = role"><span><i></i><strong>{{ role }}</strong></span><Check v-if="inviteRole === role" :size="16" /></button></div><template #footer><button class="button secondary" @click="invitationOpen = false">取消</button><button class="button primary" @click="createInvitation"><Plus :size="16" />创建邀请</button></template></UiModal>
<UiModal v-if="creditOpen" title="发放测试额度" eyebrow="CREDIT OPERATIONS" @close="creditOpen = false"><p class="modal-description">向 {{ selectedUser?.name }} 发放额度。本操作会写入审计日志。</p><label class="form-label">发放额度</label><div class="input-with-prefix"><CircleDollarSign :size="16" /><input v-model="creditAmount" type="number" min="1" /><span>点</span></div><template #footer><button class="button secondary" @click="creditOpen = false">取消</button><button class="button primary" @click="grantCredit"><CircleDollarSign :size="16" />确认发放</button></template></UiModal>
</div>
</template>
+184
View File
@@ -0,0 +1,184 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import {
ArrowLeft,
ArrowRight,
Box,
Check,
CheckCircle2,
Eye,
EyeOff,
KeyRound,
LockKeyhole,
Mail,
Phone,
ShieldCheck,
Sparkles,
Zap,
} from 'lucide-vue-next'
type AuthMode = 'login' | 'register' | 'forgot'
type RegisterChannel = 'email' | 'phone'
const emit = defineEmits<{
success: [name: string]
notify: [message: string]
}>()
const mode = ref<AuthMode>('login')
const registerChannel = ref<RegisterChannel>('email')
const account = ref('demo@moyi.ai')
const password = ref('moyi-demo')
const confirmPassword = ref('')
const verificationCode = ref('')
const invitationCode = ref('')
const rememberMe = ref(true)
const agreeTerms = ref(false)
const showPassword = ref(false)
const showConfirmPassword = ref(false)
const loading = ref(false)
const codeSent = ref(false)
const codeCountdown = ref(0)
const resetSent = ref(false)
const accountLabel = computed(() => registerChannel.value === 'email' ? '邮箱地址' : '手机号码')
const accountPlaceholder = computed(() => registerChannel.value === 'email' ? 'name@company.com' : '请输入手机号码')
function switchMode(nextMode: AuthMode) {
mode.value = nextMode
resetSent.value = false
}
function sendCode() {
if (!account.value.trim()) return emit('notify', `请先输入${accountLabel.value}`)
if (codeCountdown.value > 0) return
codeSent.value = true
codeCountdown.value = 60
const timer = window.setInterval(() => {
codeCountdown.value -= 1
if (codeCountdown.value <= 0) window.clearInterval(timer)
}, 1000)
emit('notify', '验证码已发送,原型阶段可输入任意 6 位数字')
}
function submitLogin() {
if (!account.value.trim() || !password.value) return emit('notify', '请输入账号和密码')
loading.value = true
window.setTimeout(() => {
loading.value = false
emit('success', '林默')
}, 650)
}
function submitRegister() {
if (!invitationCode.value.trim()) return emit('notify', '第一版内测需要填写邀请码')
if (!account.value.trim()) return emit('notify', `请输入${accountLabel.value}`)
if (verificationCode.value.trim().length < 4) return emit('notify', '请输入收到的验证码')
if (password.value.length < 8) return emit('notify', '密码至少需要 8 位')
if (password.value !== confirmPassword.value) return emit('notify', '两次输入的密码不一致')
if (!agreeTerms.value) return emit('notify', '请先同意服务协议与隐私政策')
loading.value = true
window.setTimeout(() => {
loading.value = false
switchMode('login')
emit('notify', '注册成功,请使用新账号登录')
}, 700)
}
function submitReset() {
if (!account.value.trim()) return emit('notify', '请输入注册邮箱')
loading.value = true
window.setTimeout(() => {
loading.value = false
resetSent.value = true
}, 600)
}
</script>
<template>
<main class="auth-page">
<section class="auth-showcase">
<div class="auth-brand">
<span class="auth-brand-mark"><img src="/assets/moyi-logo-mark.png" alt="模亦灵枢 Logo" /></span>
<div><strong>模亦灵枢</strong><small>MOYI MODEL INTELLIGENCE HUB</small></div>
</div>
<div class="auth-story">
<span class="auth-eyebrow"><Sparkles :size="14" /> ONE GATEWAY · EVERY MODEL</span>
<h1>一处接入,<br /><em>连接多模。</em></h1>
<p>统一调用文本、图像、音频、视频与生成式 3D 模型,让每一种智能能力都拥有清晰、稳定的入口。</p>
<div class="auth-capabilities">
<span><Zap :size="16" /><b>统一网关</b><small>标准 API 接入</small></span>
<span><Box :size="16" /><b>多模能力</b><small>包含 AI 生成 3D</small></span>
<span><ShieldCheck :size="16" /><b>安全可控</b><small>额度与权限隔离</small></span>
</div>
</div>
<div class="auth-logo-visual" aria-hidden="true">
<i class="auth-orbit orbit-a"></i><i class="auth-orbit orbit-b"></i>
<img src="/assets/moyi-logo.png" alt="" />
</div>
<footer><span><i></i>服务状态正常</span><small>© 2026 模翎科技</small></footer>
</section>
<section class="auth-form-area">
<div class="auth-mobile-brand">
<img src="/assets/moyi-logo-mark.png" alt="模亦灵枢 Logo" />
<div><strong>模亦灵枢</strong><small>MODEL INTELLIGENCE HUB</small></div>
</div>
<article class="auth-card">
<template v-if="mode !== 'forgot'">
<div class="auth-card-header">
<span v-if="mode === 'register'" class="auth-invite-badge"><KeyRound :size="13" />邀请内测</span>
<h2>{{ mode === 'login' ? '欢迎回来' : '创建你的账户' }}</h2>
<p>{{ mode === 'login' ? '登录后进入模亦灵枢工作台' : '当前版本使用邀请码开放注册' }}</p>
</div>
<div class="auth-mode-tabs">
<button :class="{ active: mode === 'login' }" @click="switchMode('login')">登录</button>
<button :class="{ active: mode === 'register' }" @click="switchMode('register')">注册</button>
</div>
<form v-if="mode === 'login'" class="auth-form" @submit.prevent="submitLogin">
<label><span>邮箱或手机号</span><div class="auth-input"><Mail :size="17" /><input v-model="account" autocomplete="username" placeholder="请输入邮箱或手机号" /></div></label>
<label><span>登录密码</span><div class="auth-input"><LockKeyhole :size="17" /><input v-model="password" :type="showPassword ? 'text' : 'password'" autocomplete="current-password" placeholder="请输入密码" /><button type="button" aria-label="显示或隐藏密码" @click="showPassword = !showPassword"><EyeOff v-if="showPassword" :size="17" /><Eye v-else :size="17" /></button></div></label>
<div class="auth-form-options"><label class="check-row"><input v-model="rememberMe" type="checkbox" /><span><Check :size="11" /></span>记住我</label><button type="button" @click="switchMode('forgot')">忘记密码?</button></div>
<button class="auth-submit" type="submit" :disabled="loading"><span v-if="loading" class="spinner"></span><template v-else>进入工作台<ArrowRight :size="17" /></template></button>
<p class="auth-demo-tip"><ShieldCheck :size="14" />原型演示账号已预填,可直接登录</p>
</form>
<form v-else class="auth-form register-form" @submit.prevent="submitRegister">
<div class="invite-notice"><KeyRound :size="17" /><div><strong>邀请码注册</strong><small>公开注册将在后续阶段开放,当前内测用户需由管理员邀请。</small></div></div>
<label><span>邀请码</span><div class="auth-input"><KeyRound :size="17" /><input v-model="invitationCode" placeholder="请输入管理员提供的邀请码" /></div></label>
<div class="register-channel"><button type="button" :class="{ active: registerChannel === 'email' }" @click="registerChannel = 'email'"><Mail :size="15" />邮箱注册</button><button type="button" :class="{ active: registerChannel === 'phone' }" @click="registerChannel = 'phone'"><Phone :size="15" />手机号注册</button></div>
<label><span>{{ accountLabel }}</span><div class="auth-input"><component :is="registerChannel === 'email' ? Mail : Phone" :size="17" /><input v-model="account" :placeholder="accountPlaceholder" /></div></label>
<label><span>验证码</span><div class="auth-code-row"><div class="auth-input"><ShieldCheck :size="17" /><input v-model="verificationCode" maxlength="6" placeholder="6 位验证码" /></div><button type="button" :class="{ sent: codeSent }" @click="sendCode">{{ codeCountdown > 0 ? `${codeCountdown}s 后重发` : codeSent ? '重新发送' : '获取验证码' }}</button></div></label>
<label><span>设置密码</span><div class="auth-input"><LockKeyhole :size="17" /><input v-model="password" :type="showPassword ? 'text' : 'password'" autocomplete="new-password" placeholder="至少 8 位字符" /><button type="button" @click="showPassword = !showPassword"><EyeOff v-if="showPassword" :size="17" /><Eye v-else :size="17" /></button></div></label>
<label><span>确认密码</span><div class="auth-input"><LockKeyhole :size="17" /><input v-model="confirmPassword" :type="showConfirmPassword ? 'text' : 'password'" autocomplete="new-password" placeholder="再次输入密码" /><button type="button" @click="showConfirmPassword = !showConfirmPassword"><EyeOff v-if="showConfirmPassword" :size="17" /><Eye v-else :size="17" /></button></div></label>
<label class="check-row terms-row"><input v-model="agreeTerms" type="checkbox" /><span><Check :size="11" /></span><em>我已阅读并同意<a href="#" @click.prevent="emit('notify', '服务协议将在正式上线前补充')">《服务协议》</a>与<a href="#" @click.prevent="emit('notify', '隐私政策将在正式上线前补充')">《隐私政策》</a></em></label>
<button class="auth-submit" type="submit" :disabled="loading"><span v-if="loading" class="spinner"></span><template v-else>创建账户<ArrowRight :size="17" /></template></button>
</form>
</template>
<template v-else>
<button class="auth-back" @click="switchMode('login')"><ArrowLeft :size="16" />返回登录</button>
<div v-if="!resetSent" class="auth-card-header reset-header">
<span class="reset-icon"><LockKeyhole :size="22" /></span>
<h2>重置密码</h2>
<p>输入注册邮箱,我们会向你发送密码重置链接。</p>
</div>
<div v-else class="reset-success">
<span><CheckCircle2 :size="27" /></span><h2>邮件已发送</h2><p>请检查 <strong>{{ account }}</strong> 的收件箱,并按邮件指引重置密码。</p><button class="auth-submit" @click="switchMode('login')">返回登录<ArrowRight :size="17" /></button>
</div>
<form v-if="!resetSent" class="auth-form" @submit.prevent="submitReset">
<label><span>注册邮箱</span><div class="auth-input"><Mail :size="17" /><input v-model="account" type="email" autocomplete="email" placeholder="name@company.com" /></div></label>
<button class="auth-submit" type="submit" :disabled="loading"><span v-if="loading" class="spinner"></span><template v-else>发送重置邮件<ArrowRight :size="17" /></template></button>
</form>
</template>
</article>
<p class="auth-support">登录遇到问题?<button @click="emit('notify', '支持渠道将在正式上线前配置')">联系平台支持</button></p>
</section>
</main>
</template>
+195
View File
@@ -0,0 +1,195 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import {
Activity,
ArrowRight,
BarChart3,
BookOpen,
Box,
Check,
CheckCircle2,
ChevronDown,
CircleDollarSign,
Clock3,
Code2,
Copy,
Download,
Eye,
EyeOff,
FileClock,
Gauge,
Info,
KeyRound,
Layers3,
ListFilter,
Play,
Plus,
RefreshCcw,
Search,
ShieldCheck,
Sparkles,
Terminal,
Timer,
TrendingUp,
WalletCards,
Zap,
} from 'lucide-vue-next'
import { initialKeys, initialTasks, models } from '../data'
import type { ApiKeyItem, CallMode, ModelItem, ModelType, TaskItem, TaskStatus } from '../types'
import SlidePanel from '../components/SlidePanel.vue'
import UiModal from '../components/UiModal.vue'
defineProps<{ view: string }>()
const emit = defineEmits<{ navigate: [view: string]; notify: [message: string] }>()
const modelQuery = ref('')
const modelType = ref<'全部' | ModelType>('全部')
const selectedModel = ref<ModelItem | null>(null)
const activeModel = ref(models[0])
const callMode = ref<CallMode>('流式')
const prompt = ref('请为一个面向创意团队的 AI 工作台写一段简洁、有未来感的产品介绍。')
const running = ref(false)
const response = ref('')
const keys = ref<ApiKeyItem[]>(structuredClone(initialKeys))
const tasks = ref<TaskItem[]>(structuredClone(initialTasks))
const taskFilter = ref<'全部' | TaskStatus>('全部')
const selectedTask = ref<TaskItem | null>(null)
const createKeyOpen = ref(false)
const secretOpen = ref(false)
const keyName = ref('')
const keyScope = ref('全部模型')
const createdSecret = ref('')
const revealSecret = ref(false)
const filteredModels = computed(() => {
const query = modelQuery.value.trim().toLowerCase()
return models.filter((model) => (modelType.value === '全部' || model.type === modelType.value) && (!query || `${model.name} ${model.description} ${model.provider}`.toLowerCase().includes(query)))
})
const filteredTasks = computed(() => taskFilter.value === '全部' ? tasks.value : tasks.value.filter((task) => task.status === taskFilter.value))
const modelTypes: Array<'全部' | ModelType> = ['全部', '文本', '多模态', '图像', '3D', '视频', '音频']
async function copy(value: string, label: string) {
try {
await navigator.clipboard.writeText(value)
emit('notify', `${label}已复制`)
} catch {
emit('notify', `请手动复制${label}`)
}
}
function tryModel(model: ModelItem) {
activeModel.value = model
callMode.value = model.mode
selectedModel.value = null
response.value = ''
emit('navigate', 'playground')
}
function runModel() {
if (!prompt.value.trim()) return emit('notify', '请先输入调用内容')
if (running.value) return
running.value = true
response.value = ''
window.setTimeout(() => {
running.value = false
if (callMode.value === '异步') {
const task: TaskItem = { id: `task_${Date.now().toString(16).slice(-6)}`, name: `${activeModel.value.type}生成任务`, model: activeModel.value.name, status: '排队中', progress: 0, createdAt: '刚刚', duration: '00:00', result: '等待平台调度' }
tasks.value.unshift(task)
response.value = `任务 ${task.id} 已进入队列,可前往任务中心查看进度。`
} else {
response.value = '模亦灵枢已经完成这次调用。你可以继续调整提示内容,也可以复制统一接入信息,将同一模型能力接入自己的应用。'
}
emit('notify', callMode.value === '异步' ? '异步任务提交成功' : '模型调用完成')
}, 900)
}
function createKey() {
const secret = `sk-moyi-${crypto.randomUUID().replace(/-/g, '').slice(0, 24)}`
keys.value.unshift({ id: Date.now(), name: keyName.value.trim() || '未命名项目', value: `${secret.slice(0, 10)}••••••••${secret.slice(-4)}`, scope: keyScope.value, createdAt: '刚刚', lastUsed: '尚未使用', status: '正常' })
createdSecret.value = secret
keyName.value = ''
keyScope.value = '全部模型'
createKeyOpen.value = false
secretOpen.value = true
}
</script>
<template>
<div class="page-stack">
<template v-if="view === 'overview'">
<section class="page-heading compact"><div><span>WORKSPACE OVERVIEW</span><h1>你好,林默</h1><p>从统一入口开始使用每一种模型能力。</p></div><div class="heading-actions"><span class="health-badge"><i></i>所有服务正常</span><button class="button secondary" @click="emit('navigate', 'docs')"><BookOpen :size="16" />快速开始</button></div></section>
<section class="connection-strip">
<div class="connection-main"><span class="icon-tile violet"><Terminal :size="19" /></span><div><small>统一 API 地址</small><strong>https://api.moyi.ai/v1</strong></div></div>
<div class="connection-tags"><span>OpenAI 兼容</span><span>同步 / 流式 / 异步</span><span><i></i>API 在线</span></div>
<button class="button secondary" @click="copy('https://api.moyi.ai/v1', 'Base URL')"><Copy :size="15" />复制地址</button>
</section>
<section class="welcome-panel">
<div class="welcome-copy"><span><Sparkles :size="14" />MOYI MODEL INTELLIGENCE HUB</span><h2>一处接入,<br /><em>连接多模。</em></h2><p>文本、图像、音频、视频与生成式 3D,通过一套清晰的接口接入你的产品。</p><div><button class="button light" @click="emit('navigate', 'models')">探索模型<ArrowRight :size="16" /></button><button class="button glass" @click="emit('navigate', 'docs')"><Code2 :size="16" />查看文档</button></div></div>
<div class="welcome-visual"><div class="orbit orbit-one"></div><div class="orbit orbit-two"></div><div class="visual-core"><img src="/assets/moyi-logo.png" alt="模亦灵枢" /></div><span class="visual-chip chip-one"><Box :size="15" />3D 生成</span><span class="visual-chip chip-two"><Sparkles :size="15" />多模态</span><span class="visual-chip chip-three"><Zap :size="15" />低延迟</span></div>
</section>
<section class="metric-grid">
<article class="metric-card"><span class="icon-tile violet"><Activity :size="18" /></span><div><small>今日调用</small><strong>12,840</strong><em class="positive"><TrendingUp :size="13" />18.6%</em></div></article>
<article class="metric-card"><span class="icon-tile cyan"><Gauge :size="18" /></span><div><small>平均响应</small><strong>1.24s</strong><em class="positive">较昨日更快</em></div></article>
<article class="metric-card"><span class="icon-tile orange"><CircleDollarSign :size="18" /></span><div><small>可用额度</small><strong>¥ 286.40</strong><em>本周期剩余 68%</em></div></article>
<article class="metric-card"><span class="icon-tile green"><CheckCircle2 :size="18" /></span><div><small>平台可用性</small><strong>99.98%</strong><em class="positive">服务稳定</em></div></article>
</section>
<section class="two-column wide-left">
<article class="panel chart-panel"><header class="panel-header"><div><span>调用趋势</span><h3>近 7 天资源使用</h3></div><button class="select-button">调用次数<ChevronDown :size="14" /></button></header><div class="chart-summary"><strong>15,982</strong><span class="positive">+24.8%</span></div><div class="bar-chart"><div v-for="(height, index) in [42, 64, 52, 78, 68, 38, 88]" :key="index"><i :style="{ height: `${height}%` }"></i><span>{{ ['一','二','三','四','五','六','日'][index] }}</span></div></div></article>
<article class="panel activity-panel"><header class="panel-header"><div><span>最近动态</span><h3>工作区活动</h3></div><button class="text-link" @click="emit('navigate', 'tasks')">查看全部<ArrowRight :size="14" /></button></header><div class="activity-list"><div><span class="activity-dot green"><Check :size="14" /></span><p><strong>模型调用完成</strong><small>MOYI Text Pro · 流式响应</small></p><time>刚刚</time></div><div><span class="activity-dot violet"><KeyRound :size="14" /></span><p><strong>创建 API Key</strong><small>AI SoulMate 生产环境</small></p><time>12 分钟前</time></div><div><span class="activity-dot orange"><Box :size="14" /></span><p><strong>3D 任务执行中</strong><small>task_9f3a82 · 72%</small></p><time>25 分钟前</time></div></div></article>
</section>
<section class="section-title"><div><span>精选能力</span><h2>推荐模型</h2></div><button class="text-link" @click="emit('navigate', 'models')">查看全部<ArrowRight :size="14" /></button></section>
<section class="model-grid featured"><article v-for="model in models.slice(0, 3)" :key="model.id" class="model-card" @click="selectedModel = model"><div class="model-card-top"><span class="model-icon" :class="model.accent"><component :is="model.icon" :size="20" /></span><span class="availability"><i></i>{{ model.availability }}</span></div><h3>{{ model.name }}</h3><p>{{ model.description }}</p><footer><span>{{ model.mode }} · {{ model.latency }}</span><ArrowRight :size="16" /></footer></article></section>
</template>
<template v-else-if="view === 'models'">
<section class="page-heading"><div><span>MODEL CATALOG</span><h1>模型广场</h1><p>按能力选择模型,用一个 Key 完成接入。</p></div><button class="button secondary" @click="emit('navigate', 'docs')"><BookOpen :size="16" />接入指南</button></section>
<section class="filter-bar"><div class="tabs"><button v-for="type in modelTypes" :key="type" :class="{ active: modelType === type }" @click="modelType = type">{{ type }}</button></div><label class="search-input"><Search :size="16" /><input v-model="modelQuery" placeholder="搜索模型或能力" /></label></section>
<section class="model-grid catalog"><article v-for="model in filteredModels" :key="model.id" class="model-card catalog-card" @click="selectedModel = model"><div class="model-card-top"><span class="model-icon" :class="model.accent"><component :is="model.icon" :size="21" /></span><span class="availability"><i></i>{{ model.availability }}</span></div><div class="model-title"><h3>{{ model.name }}</h3><span>{{ model.type }}</span></div><small class="provider">{{ model.provider }}</small><p>{{ model.description }}</p><div class="model-specs"><span><Timer :size="14" />{{ model.latency }}</span><span><Layers3 :size="14" />{{ model.specification }}</span></div><footer><span class="mode-tag" :class="{ async: model.mode === '异步' }">{{ model.mode }}调用</span><button class="text-link" @click.stop="tryModel(model)">在线试用<ArrowRight :size="14" /></button></footer></article><div v-if="!filteredModels.length" class="empty-state"><Search :size="24" /><strong>没有找到匹配模型</strong><span>换个关键词或筛选条件试试</span></div></section>
</template>
<template v-else-if="view === 'playground'">
<section class="page-heading"><div><span>MODEL PLAYGROUND</span><h1>在线调试</h1><p>在正式接入前验证模型效果和返回格式。</p></div><span class="health-badge"><i></i>API 在线</span></section>
<section class="playground-grid"><article class="panel request-panel"><header class="panel-header"><div><span>REQUEST</span><h3>请求配置</h3></div><button class="icon-button" @click="prompt = ''; response = ''"><RefreshCcw :size="16" /></button></header><label class="form-label">模型</label><button class="model-picker" @click="emit('navigate', 'models')"><span class="model-icon" :class="activeModel.accent"><component :is="activeModel.icon" :size="18" /></span><div><strong>{{ activeModel.name }}</strong><small>{{ activeModel.type }} · {{ activeModel.provider }}</small></div><ChevronDown :size="16" /></button><label class="form-label">调用模式</label><div class="segment"><button v-for="mode in ['同步','流式','异步']" :key="mode" :class="{ active: callMode === mode }" @click="callMode = mode as CallMode">{{ mode }}</button></div><label class="form-label prompt-label"><span>输入内容</span><small>{{ prompt.length }}/4000</small></label><textarea v-model="prompt" maxlength="4000" placeholder="描述你希望模型完成的任务"></textarea><div class="request-footer"><span><ShieldCheck :size="14" />使用当前工作区额度</span><button class="button primary" :disabled="running" @click="runModel"><Play v-if="!running" :size="16" /><span v-else class="spinner"></span>{{ running ? '调用中…' : '开始调用' }}</button></div></article><article class="panel response-panel"><header class="panel-header"><div><span>RESPONSE</span><h3>{{ callMode === '异步' ? '任务状态' : '模型输出' }}</h3></div><button class="icon-button" :disabled="!response" @click="copy(response, '响应内容')"><Copy :size="16" /></button></header><div v-if="running" class="response-state"><span class="loading-orbit"><i></i></span><strong>{{ callMode === '异步' ? '正在提交任务' : '模型正在生成响应' }}</strong><p>请求通过模亦灵枢统一网关发送</p></div><div v-else-if="response" class="response-result"><div><span class="status-chip success"><i></i>{{ callMode === '异步' ? '202 Accepted' : '200 OK' }}</span><small>1.24s · request_moyi_82af</small></div><p>{{ response }}</p><button v-if="callMode === '异步'" class="button secondary" @click="emit('navigate', 'tasks')"><FileClock :size="16" />查看任务进度</button></div><div v-else class="response-state empty"><span class="response-icon"><Sparkles :size="28" /></span><strong>等待模型响应</strong><p>配置请求并点击“开始调用”</p></div></article></section>
</template>
<template v-else-if="view === 'keys'">
<section class="page-heading"><div><span>DEVELOPER ACCESS</span><h1>API Keys</h1><p>为不同应用和环境创建独立访问凭证。</p></div><button class="button primary" @click="createKeyOpen = true"><Plus :size="16" />创建 API Key</button></section>
<section class="notice"><ShieldCheck :size="19" /><div><strong>妥善保管访问凭证</strong><p>完整 Key 只在创建时展示一次,请存放在安全的环境变量或密钥管理服务中。</p></div></section>
<section class="panel table-card"><header class="panel-header"><div><span>CREDENTIALS</span><h3>当前工作区的 Keys</h3></div><small>{{ keys.length }} 个凭证</small></header><div class="responsive-table"><table><thead><tr><th>名称</th><th>Key</th><th>权限范围</th><th>最近使用</th><th>状态</th><th></th></tr></thead><tbody><tr v-for="key in keys" :key="key.id"><td><div class="entity-cell"><span class="icon-tile violet"><KeyRound :size="16" /></span><div><strong>{{ key.name }}</strong><small>创建于 {{ key.createdAt }}</small></div></div></td><td><button class="code-value" @click="copy(key.value, 'Key')"><code>{{ key.value }}</code><Copy :size="14" /></button></td><td>{{ key.scope }}</td><td>{{ key.lastUsed }}</td><td><span class="status-chip" :class="key.status === '正常' ? 'success' : 'muted'"><i></i>{{ key.status }}</span></td><td><button class="icon-button" @click="key.status = key.status === '正常' ? '已停用' : '正常'; emit('notify', `${key.name} 已${key.status === '正常' ? '启用' : '停用'}`)"><EyeOff v-if="key.status === '正常'" :size="16" /><Eye v-else :size="16" /></button></td></tr></tbody></table></div></section>
</template>
<template v-else-if="view === 'tasks'">
<section class="page-heading"><div><span>ASYNC TASKS</span><h1>任务中心</h1><p>统一查看 3D、图像和视频等异步模型任务。</p></div><button class="button secondary" @click="emit('navigate', 'models')"><Plus :size="16" />新建任务</button></section>
<section class="compact-metrics"><article><Clock3 :size="18" /><div><span>执行中</span><strong>1</strong></div></article><article><FileClock :size="18" /><div><span>排队中</span><strong>1</strong></div></article><article><CheckCircle2 :size="18" /><div><span>今日完成</span><strong>28</strong></div></article><article><Timer :size="18" /><div><span>平均耗时</span><strong>02:14</strong></div></article></section>
<section class="panel table-card"><header class="panel-header table-toolbar"><div><span>TASK QUEUE</span><h3>任务列表</h3></div><div class="tabs compact"><button v-for="filter in ['全部','排队中','执行中','已完成','失败']" :key="filter" :class="{ active: taskFilter === filter }" @click="taskFilter = filter as '全部' | TaskStatus">{{ filter }}</button></div></header><div class="responsive-table"><table><thead><tr><th>任务</th><th>模型</th><th>进度</th><th>创建时间</th><th>状态</th></tr></thead><tbody><tr v-for="task in filteredTasks" :key="task.id" class="clickable" @click="selectedTask = task"><td><div class="entity-cell"><span class="icon-tile orange"><Box :size="16" /></span><div><strong>{{ task.name }}</strong><small>{{ task.id }}</small></div></div></td><td>{{ task.model }}</td><td><div class="progress-cell"><span><i :style="{ width: `${task.progress}%` }"></i></span><small>{{ task.progress }}%</small></div></td><td><div class="stacked-cell"><span>{{ task.createdAt }}</span><small>{{ task.duration }}</small></div></td><td><span class="status-chip" :class="task.status"><i></i>{{ task.status }}</span></td></tr></tbody></table></div></section>
</template>
<template v-else-if="view === 'usage'">
<section class="page-heading"><div><span>USAGE & CREDITS</span><h1>用量与额度</h1><p>查看调用消耗、额度余额和最近流水。</p></div><button class="button disabled" disabled><WalletCards :size="16" />充值暂未开放</button></section>
<section class="credit-hero"><div><span>当前可用额度</span><strong>¥ 286.40</strong><p>第一版额度由管理员发放,充值与套餐入口已预留。</p></div><div class="credit-circle"><span>68%</span><small>周期剩余</small></div></section>
<section class="metric-grid three"><article class="metric-card"><span class="icon-tile violet"><Activity :size="18" /></span><div><small>本月调用</small><strong>58,320</strong><em class="positive">+ 18.6%</em></div></article><article class="metric-card"><span class="icon-tile cyan"><BarChart3 :size="18" /></span><div><small>本月消耗</small><strong>¥ 113.60</strong><em>多模型合计</em></div></article><article class="metric-card"><span class="icon-tile orange"><Box :size="18" /></span><div><small>异步任务</small><strong>184</strong><em>成功率 98.9%</em></div></article></section>
<section class="two-column wide-left"><article class="panel chart-panel"><header class="panel-header"><div><span>USAGE TREND</span><h3>过去 7 天调用</h3></div><button class="select-button">按调用次数<ChevronDown :size="14" /></button></header><div class="bar-chart large"><div v-for="(height, index) in [42,64,52,78,68,38,88]" :key="index"><i :style="{ height: `${height}%` }"></i><span>{{ ['一','二','三','四','五','六','日'][index] }}</span></div></div></article><article class="panel ledger"><header class="panel-header"><div><span>CREDIT LEDGER</span><h3>最近额度流水</h3></div><Download :size="17" /></header><div><p><span class="activity-dot green"><Plus :size="14" /></span><span><strong>管理员发放额度</strong><small>今天 09:20</small></span><b class="positive">+ ¥300.00</b></p><p><span class="activity-dot violet"><Terminal :size="14" /></span><span><strong>文本模型调用</strong><small>今天 18:02</small></span><b>- ¥8.60</b></p><p><span class="activity-dot orange"><Box :size="14" /></span><span><strong>3D 任务</strong><small>昨天 16:40</small></span><b>- ¥4.20</b></p></div></article></section>
</template>
<template v-else>
<section class="page-heading"><div><span>DEVELOPER DOCS</span><h1>接入文档</h1><p>使用标准接口把模型能力接入你的应用。</p></div><button class="button secondary" @click="copy('https://api.moyi.ai/v1', 'Base URL')"><Copy :size="16" />复制 Base URL</button></section>
<section class="docs-layout"><aside class="docs-menu panel"><span>快速开始</span><button class="active">概览</button><button>认证与 API Key</button><button>标准对话接口</button><button>异步任务</button><button>错误码与重试</button><span>API 参考</span><button>模型列表</button><button>用量查询</button></aside><article class="docs-content panel"><span class="eyebrow">QUICK START</span><h2>三分钟完成第一次调用</h2><p>只需要统一 API 地址、API Key 和模型名称,即可开始使用模亦灵枢。</p><section><b>01</b><div><h3>准备接入信息</h3><p>在用户端创建 API Key,并保存以下环境变量。</p><pre><code>MOYI_BASE_URL=https://api.moyi.ai/v1
MOYI_API_KEY=sk-moyi-your-key
MOYI_MODEL=moyi-text-pro</code></pre></div></section><section><b>02</b><div><h3>发送标准请求</h3><p>文本模型支持同步和流式响应;3D、图像、视频使用异步任务接口。</p><pre><code>curl https://api.moyi.ai/v1/chat/completions \
-H "Authorization: Bearer $MOYI_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "moyi-text-pro", "messages": [...] }'</code></pre></div></section><div class="docs-note"><Info :size="18" /><p><strong>保持开放与兼容。</strong>具体模型支持的协议和参数以模型详情与版本化 API 文档为准。</p></div></article></section>
</template>
<SlidePanel v-if="selectedModel" :title="selectedModel.name" eyebrow="MODEL DETAILS" @close="selectedModel = null"><div class="drawer-model-head"><span class="model-icon" :class="selectedModel.accent"><component :is="selectedModel.icon" :size="22" /></span><div><small>{{ selectedModel.provider }}</small><strong>{{ selectedModel.type }} · {{ selectedModel.mode }}调用</strong></div></div><p class="drawer-description">{{ selectedModel.description }}</p><div class="detail-health"><span class="status-chip success"><i></i>服务正常</span><strong>{{ selectedModel.availability }}</strong></div><dl class="detail-list"><div><dt>模型名称</dt><dd><code>{{ selectedModel.id }}</code><Copy :size="14" @click="copy(selectedModel.id, '模型名称')" /></dd></div><div><dt>典型延迟</dt><dd>{{ selectedModel.latency }}</dd></div><div><dt>能力规格</dt><dd>{{ selectedModel.specification }}</dd></div><div><dt>调用模式</dt><dd>{{ selectedModel.mode }}</dd></div></dl><div class="drawer-note"><Info :size="16" /><span>{{ selectedModel.mode === '异步' ? '提交后进入任务队列,在任务中心查询进度与结果。' : '支持通过统一兼容接口直接调用。' }}</span></div><template #footer><button class="button primary full" @click="tryModel(selectedModel)"><Play :size="16" />在线试用</button><button class="button secondary full" @click="selectedModel = null; emit('navigate', 'docs')"><BookOpen :size="16" />查看文档</button></template></SlidePanel>
<SlidePanel v-if="selectedTask" :title="selectedTask.name" eyebrow="TASK DETAILS" @close="selectedTask = null"><div class="task-drawer-status"><span class="status-chip" :class="selectedTask.status"><i></i>{{ selectedTask.status }}</span><strong>{{ selectedTask.progress }}%</strong></div><div class="drawer-progress"><span><i :style="{ width: `${selectedTask.progress}%` }"></i></span><small>{{ selectedTask.result }}</small></div><dl class="detail-list"><div><dt>任务 ID</dt><dd><code>{{ selectedTask.id }}</code></dd></div><div><dt>模型</dt><dd>{{ selectedTask.model }}</dd></div><div><dt>创建时间</dt><dd>{{ selectedTask.createdAt }}</dd></div><div><dt>耗时</dt><dd>{{ selectedTask.duration }}</dd></div></dl><template #footer><button class="button secondary full" @click="selectedTask = null">关闭详情</button></template></SlidePanel>
<UiModal v-if="createKeyOpen" title="创建 API Key" eyebrow="NEW CREDENTIAL" @close="createKeyOpen = false"><p class="modal-description">为不同应用和环境创建独立凭证,便于控制权限与统计用量。</p><label class="form-label">Key 名称</label><input v-model="keyName" class="text-input" placeholder="例如:生产环境" /><label class="form-label">权限范围</label><div class="option-list"><button v-for="scope in ['全部模型','文本 / 多模态']" :key="scope" :class="{ active: keyScope === scope }" @click="keyScope = scope"><span><i></i><strong>{{ scope }}</strong></span><Check v-if="keyScope === scope" :size="16" /></button></div><template #footer><button class="button secondary" @click="createKeyOpen = false">取消</button><button class="button primary" @click="createKey"><KeyRound :size="16" />生成 Key</button></template></UiModal>
<UiModal v-if="secretOpen" title="请立即保存你的 Key" eyebrow="CREDENTIAL CREATED" @close="secretOpen = false"><div class="secret-success"><CheckCircle2 :size="25" /><strong>API Key 创建成功</strong></div><p class="modal-description centered">完整 Key 只展示一次,关闭后无法再次查看。</p><div class="secret-box"><code>{{ revealSecret ? createdSecret : `${createdSecret.slice(0, 10)}••••••••••••` }}</code><button @click="revealSecret = !revealSecret"><EyeOff v-if="revealSecret" :size="16" /><Eye v-else :size="16" /></button><button @click="copy(createdSecret, 'API Key')"><Copy :size="16" /></button></div><template #footer><button class="button primary full" @click="secretOpen = false; revealSecret = false">我已安全保存</button></template></UiModal>
</div>
</template>