:root {
  /* 2026-09-06 配色 A:深石墨 + 琥珀强调色(此前是海军蓝 + 青色)。只动配色,不动布局。 */
  --bg: #0c141f;
  --card: rgba(13, 25, 38, 0.72);
  --card-border: rgba(142, 181, 221, 0.22);
  --text: #e7f1fd;
  --muted: #a8bfd8;
  --brand: #2cc7aa;
  --brand-hover: #1db397;
  --danger: #e16068;
  --danger-hover: #c94c53;
  --border: rgba(165, 197, 230, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  background: radial-gradient(circle at 15% 20%, #163252 0%, #0c141f 45%, #070c14 100%);
  color: var(--text);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
}
.bg-orb-a {
  width: 400px;
  height: 400px;
  background: #2cc7aa;
  top: -150px;
  right: -100px;
}
.bg-orb-b {
  width: 500px;
  height: 500px;
  background: #1d79d1;
  left: -200px;
  bottom: -200px;
}

.shell {
  /* 2026-09-03:1400px → 宽屏下放宽约三分之一;窄屏仍由 100vw 兜住 */
  max-width: min(1880px, calc(100vw - 40px));
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  padding: 24px;
}

.header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}
h1 {
  margin: 0;
  font-size: 28px;
}
h2 {
  margin: 0 0 16px;
  font-size: 18px;
}
.muted {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.tab-btn {
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: rgba(44, 199, 170, 0.15);
  color: var(--brand);
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.tab-pane.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.add-form, .config-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.config-cat-btn {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  color: #cce0f5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.config-cat-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.config-cat-btn.active {
  background: rgba(44, 199, 170, 0.16);
  color: #6ff2d7;
  border-color: rgba(77, 226, 196, 0.4);
}

.config-cat-pane {
  display: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  gap: 12px;
  flex-direction: column;
}

.config-cat-pane.active {
  display: flex;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-inline-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.config-inline-row .inline-item {
  min-width: 0;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #cce0f5;
}

.help {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.input-text {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}

.input-text:focus {
  outline: none;
  border-color: var(--brand);
}

textarea#tokenInput {
  width: 100%;
  height: 80px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  resize: vertical;
}

textarea#refreshBundleInput {
  width: 100%;
  min-height: 140px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  resize: vertical;
}

#refreshBundleFile {
  color: var(--muted);
}

#proxyDynamicPool,
#proxyStaticPool {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  resize: vertical;
}

#proxyDynamicPool:focus,
#proxyStaticPool:focus {
  outline: none;
  border-color: var(--brand);
}

.refresh-status {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: #a8bfd8;
  font-size: 12px;
  line-height: 1.5;
}

.refresh-status .table-wrapper {
  margin-top: 6px;
}

.refresh-profiles-table {
  font-size: 12px;
}

.refresh-profiles-table th,
.refresh-profiles-table td {
  padding: 8px;
}

.dialog-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 16, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 950;
  padding: 20px;
}

.dialog-modal.open {
  display: flex;
}

.dialog-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #0d1926;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Actions */
.actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.log-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.log-filter-bar .input-select,
.log-filter-bar .input-text {
  flex: 0 1 auto;
  max-width: 100%;
}
.log-filter-bar #logAccountFilter { flex: 1 1 200px; min-width: 180px; }
.log-filter-bar #logChainId { flex: 1 1 260px; min-width: 200px; }
.log-filter-bar #logKeyword { flex: 1 1 160px; min-width: 150px; }
.log-filter-bar button {
  white-space: nowrap;
}

button {
  background: var(--brand);
  color: #051410;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
button:hover {
  background: var(--brand-hover);
}

button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
button.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

button.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 6px 12px;
  font-size: 12px;
}
button.danger:hover {
  background: var(--danger);
  color: #fff;
}

