/* Final design-token calibration: keep same-level components consistent. */
.model-card h3 {
  font-size: 14px !important;
  font-weight: 500;
}

table th {
  background: #f7f8fa !important;
}

.account-dialog-layer,
.key-create-layer {
  background: #11182761 !important;
}

/* API Key list · consumption limit column (2026-11-05) */
.language-key-table{min-width:1120px}
.language-key-table .key-limit-cell{min-width:152px;padding-top:10px;padding-bottom:10px}
.key-limit{width:138px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 8px;color:#71717a;font-size:11px;line-height:16px}
.key-limit-track{grid-column:1/-1;width:100%;height:5px;border-radius:999px;background:#e9edf3;overflow:hidden}
.key-limit-track i{display:block;height:100%;min-width:4px;border-radius:inherit;background:#3d7fc7;transition:width .2s ease}
.key-limit-value{color:#3f3f46;font-size:11px;font-weight:500;white-space:nowrap}
.key-limit>span{color:#71717a;font-size:10px;white-space:nowrap;text-align:right}
.key-limit-unlimited{color:#71717a;font-size:12px}
.app[data-mode="dark"] .key-limit-track{background:#33343a}
.app[data-mode="dark"] .key-limit-value{color:#d4d4d8}
.app[data-mode="dark"] .key-limit>span,.app[data-mode="dark"] .key-limit-unlimited{color:#a1a1aa}

/* API Key limit meter · compact table variant v2 */
.language-key-table .key-limit-cell{min-width:174px;padding-top:8px!important;padding-bottom:8px!important;overflow:visible}
.key-limit{width:156px;display:flex;flex-direction:column;gap:5px;color:#71717a;line-height:1}
.key-limit-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;white-space:nowrap}
.key-limit-value{display:flex;align-items:baseline;min-width:0;font-size:11px;letter-spacing:0}
.key-limit-value strong{color:#18181b;font-size:12px;font-weight:600}
.key-limit-value span{color:#71717a;font-size:10px;font-weight:400}
.key-limit-head em{padding:2px 5px;border-radius:4px;background:#eef6ff;color:#3d7fc7;font-size:9px;font-weight:600;font-style:normal;line-height:12px}
.key-limit-track{position:relative;width:100%;height:6px;border-radius:999px;background:#e9edf3;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(63,63,70,.025)}
.key-limit-track i{display:block!important;height:100%;min-width:5px;border-radius:inherit;transition:width .2s ease,background-color .2s ease}
.key-limit-meta{display:flex;align-items:center;gap:5px;color:#71717a;font-size:10px;line-height:13px;white-space:nowrap}
.key-limit-meta span{color:#3f3f46;font-weight:500}
.key-limit-meta i{display:inline!important;color:#a1a1aa;font-style:normal}
.key-limit-meta i:before{content:"·";margin-right:5px;color:#d4d4d8}
.key-limit-unlimited{display:flex;flex-direction:column;justify-content:center;gap:5px;min-height:38px;line-height:1}
.key-limit-unlimited strong{color:#3f3f46;font-size:12px;font-weight:500}
.key-limit-unlimited span{color:#a1a1aa;font-size:10px}
.app[data-mode="dark"] .key-limit-value strong,.app[data-mode="dark"] .key-limit-meta span,.app[data-mode="dark"] .key-limit-unlimited strong{color:#e4e4e7}
.app[data-mode="dark"] .key-limit-head em{background:rgba(61,127,199,.18);color:#7fb6f5}
.app[data-mode="dark"] .key-limit-track{background:#33343a;box-shadow:none}

/* API Key limit meter · compact hover-detail variant v3 */
.language-key-table .key-limit-cell{position:relative;min-width:150px;padding-top:8px!important;padding-bottom:8px!important;overflow:visible}
.key-limit{position:relative;width:136px;display:flex;flex-direction:column;gap:7px;outline:0}
.key-limit-value{display:flex;align-items:baseline;gap:5px;color:#3f3f46;font-variant-numeric:tabular-nums;white-space:nowrap;line-height:15px}
.key-limit-value strong{color:#18181b;font-size:12px;font-weight:600}
.key-limit-value span{color:#a1a1aa;font-size:10px;font-weight:400}
.key-limit-value b{color:#3f3f46;font-size:11px;font-weight:500}
.key-limit-track{width:100%;height:6px;border-radius:999px;background:#e9edf3;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(63,63,70,.025)}
.key-limit-track i{display:block!important;height:100%;min-width:5px;border-radius:inherit;transition:width .2s ease,background-color .2s ease}
.key-limit-tooltip{position:absolute;left:0;bottom:calc(100% + 9px);z-index:20;display:block;width:max-content;max-width:min(360px,calc(100vw - 24px));padding:7px 10px;border:1px solid #e5e5e5;border-radius:6px;background:#18181b;color:#fff;font-size:11px;font-weight:400;line-height:16px;white-space:normal;overflow-wrap:anywhere;box-shadow:0 7px 20px rgba(24,24,27,.16);opacity:0;visibility:hidden;transform:translateY(3px);pointer-events:none;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}
.key-limit-tooltip:after{content:"";position:absolute;left:18px;top:100%;border:5px solid transparent;border-top-color:#18181b}
.key-limit:hover .key-limit-tooltip,.key-limit:focus-visible .key-limit-tooltip,.key-limit:focus-within .key-limit-tooltip{opacity:1;visibility:visible;transform:translateY(0)}
.key-limit:focus-visible .key-limit-track{box-shadow:0 0 0 3px #7fb6f538}
.key-limit-unlimited{display:inline;color:#71717a;font-size:12px;font-weight:400;line-height:20px}
.app[data-mode="dark"] .key-limit-value strong{color:#f4f4f5}
.app[data-mode="dark"] .key-limit-value b{color:#d4d4d8}
.app[data-mode="dark"] .key-limit-track{background:#33343a;box-shadow:none}
.app[data-mode="dark"] .key-limit-tooltip{border-color:#33343a;background:#f4f4f5;color:#18181b}
.app[data-mode="dark"] .key-limit-tooltip:after{border-top-color:#f4f4f5}

/* API Key limit · numbers-only variant v4 */
.language-key-table .key-limit-cell{min-width:136px;padding-top:0!important;padding-bottom:0!important;overflow:visible}
.key-limit.key-limit-numbers-only{position:relative;width:max-content;max-width:130px;display:inline-flex;align-items:center;gap:0;min-height:28px;outline:0;cursor:default}
.key-limit-numbers-only .key-limit-value{display:flex;align-items:baseline;gap:5px;color:#3f3f46;font-variant-numeric:tabular-nums;white-space:nowrap;line-height:18px}
.key-limit-numbers-only .key-limit-value strong{color:#18181b;font-size:12px;font-weight:500}
.key-limit-numbers-only .key-limit-value span{color:#a1a1aa;font-size:10px;font-weight:400}
.key-limit-numbers-only .key-limit-value b{color:#3f3f46;font-size:12px;font-weight:500}
.key-limit-numbers-only .key-limit-track,.key-limit-numbers-only .key-limit-head,.key-limit-numbers-only .key-limit-meta{display:none!important}
.key-limit-numbers-only .key-limit-tooltip{position:absolute!important;left:50%!important;bottom:calc(100% + 7px)!important;z-index:30!important;display:block!important;width:max-content!important;max-width:min(360px,calc(100vw - 24px))!important;padding:7px 10px!important;border:0!important;border-radius:6px!important;background:#18181b!important;color:#fff!important;font-size:11px!important;font-weight:400!important;line-height:16px!important;white-space:normal!important;overflow-wrap:anywhere!important;box-shadow:0 7px 20px rgba(24,24,27,.16)!important;opacity:0!important;visibility:hidden!important;transform:translate(-50%,3px)!important;pointer-events:none!important;transition:opacity .15s ease,transform .15s ease,visibility .15s ease!important}
.key-limit-numbers-only .key-limit-tooltip:after{content:"";position:absolute;left:50%;top:100%;transform:translateX(-50%);border:5px solid transparent;border-top-color:#18181b}
.key-limit-numbers-only:hover .key-limit-tooltip,.key-limit-numbers-only:focus-visible .key-limit-tooltip{opacity:1!important;visibility:visible!important;transform:translate(-50%,0)!important}
.key-limit-numbers-only:focus-visible{border-radius:4px;box-shadow:0 0 0 3px #7fb6f538}
.key-limit-unlimited{display:inline!important;color:#71717a!important;font-size:12px!important;font-weight:400!important;line-height:20px!important}

/* Language API key table · keep status and actions visible after adding limit column */
.key-panel{overflow:hidden}
.language-key-table{width:100%!important;min-width:0!important;table-layout:fixed}
.language-key-table th,.language-key-table td{padding-left:10px!important;padding-right:10px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.language-key-table th:nth-child(1){width:6%}
.language-key-table th:nth-child(2){width:17%}
.language-key-table th:nth-child(3){width:10%}
.language-key-table th:nth-child(4){width:9%}
.language-key-table th:nth-child(5){width:15%}
.language-key-table th:nth-child(6){width:9%}
.language-key-table th:nth-child(7){width:13%}
.language-key-table th:nth-child(8){width:9%}
.language-key-table th:nth-child(9){width:6%}
.language-key-table th:nth-child(10){width:6%}
.language-key-table td:nth-child(7),.language-key-table td:nth-child(10){overflow:visible;text-overflow:clip}
.language-key-table .key-limit-cell{min-width:0!important}
.language-key-table .key-limit-numbers-only{max-width:100%;font-size:11px}
.language-key-table .key-row-actions{gap:8px;white-space:nowrap}
.language-key-table .key-row-actions button{font-size:12px!important}
@media(max-width:1280px){
  .language-key-table th,.language-key-table td{padding-left:8px!important;padding-right:8px!important}
  .language-key-table th:nth-child(2){width:16%}
  .language-key-table th:nth-child(5){width:14%}
  .language-key-table th:nth-child(7){width:14%}
  .language-key-table th:nth-child(10){width:8%}
}

/* Toast semantic states · destructive must not inherit success green */
.account-feedback.account-toast.account-toast-error{
  color:#dc2626!important;
  background:#fef2f2!important;
  border-color:#fecaca!important;
}
.account-feedback.account-toast.account-toast-error>span{
  color:#fff!important;
  background:#dc2626!important;
}
.app[data-mode="dark"]~.account-feedback.account-toast.account-toast-error,
.account-feedback.account-toast.account-toast-error[data-mode="dark"]{
  color:#fca5a5!important;
  background:#2a1719!important;
  border-color:#7f1d1d!important;
}

/* API Key row actions · text-only interaction */
.language-key-table .key-row-actions button,
.language-key-table .key-row-actions button:hover,
.language-key-table .key-row-actions button:active,
.language-key-table .key-row-actions button:focus,
.language-key-table .key-row-actions button:focus-visible{
  background:transparent!important;
  background-color:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  outline:0!important;
  text-decoration:none!important;
  transform:none!important;
}
.language-key-table .key-row-actions button.edit{color:#3d7fc7!important}
.language-key-table .key-row-actions button.edit:hover,
.language-key-table .key-row-actions button.edit:focus-visible{color:#2f6fb7!important}
.language-key-table .key-row-actions button.danger{color:#dc2626!important}
.language-key-table .key-row-actions button.danger:hover,
.language-key-table .key-row-actions button.danger:focus-visible{color:#b91c1c!important}
.language-key-table .key-row-actions button.enable{color:#3d7fc7!important}
.language-key-table .key-row-actions button.enable:hover,
.language-key-table .key-row-actions button.enable:focus-visible{color:#2f6fb7!important}

/* Language API key table · align first column with panel content inset */
.language-key-table th:first-child,
.language-key-table td:first-child{
  padding-left:16px!important;
}
.language-key-table th:last-child,
.language-key-table td:last-child{
  padding-right:16px!important;
}

/* API Key limit · spent amount uses the blue theme accent */
.key-limit-numbers-only .key-limit-value strong{
  color:#3d7fc7!important;
}
.app[data-mode="dark"] .key-limit-numbers-only .key-limit-value strong{
  color:#7fb6f5!important;
}
/* Standard action buttons: page, card and dialog footer all use 36px. */
.key-create-footer button{height:36px!important}

/* Billing list views share one fixed eight-column grid. Switching between
   model and API Key keeps every metric column in the same horizontal slot. */
.bill-table table{
  table-layout:fixed!important;
}
.bill-table th,
.bill-table td{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.bill-table th:nth-child(1),
.bill-table td:nth-child(1){width:12%!important}
.bill-table th:nth-child(2),
.bill-table td:nth-child(2){width:17%!important}
.bill-table th:nth-child(3),
.bill-table td:nth-child(3){width:10%!important}
.bill-table th:nth-child(4),
.bill-table td:nth-child(4){width:13%!important}
.bill-table th:nth-child(5),
.bill-table td:nth-child(5){width:12%!important}
.bill-table th:nth-child(6),
.bill-table td:nth-child(6){width:14%!important}
.bill-table th:nth-child(7),
.bill-table td:nth-child(7){width:12%!important}
.bill-table th:nth-child(8),
.bill-table td:nth-child(8){width:10%!important}

/* API key toolbar · compact icon-to-label spacing for the create action. */
.key-panel .key-actions .primary-btn{
  gap:4px!important;
}
/* Marketplace category tabs · align with the usage page .product-tabs component:
   24px gap, full-width separator under the toolbar row, active underline sitting on it
   (CSS fallback so the underline never depends on the JS sliding indicator). */
.marketplace-page .marketplace-tabs.sliding-tabs{
  border-bottom:1px solid var(--border, #e4e4e7)!important;
  gap:24px!important;
  height:auto!important;
  align-self:stretch!important;
}
.marketplace-page .marketplace-tabs.sliding-tabs > button{
  height:auto!important;
}
.marketplace-tabs.sliding-tabs > button.active:after{
  content:""!important;
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:-1px!important;
  height:2px!important;
  background:var(--primary, #18181b)!important;
}
.marketplace-page .marketplace-tab-indicator{
  background:#18181b!important;
}
.app[data-mode="dark"] .marketplace-page .marketplace-tools{
  border-bottom-color:var(--line)!important;
}
.app[data-mode="dark"] .marketplace-tabs.sliding-tabs > button.active:after{
  background:#f4f4f5!important;
}
.app[data-mode="dark"] .marketplace-page .marketplace-tab-indicator{
  background:#f4f4f5!important;
}

/* ===== 2026-11-13 走查修复（前端设计侧） ===== */

/* 1) 模型广场 · 模型 tag 按模型详情能力标签(capability)配色定制
   Image=purple(图像生成) / LLM=cyan(中文提示词) / Video=orange(长文本渲染) / Audio=green(复杂场景理解)；厂商标签蓝色 */
.model-tags span.model-type.type-image{color:#7c3aed!important;background:#f5f1ff!important;border:1px solid #e3d8ff!important}
.model-tags span.model-type.type-llm{color:#c2410c!important;background:#fff1e6!important;border:1px solid #ffe0c9!important}
.model-tags span.model-type.type-video{color:#0e7490!important;background:#e7f7fd!important;border:1px solid #cfeef8!important}
.model-tags span.model-type.type-audio{color:#7C5CD6!important;background:#F3EFFF!important;border:1px solid #E0DAFF!important}
.marketplace-page .model-tags span.model-vendor{color:#3D7FC7!important;background:#EEF6FF!important;border:1px solid #d8e6f7!important}

/* 2) 认证主体管理 · 认证后卡片：去掉「管理员主体」标题后的横线，卡片间距对齐全局 14px */
.entity-section h2:after{content:none!important}
.entity-cert-card{margin-top:14px!important}

/* 3) 密钥列表 · 已消费/限额：进度条 + 文字，阈值变色 */
.key-limit-numbers-only{flex-direction:column;align-items:flex-start;gap:0}
.key-limit-numbers-only .key-limit-value{white-space:nowrap}
.key-limit-bar{display:block;width:118px;height:4px;border-radius:2px;background:#e9ebf0;margin-top:5px;position:relative;overflow:hidden}
.key-limit-bar:after{content:"";position:absolute;top:0;left:0;bottom:0;width:var(--p,0%);background:#3d7fc7;border-radius:2px}
.key-limit-numbers-only.is-warning .key-limit-bar:after{background:#d97706}
.key-limit-numbers-only.is-exceeded .key-limit-bar:after{background:#dc2626}
.key-limit-numbers-only.is-exceeded .key-limit-value strong{color:#dc2626!important}

/* 4) 创建密钥弹窗 · 模型模糊搜索框 */
.key-create-model-search{width:100%;height:36px;border:1px solid #dfe3ea;border-radius:8px;padding:0 12px;font:inherit;font-size:12px;color:#232631;outline:0;margin-bottom:10px;transition:border-color .15s,box-shadow .15s}
.key-create-model-search::placeholder{color:#a1a1aa}
.key-create-model-search:focus{border-color:#3d7fc7;box-shadow:0 0 0 3px rgba(127,182,245,.22)}
.key-create-model-search{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-position:right 12px center;
  background-repeat:no-repeat;
  background-size:14px 14px;
  padding-right:34px!important;
}
.key-create-models label[hidden]{display:none!important}

/* 5) 创建成功页 · Base URL 行 */

/* 6) 模型详情 · 价格档位列不换行 */
.marketplace-pricing-table td{white-space:nowrap}
.marketplace-pricing-table th:nth-child(2),.marketplace-pricing-table td:nth-child(2){min-width:96px}

/* 7) 密钥列表 · 已消费/限额、创建时间列宽缩短 */
.language-key-table th:nth-child(7),.language-key-table td:nth-child(7){width:150px}
.language-key-table th:nth-child(8),.language-key-table td:nth-child(8){width:118px}

/* 8) 用量明细 · 视频生成 tab：双指标卡布局 + Key 名称标签 */
.summary-grid-video{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.toolbar .control-label{font-size:13px;white-space:nowrap}

/* 9) 模型广场 · 筛选头「清空」按钮文字右对齐 */
.marketplace-page .filter-title{display:flex!important;justify-content:space-between!important;align-items:center!important}
.marketplace-page .filter-title button{margin-left:auto!important;text-align:right!important;flex:none;padding:0!important}

/* 10) 模型广场 · 一级 tab 行高对齐用量明细（product-tabs 42px），间距/字体已一致 */
.marketplace-page .marketplace-tools{min-height:42px!important;height:42px!important}

/* 11) 模型详情 · 价格矩阵表：档位转为两列价格列，表头与内容全部左对齐 */
