/* QuotaCard (wc-data-display-quota-card) — 渠道额度卡片
   主题：--dt-* 变量 + 内联暗色兜底（dark-cyber 默认；宿主覆盖变量即得 standard-modern） */
.qc-scope {
  font-family: var(--dt-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  background: var(--dt-bg-surface, #0f172a);
  border: 1px solid var(--dt-border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--dt-radius-lg, 12px);
  padding: 16px;
  color: var(--dt-text-primary, #f8fafc);
  box-shadow: var(--dt-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.3));
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.qc-scope * { box-sizing: border-box; }
.qc-scope [hidden] { display: none !important; } /* 防止组件 display 规则覆盖 hidden 的 UA 样式 */

.qc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dt-text-secondary, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qc-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--dt-radius-full, 9999px);
  border: 1px solid transparent;
}
.qc-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.qc-status-normal   .qc-badge { color: var(--dt-success, #10b981); background: var(--dt-success-subtle, rgba(16, 185, 129, 0.15)); border-color: rgba(16, 185, 129, 0.3); }
.qc-status-warning  .qc-badge { color: var(--dt-warning, #f59e0b); background: var(--dt-warning-subtle, rgba(245, 158, 11, 0.15)); border-color: rgba(245, 158, 11, 0.3); }
.qc-status-critical .qc-badge { color: var(--dt-danger, #ef4444); background: var(--dt-danger-subtle, rgba(239, 68, 68, 0.15)); border-color: rgba(239, 68, 68, 0.35); animation: qc-pulse 1.2s ease-in-out infinite; }
.qc-status-unknown  .qc-badge { color: var(--dt-text-muted, #64748b); background: var(--dt-bg-surface-raised, #1e293b); border-color: var(--dt-border-default, rgba(255, 255, 255, 0.14)); }

/* 头部存活圆点：还有血量的账号数 count/total */
.qc-alive {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: var(--dt-font-mono, ui-monospace, Menlo, monospace);
  color: var(--dt-text-secondary, #94a3b8);
  padding: 2px 8px;
  border-radius: var(--dt-radius-full, 9999px);
  border: 1px solid var(--dt-border-subtle, rgba(255, 255, 255, 0.08));
}
.qc-alive-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.qc-alive-full    { color: var(--dt-success, #10b981); }
.qc-alive-partial { color: var(--dt-warning, #f59e0b); }
.qc-alive-empty   { color: var(--dt-danger, #ef4444); }
.qc-alive-empty .qc-alive-dot { animation: qc-pulse 1.2s ease-in-out infinite; }

@keyframes qc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.qc-balance { display: flex; flex-direction: column; gap: 2px; }
.qc-balance-label { font-size: 11px; color: var(--dt-text-muted, #64748b); letter-spacing: 0.04em; }
.qc-balance-value {
  font-family: var(--dt-font-mono, ui-monospace, Menlo, monospace);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.qc-status-warning  .qc-balance-value { color: var(--dt-warning, #f59e0b); }
.qc-status-critical .qc-balance-value { color: var(--dt-danger, #ef4444); }
.qc-status-unknown  .qc-balance-value { color: var(--dt-text-secondary, #94a3b8); }

.qc-bar {
  position: relative;
  height: 8px;
  border-radius: var(--dt-radius-full, 9999px);
  background: var(--dt-bg-surface-raised, #1e293b);
  border: 1px solid var(--dt-border-subtle, rgba(255, 255, 255, 0.08));
  overflow: hidden;
}
.qc-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--dt-success, #10b981);
  transition: width 0.5s ease, background 0.3s ease;
}
.qc-status-warning  .qc-bar-fill { background: var(--dt-warning, #f59e0b); }
.qc-status-critical .qc-bar-fill { background: var(--dt-danger, #ef4444); animation: qc-pulse 1.2s ease-in-out infinite; }
.qc-status-unknown  .qc-bar-fill { background: var(--dt-text-muted, #64748b); }

.qc-slots { display: grid; gap: 8px; margin: 2px 0 4px; }
.qc-slot { display: grid; grid-template-columns: 44px 1fr 52px; align-items: center; gap: 8px; }
.qc-slot-label { font-size: 11px; color: var(--dt-text-muted, #64748b); }
.qc-slot-track {
  position: relative;
  display: block;
  height: 8px;
  border-radius: var(--dt-radius-full, 9999px);
  background: var(--dt-bg-surface-raised, #1e293b);
  border: 1px solid var(--dt-border-subtle, rgba(255, 255, 255, 0.08));
  overflow: hidden;
}
.qc-slot-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.5s ease, background 0.3s ease;
}
.qc-slot-normal   .qc-slot-fill { background: var(--dt-success, #10b981); }
.qc-slot-label { white-space: nowrap; }
.qc-slot-pct { font-size: 11px; color: var(--dt-text-secondary, #94a3b8); text-align: right; font-family: var(--dt-font-mono, ui-monospace, Menlo, monospace); }
.qc-slot-normal   .qc-slot-pct { color: var(--dt-success, #10b981); }
.qc-slot-warning  .qc-slot-fill { background: var(--dt-warning, #f59e0b); }
.qc-slot-warning  .qc-slot-pct { color: var(--dt-warning, #f59e0b); }
.qc-slot-critical .qc-slot-fill { background: var(--dt-danger, #ef4444); animation: qc-pulse 1.2s ease-in-out infinite; }
.qc-slot-critical .qc-slot-pct { color: var(--dt-danger, #ef4444); }

.qc-models {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 11px; margin: 2px 0 4px;
}
.qc-models[hidden] { display: none; }
.qc-models-label { color: var(--dt-text-muted, #64748b); letter-spacing: 0.04em; flex-shrink: 0; }
.qc-model {
  color: var(--dt-cyan, #06b6d4);
  font-family: var(--dt-font-mono, ui-monospace, Menlo, monospace);
  padding: 1px 7px; border: 1px solid var(--dt-border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 9999px;
}

.qc-bar-caption {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--dt-text-muted, #64748b);
  font-family: var(--dt-font-mono, ui-monospace, Menlo, monospace);
  margin-top: -6px;
}

.qc-prepaid {
  align-self: flex-start;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--dt-radius-sm, 4px);
  color: var(--dt-cyan, #06b6d4);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.qc-rows { display: flex; flex-direction: column; gap: 6px; }
.qc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
}
.qc-row > span { color: var(--dt-text-muted, #64748b); flex-shrink: 0; }
.qc-row > b {
  font-family: var(--dt-font-mono, ui-monospace, Menlo, monospace);
  font-weight: 600;
  color: var(--dt-text-secondary, #94a3b8);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