button.small {
  padding: 6px 12px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
button.small:hover {
  background: rgba(255, 255, 255, 0.2);
}

.msg {
  font-size: 14px;
}

/* Table */
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.list-head h2 {
  margin: 0;
}

.token-list-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.token-credits-summary {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.token-credits-summary strong {
  color: #e7f1fd;
  font-size: 15px;
}

.input-select {
  min-width: 120px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.input-select:focus {
  outline: none;
  border-color: var(--brand);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.stat-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.stat-value {
  color: #e7f1fd;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
}

.table-wrapper {
  overflow-x: auto;
}

#tokenTable {
  min-width: 960px;
}

/* 账号 */
#tokenTable th:nth-child(2),
#tokenTable td:nth-child(2) {
  min-width: 160px;
}

/* Client ID */
#tokenTable th:nth-child(3),
#tokenTable td:nth-child(3) {
  min-width: 120px;
  white-space: nowrap;
}

/* Token(脱敏展示) */
#tokenTable th:nth-child(4),
#tokenTable td:nth-child(4) {
  min-width: 220px;
}

/* 状态 */
#tokenTable th:nth-child(5),
#tokenTable td:nth-child(5) {
  min-width: 100px;
  white-space: nowrap;
}

/* 操作 */
#tokenTable th:nth-child(10),
#tokenTable td:nth-child(10) {
  min-width: 260px;
}

.token-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.token-summary strong {
  color: #e7f1fd;
  font-size: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.stage-timing {
  margin-top: 24px;
}

.stage-timing h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--muted);
}

#stageTimingTable {
  min-width: 640px;
}

#stageTimingTable th,
#stageTimingTable td {
  white-space: nowrap;
}

#logsTable,
#runningLogsTable {
  table-layout: auto;
}

/* 列顺序(13 列, 2026-09-08 起): 1时间 2状态 3耗时 4进度 5模型/转换后模型 6类型
   7分辨率 8质量 9图片格式 10返回格式 11提示词 12预览 13详情

   ⚠️ 这些规则全靠 nth-child 定位,**加列/删列必须同步改这里的序号**。
   2026-08-22 加「解析后模型」漏改一次;2026-09-03 加「接口」列漏改一次;
   2026-09-08 把「解析后模型」并进「模型」列又漏改一次 —— 「预览」「详情」按钮吃到了
   提示词的 min-width 360px,叠到提示词上面。每次改列都要在浏览器里数一遍表头。 */
#logsTable th:nth-child(1),
#logsTable td:nth-child(1) {
  width: 70px;
}

/* 状态(2) / 进度(4): 内容短, 不换行 */
#logsTable th:nth-child(2),
#logsTable td:nth-child(2),
#logsTable th:nth-child(4),
#logsTable td:nth-child(4) {
  width: auto;
  white-space: nowrap;
}

/* 耗时(3) */
#logsTable th:nth-child(3),
#logsTable td:nth-child(3) {
  width: 62px;
  white-space: nowrap;
}

/* 模型/转换后模型(5, 两行): 请求名(含比例后缀)+ 解析后的内部 id */
#logsTable th:nth-child(5),
#logsTable td:nth-child(5) {
  min-width: 200px;
  white-space: nowrap;
}

/* 类型(6): 文生图/图生图。与图片格式(9)/返回格式(10)**同一套宽度**(用户要求类型列与返回格式列等宽) */
#logsTable th:nth-child(6),
#logsTable td:nth-child(6),
#logsTable th:nth-child(9),
#logsTable td:nth-child(9),
#logsTable th:nth-child(10),
#logsTable td:nth-child(10) {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  white-space: nowrap;
}

/* 分辨率(7): 短值(1K/2K/4K 或像素) */
#logsTable th:nth-child(7),
#logsTable td:nth-child(7) {
  width: 120px;
  white-space: nowrap;
}

/* 质量(8): 值短(low/med/high 或 -) */
#logsTable th:nth-child(8),
#logsTable td:nth-child(8) {
  width: 96px;
  white-space: nowrap;
}

/* 提示词摘要(11): 弹性主列, 有余量时吃掉剩余宽度 */
#logsTable th:nth-child(11),
#logsTable td:nth-child(11) {
  min-width: 360px;
}

