/* ==============================================================================
   🤖 Qwen3.8-27B 专属 AI 算力资产大屏 (Dedicated AI Asset HUD Styles)
   ============================================================================== */
.qwen38-ai-asset-section {
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px -5px rgba(99, 102, 241, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.qwen38-ai-asset-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #6366f1 0%, #0284c7 50%, #10b981 100%);
}

.qwen-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border-subtle);
}

.qwen-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qwen-logo-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid #c7d2fe;
  padding: 6px 10px;
  border-radius: 12px;
}

.qwen-icon { font-size: 24px; line-height: 1; }
.qwen-chip-badge { font-size: 10px; font-weight: 800; color: #4338ca; font-family: 'JetBrains Mono', monospace; margin-top: 2px; }

.qwen-main-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.qwen-sub-badge {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.qwen-model-spec {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.qwen-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.qwen-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.qwen-status-badge.status-running { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.qwen-status-badge.status-stopped { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.qwen-beacon {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: qwenPulse 1.8s infinite;
}

.qwen-status-badge.status-stopped .qwen-beacon {
  background: #ef4444;
  box-shadow: none;
  animation: none;
}

@keyframes qwenPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.qwen-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qwen-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-main);
  color: var(--text-main);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.qwen-btn:hover { background: #ffffff; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,0.06); }
.qwen-btn-start:hover { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }
.qwen-btn-stop:hover { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }
.qwen-btn-restart:hover { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.qwen-btn-purge:hover { background: #faf5ff; border-color: #d8b4fe; color: #7e22ce; }
.qwen-btn-refresh:hover { background: #f0fdf4; border-color: #86efac; color: #15803d; }

.qwen-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.qwen-metric-pod {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s ease;
}

.qwen-metric-pod:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.05);
}

.pod-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pod-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #eef2ff;
  color: #4338ca;
  font-family: 'JetBrains Mono', monospace;
}

.pod-val-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}

.pod-num {
  font-size: 24px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.pod-unit {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}

.pod-detail-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 8px;
  font-size: 11px;
}

.pod-detail-item {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.pod-detail-item strong {
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
}

.vram-meter-container { margin-bottom: 10px; }
.vram-bar-track {
  width: 100%;
  height: 9px;
  background: #e2e8f0;
  border-radius: 9999px;
  position: relative;
  overflow: visible;
  margin-bottom: 6px;
}

.vram-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 70%, #6366f1 100%);
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.vram-peak-marker {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 15px;
  background: #f59e0b;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.vram-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

.token-velocity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 8px;
}

.tok-vel-cell {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 8px;
}

.tok-vel-lbl { font-size: 10px; color: var(--text-dim); font-weight: 600; }
.tok-vel-val { font-size: 13px; font-weight: 800; color: var(--text-main); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }

body.theme-dark .qwen38-ai-asset-section {
  background: #0f172a;
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

body.theme-dark .qwen-logo-pill { background: rgba(99, 102, 241, 0.15); border-color: rgba(99, 102, 241, 0.3); }
body.theme-dark .qwen-chip-badge { color: #a5b4fc; }
body.theme-dark .qwen-sub-badge { background: #1e293b; border-color: #334155; color: #94a3b8; }
body.theme-dark .qwen-btn { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.theme-dark .qwen-btn:hover { background: #334155; }
body.theme-dark .qwen-metric-pod { background: #1e293b; border-color: #334155; }
body.theme-dark .tok-vel-cell { background: rgba(15, 23, 42, 0.6); border-color: #334155; }
body.theme-dark .vram-bar-track { background: #334155; }

/* N6 Dual 3090 & Storage Array Components */
.n6-section { border-left: 6px solid #059669; }
.n6-logo-pill { background: #ecfdf5; border-color: #a7f3d0; }
.n6-chip-badge { background: #16a34a; color: #ffffff; }
.n6-sub-badge { background: #dcfce7; color: #166534; }
.n6-status-running { border-color: #86efac; }
.n6-status-beacon { background: #16a34a; }
.storage-tray { margin-top: 14px; padding: 14px 18px; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; }
.storage-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.storage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.disk-card { background: #ffffff; padding: 12px 14px; border-radius: 8px; border: 1px solid #cbd5e1; }
.disk-bar-track { background: #e2e8f0; height: 6px; border-radius: 3px; overflow: hidden; margin: 6px 0; }
.disk-bar-fill-nvme { background: #16a34a; height: 100%; }
.disk-bar-fill-data { background: #2563eb; height: 100%; }
body.theme-dark .storage-tray { background: #1e293b; border-color: #334155; }
body.theme-dark .disk-card { background: #0f172a; border-color: #334155; }
body.theme-dark .disk-bar-track { background: #334155; }