/* 预览(12) / 详情(13): 按钮不换行 */
#logsTable th:nth-child(12),
#logsTable td:nth-child(12),
#logsTable th:nth-child(13),
#logsTable td:nth-child(13) {
  min-width: 72px;
  white-space: nowrap;
}

.token-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.token-meta b { color: var(--text); font-weight: 600; }
.log-detail-table { border-collapse: collapse; font-size: 13px; }
.log-detail-table td { padding: 4px 0; color: var(--text); }

#logsTable td,
#runningLogsTable td {
  padding: 10px 8px;
  vertical-align: top;
}

.log-account-cell {
  display: block;
  color: #a8bfd8;
  line-height: 1.35;
}

.log-time-cell {
  color: #a8bfd8;
  line-height: 1.2;
  white-space: normal;
}

.log-time-cell .date {
  display: block;
}

.log-time-cell .time {
  display: block;
  color: #7f96ad;
}

.log-account-email {
  color: #7f96ad;
  word-break: break-all;
}

.log-model-cell {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: #8fb0d3;
  word-break: break-word;
}

.log-prompt-cell {
  color: #a8bfd8;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
  font-weight: 600;
}

td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.token-val {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: #a0c3e8;
  word-break: break-all;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-active { background: rgba(44, 199, 170, 0.2); color: #4de2c4; }
.status-exhausted { background: rgba(225, 163, 44, 0.2); color: #ffca58; }
.status-invalid { background: rgba(255, 255, 255, 0.14); color: #b9c4d1; }
.status-error { background: rgba(225, 96, 104, 0.2); color: #ffb4bc; }
.status-de_entitled { background: rgba(225, 64, 76, 0.22); color: #ff7a86; }
.status-duplicate { background: rgba(168, 100, 235, 0.2); color: #c79bff; }
.status-disabled { background: rgba(255, 255, 255, 0.1); color: #aaa; }

.token-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.token-filter-group .input-select {
  min-width: 180px;
}

.log-status-2xx { background: rgba(44, 199, 170, 0.2); color: #4de2c4; }
.log-status-4xx { background: rgba(225, 163, 44, 0.2); color: #ffca58; }
.log-status-5xx { background: rgba(225, 96, 104, 0.2); color: #ffb4bc; }

.log-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.log-state.running {
  color: #63d4ff;
  background: rgba(48, 170, 255, 0.16);
}

.log-state.success {
  color: #4de2c4;
  background: rgba(44, 199, 170, 0.16);
}

.log-state.failed {
  color: #ffb4bc;
  background: rgba(225, 96, 104, 0.16);
}

.log-state-btn {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.log-state-btn.failed {
  border: 1px solid rgba(255, 180, 188, 0.55);
  background: rgba(255, 180, 188, 0.12);
}

.log-state-btn.failed:hover {
  background: rgba(255, 180, 188, 0.22);
}

.icon-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.icon-check,
.icon-error {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  font-size: 11px;
  line-height: 1;
}

.log-row-running {
  background: rgba(48, 170, 255, 0.06);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.action-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  min-width: 120px;
}

th input[type="checkbox"],
td input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.action-btns button {
  width: 100%;
  padding: 3px 5px;
  font-size: 10px;
  border-radius: 4px;
}

.switch-btn {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  background: #2b3948;
  vertical-align: middle;
}

.switch-btn.on {
  background: rgba(44, 199, 170, 0.35);
  border-color: rgba(77, 226, 196, 0.55);
}

.switch-btn.off {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.switch-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.switch-knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(0);
  transition: transform 0.15s ease;
}

.switch-btn.on .switch-knob {
  transform: translateX(18px);
}

.switch-text {
  margin-left: 8px;
  font-size: 12px;
  color: #a8bfd8;
}

.empty-state {
  text-align: center;
  padding: 40px !important;
  color: var(--muted);
}

.logs-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 16, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.preview-modal.open {
  display: flex;
}

.preview-modal-dialog {
  width: min(1100px, 100%);
  max-height: calc(100vh - 40px);
  background: #0d1926;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-close {
  align-self: flex-end;
  padding: 6px 12px;
  font-size: 12px;
}

.preview-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  max-height: calc(100vh - 130px);
}

.preview-content img,
.preview-content video {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  border-radius: 8px;
  background: #08111c;
}

.preview-actions {
  display: flex;
  justify-content: flex-end;
}

.preview-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.preview-download:hover {
  background: rgba(255, 255, 255, 0.2);
}

.error-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.error-detail-head h3 {
  margin: 0;
  font-size: 16px;
  color: #e9f4ff;
}

.error-detail-content {
  border: 1px solid rgba(142, 181, 221, 0.25);
  border-radius: 8px;
  background: #091321;
  padding: 12px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.error-detail-content pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #cfe3f8;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(12, 20, 31, 0.92);
  color: #dbe9f8;
  border: 1px solid rgba(142, 181, 221, 0.28);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  line-height: 1.4;
  z-index: 1200;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(77, 226, 196, 0.45);
}

.toast.error {
  border-color: rgba(255, 180, 188, 0.45);
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .list-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .list-head .actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  .token-list-actions {
    width: 100%;
    align-items: flex-start;
  }

  .token-credits-summary {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .config-category-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .config-inline-row {
    grid-template-columns: 1fr;
  }

  .input-select {
    width: 100%;
  }
}

/* ---- client_id 管理 ---------------------------------------------------- */

.cid-add-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(240px, 2fr) auto;
  gap: 12px;
  align-items: end;
}

@media (max-width: 900px) {
  .cid-add-form { grid-template-columns: 1fr; }
}

.cid-add-form .form-group { margin: 0; }
.cid-add-btn-group { display: flex; align-items: flex-end; }
.cid-add-btn-group button { white-space: nowrap; }

.cid-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.cid-pill.on   { background: rgba(111, 242, 215, .16); color: #6ff2d7; }
.cid-pill.off  { background: rgba(255, 255, 255, .08); color: #93a4b8; }
.cid-pill.bad  { background: rgba(255, 122, 122, .16); color: #ff9d9d; }

.cid-rate { font-variant-numeric: tabular-nums; font-weight: 600; }
.cid-rate.good { color: #6ff2d7; }
.cid-rate.warn { color: #ffd479; }
.cid-rate.bad  { color: #ff9d9d; }
.cid-rate.none { color: #7d8ea3; font-weight: 400; }

.cid-sub { display: block; font-size: 11px; color: #7d8ea3; margin-top: 2px; }
.cid-origin { font-size: 12px; color: #9fb0c4; word-break: break-all; }

.cid-mint-toolbar { display: flex; gap: 8px; align-items: center; margin: 10px 0 8px; }

.cid-mint-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  padding: 6px;
}
.cid-mint-list label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.cid-mint-list label:hover { background: rgba(255, 255, 255, .05); }
.cid-mint-list .cid-mint-email { color: #7d8ea3; font-size: 12px; }

/* 出图链路分段耗时:按阶段着色(第二列起)。
   深色底 #0c141f 上,常规绿/蓝/橙/紫/粉 亮度不足会发闷,这里统一取高亮度档,
   保证数字清晰的前提下拉开色相距离;第一列(分辨率)不着色,便于纵向对齐扫读。 */
#stageTimingTable tbody tr.stage-row td:not(:first-child) { font-weight: 600; }
#stageTimingTable tbody tr.stage-upload     td:not(:first-child) { color: #4ade80; }  /* 上传 · 绿 */
#stageTimingTable tbody tr.stage-submit     td:not(:first-child) { color: #60a5fa; }  /* 提交 · 蓝 */
#stageTimingTable tbody tr.stage-poll       td:not(:first-child) { color: #fbbf24; }  /* 轮询 · 琥珀 */
#stageTimingTable tbody tr.stage-download   td:not(:first-child) { color: #c084fc; }  /* 下载 · 紫 */
#stageTimingTable tbody tr.stage-poll_count td:not(:first-child) { color: #f472b6; }  /* 轮询次数 · 粉 */

/* ===== 指标看板:RPM / 并发 / 错误率 小时曲线(B8) ===== */
.ts-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 8px 0;
  font-size: 12px;
}
.ts-legend button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  color: #a8bfd8;
  font-size: 12px;
}
/* 关掉的系列压暗但保留文字 —— 直接隐藏会让人以为图例项消失了 */
.ts-legend button.off { opacity: 0.38; text-decoration: line-through; }
.ts-legend .ts-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
}
.ts-chart-wrap { position: relative; }
.ts-chart-wrap svg { width: 100%; height: auto; display: block; }
.ts-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  background: rgba(12, 20, 31, 0.96);
  border: 1px solid #2a3d52;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.55;
  color: #d7e6f5;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.ts-tooltip .ts-tip-title { color: #7f96ad; margin-bottom: 3px; }
.ts-empty { color: #7f96ad; font-size: 13px; padding: 28px 0; text-align: center; }

/* 账号汇总行上的国家码(B7)。放在轮换开关左边,压低亮度免得抢开关的注意力 */
.token-country {
  font-size: 12px;
  font-weight: 500;
  color: #7f96ad;
  white-space: nowrap;
}
.token-country b { color: #a8bfd8; font-weight: 600; }

/* ---- client_id 管理:整张表左侧一道老接口的色带 ---- */
#clientIdsTable {
  border-left: 3px solid transparent;
}
#clientIdsTable[data-endpoint="legacy"] { border-left-color: #ffcf70; }

.cid-summary {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  color: #9fb0c4;
}
.cid-summary strong { color: #d6e2f0; }

.cid-cooldowns {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 207, 112, .06);
  border: 1px solid rgba(255, 207, 112, .18);
  font-size: 12px;
  color: #9fb0c4;
}
.cid-cooldowns table { width: 100%; margin-top: 8px; }
.cid-cooldowns th, .cid-cooldowns td { font-size: 11px; padding: 4px 6px; }


/* 2026-09-08:日志「模型」列第二行 = 解析后模型 */
.log-model-cell .log-model-name { display: block; }
.log-model-resolved { display: block; font-size: 11px; color: #9aa7b6; margin-top: 2px; }
.log-model-resolved.same { color: #6f7b88; }

/* 2026-09-08:指标看板热力图(日 × 小时成功率) */
.ts-heatmap { padding: 4px 0 8px; }
.hm-summary { font-size: 13px; color: #c8c6bc; margin: 0 0 8px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hm-legend { display: inline-flex; gap: 10px; align-items: center; font-size: 12px; color: #9aa7b6; }
.hm-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; }
.hm-scroll { overflow-x: auto; }
.hm-table { border-collapse: separate; border-spacing: 3px; font-size: 11px; }
.hm-table th { font-weight: 500; color: #7f96ad; padding: 2px 0; text-align: center; min-width: 40px; }
.hm-table th.hm-day { text-align: right; padding-right: 8px; min-width: 48px; color: #c8c6bc; }
.hm-cell { min-width: 40px; height: 34px; text-align: center; border-radius: 6px; color: #10202b; font-weight: 600; }
.hm-cell.h-none { background: rgba(255,255,255,0.04); }
.h-bad { background: #ef8f80; }
.h-warn { background: #f3cf7a; }
.h-ok { background: #8ecfbf; }
.h-good { background: #3f9a8e; color: #eaf6f3; }
.hm-cell.h-good { color: #eaf6f3; }

/* 2026-09-08:零产出账号卡片里的状态徽标(复用 cid-pill,补一个 warn 色) */
.cid-pill.warn { background: rgba(243, 207, 122, 0.18); color: #f3cf7a; border-color: rgba(243, 207, 122, 0.4); }
