/* TokenHub 前端样式：原生 CSS，无第三方 UI 框架 */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 10px 30px rgba(17, 24, 39, 0.05);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 { font-weight: 700; color: var(--text); }

p { line-height: 1.75; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: #f5f6fa;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
}

.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.empty {
  text-align: center !important;
  color: var(--muted);
  font-size: 13px;
  padding: 28px 10px !important;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  background: #eef0f6;
  color: var(--text);
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover { box-shadow: 0 8px 20px rgba(79, 70, 229, 0.32); }

.btn-ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: #c7cbe3; }

.btn-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 13px 24px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
textarea { resize: vertical; line-height: 1.6; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-soft { background: linear-gradient(135deg, #f5f6ff, #fbfbff); }
.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-head h2 { font-size: 15px; margin: 0; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); }

.announce { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; }
.announce strong { color: var(--primary); white-space: nowrap; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: #fbfbff;
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fbfbff; }

/* ---------- 徽标 / 标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: #ecfdf5; color: #047857; }
.badge-danger { background: #fef2f2; color: #b91c1c; }
.badge-warning { background: #fffbeb; color: #b45309; }
.badge-info { background: #eef2ff; color: #4338ca; }
.badge-muted { background: #f3f4f6; color: #6b7280; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 320px; }
.chip {
  background: #f3f4ff;
  color: #4338ca;
  border: 1px solid #e0e7ff;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11.5px;
  font-family: ui-monospace, Consolas, monospace;
}

/* ---------- 提示框 ---------- */
.alert {
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
  border: 1px solid transparent;
}
.alert-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-info { background: #eef2ff; color: #4338ca; border-color: #dbe0ff; }
.alert-warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ---------- 控制台布局 ---------- */
.app-body { background: var(--bg); }

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  padding: 4px 6px;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.25);
  flex-shrink: 0;
}
.brand-mark-art {
  font-family: "Segoe Script", "Snell Roundhand", "Brush Script MT", "Palatino Linotype", Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  padding-right: 2px;
  letter-spacing: -0.02em;
}
.brand-name { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.brand-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 6px 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: #f4f5ff; color: var(--text); }
.nav-item.active { background: #eef0ff; color: var(--primary); font-weight: 600; }
.nav-button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.main { flex: 1; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  flex-wrap: wrap;
}
.page-title { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.01em; }
.page-sub { margin: 0; color: var(--muted); font-size: 13px; }

.userbox { display: flex; align-items: center; gap: 12px; }
.user-name { font-weight: 600; font-size: 13.5px; text-align: right; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef0ff, #dbe0ff);
  color: #4338ca;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
a.userbox { text-decoration: none; color: inherit; }

.content {
  padding: 0 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- 统计卡片 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat { padding: 18px 20px; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 8px; letter-spacing: -0.02em; }
.stat-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ---------- 图表 ---------- */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 200px;
  padding: 20px;
}
.bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  min-width: 0;
}
.bar {
  width: min(100%, 44px);
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #a5b4fc, #4f46e5);
  min-height: 3px;
  transition: height 0.3s ease;
}
.bar-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bar-cost { font-size: 10.5px; color: var(--muted); }

/* ---------- 令牌展示 ---------- */
.key-line { display: flex; gap: 10px; align-items: center; min-width: 0; }
.key-line code {
  flex: 1;
  padding: 9px 12px;
  background: #f8f9ff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 12px;
}

/* ---------- 筛选与分页 ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select {
  width: auto;
  min-width: 130px;
  padding: 8px 10px;
  font-size: 12.5px;
}
.pagination { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* ---------- 弹窗 ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal {
  width: 100%;
  max-width: 580px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  max-height: 90vh;
  overflow: auto;
}
.modal-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px 22px; }
.modal-foot {
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fafbff;
  position: sticky;
  bottom: 0;
}
.icon-btn {
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
[hidden] { display: none !important; }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 80;
}
.toast {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.12);
  font-size: 13px;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: 360px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }

/* ---------- 聊天调试 ---------- */
.chat-card { display: flex; flex-direction: column; }
.chat-log {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 300px;
  max-height: 560px;
  overflow-y: auto;
  background: #fbfcff;
}
.chat-empty { margin: auto; color: var(--muted); font-size: 13px; }
.bubble {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble-assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bubble-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.bubble-streaming::after {
  content: "▍";
  color: var(--primary);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.chat-composer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  align-items: flex-end;
}
.chat-composer textarea { resize: vertical; min-height: 64px; }

.amount-plus { color: var(--success); font-weight: 600; }
.amount-minus { color: var(--danger); font-weight: 600; }

/* ---------- 充值支付 ---------- */
.amount-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.amount-row input { width: 140px; }
.amount-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.amount-chip:hover { border-color: #c7cbe3; color: var(--text); }
.amount-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef0ff;
}

.pay-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pay-method {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.pay-method input { display: none; }
.pay-method.active {
  border-color: #a5b4fc;
  background: #f5f6ff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.pay-method.disabled { opacity: 0.45; cursor: not-allowed; }
.pay-method-name { font-weight: 600; font-size: 13.5px; }

.pay-summary {
  background: linear-gradient(135deg, #f5f6ff, #fbfbff);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 16px;
}
.pay-summary strong { color: var(--text); font-size: 16px; }

.qr-box { text-align: center; padding: 6px 0 0; }
.qr-box img {
  width: 200px;
  height: 200px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.bank-info {
  background: #f8f9ff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  margin: 12px 0 0;
}
.order-info {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
.order-info .label { color: var(--muted); }
.text-center { text-align: center; }

/* ---------- 余额提醒 ---------- */
.form-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 22px 0 10px;
}
.form-section-title:first-child { margin-top: 0; }
.binding-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.binding-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #fbfcff;
}
.binding-panel h3 { margin: 0 0 6px; font-size: 14px; }
.binding-panel p { margin: 0 0 12px; }
.mode-note { font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ---------- 仪表盘交互 ---------- */
.stat-link { display: block; color: inherit; }
.stat-link:hover {
  color: inherit;
  border-color: #cfd3e6;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
}
.stat-arrow {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.stat-link:hover .stat-arrow { opacity: 1; }
.chart-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart-select {
  width: auto;
  min-width: 118px;
  padding: 7px 10px;
  font-size: 12.5px;
}
.chart { overflow-x: auto; }
.chart .bar-wrap { flex: 1 0 20px; }
.chart-dense { gap: 5px; }
.chart-dense .bar-label,
.chart-dense .bar-cost { font-size: 9px; }

/* ---------- 模型广场 ---------- */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.category-tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.category-tab:hover { border-color: #c7cbe3; color: var(--text); }
.category-tab.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef0ff;
}
/* ---------- 首页模型广场 ---------- */
.plaza-section { background: #fff; }
.plaza-head {
  max-width: 1180px;
  margin: 0 auto 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.plaza-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plaza-head h2 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.plaza-enabled-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: #eef8ff;
  border: 1px solid #d6eaff;
  color: #2563eb;
  font-size: 10.5px;
  font-weight: 600;
}
.plaza-head p { margin: 8px 0 0; font-size: 13px; }
.plaza-search {
  width: 320px;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}
.plaza-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 0;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
}
.plaza-search kbd {
  padding: 2px 5px;
  border: 1px solid #e5eaf1;
  border-radius: 4px;
  background: #f8fafc;
  color: #94a3b8;
  font-family: inherit;
  font-size: 10px;
}
.plaza-layout {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.plaza-filters {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  position: sticky;
  top: 16px;
}
.plaza-filter-top { display: flex; align-items: center; justify-content: space-between; }
.plaza-filter-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
}
.plaza-reset {
  border: none;
  background: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.plaza-reset:hover { color: var(--primary); }
.plaza-filter-desc { margin: 5px 0 12px; font-size: 10.5px; color: #94a3b8; line-height: 1.5; }
.plaza-filter-group { border-top: 1px solid #eef2f7; padding: 12px 0 4px; }
.plaza-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
}
.plaza-filter-caret { color: #94a3b8; font-size: 10px; }
.plaza-check {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  color: #475569;
  font-size: 11.5px;
  cursor: pointer;
}
.plaza-check input { width: 13px; height: 13px; margin: 0; accent-color: var(--primary); }
.plaza-check-name { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.plaza-check-count { color: #94a3b8; font-size: 10.5px; }
.vendor-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #94a3b8; }
.vendor-openai { background: #10a37f; }
.vendor-anthropic { background: #d97757; }
.vendor-deepseek { background: #4d6bfe; }
.vendor-google { background: #4285f4; }
.vendor-moonshot { background: #111827; }
.vendor-alibaba { background: #ff6a00; }
.vendor-bytedance { background: #325ab4; }
.vendor-zhipu { background: #6d5efc; }
.vendor-minimax { background: #f43f5e; }
.vendor-baichuan { background: #0ea5e9; }
.vendor-yi { background: #22c55e; }
.vendor-mistral { background: #f59e0b; }
.vendor-meta { background: #0866ff; }
.vendor-platform { background: #64748b; }
.plaza-main { min-width: 0; }
.plaza-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.plaza-result-count { color: var(--muted); font-size: 12px; }
.plaza-result-count strong { color: var(--text); font-size: 13px; }
.plaza-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.plaza-seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}
.plaza-seg button {
  border: none;
  background: none;
  border-radius: 999px;
  padding: 4px 9px;
  font: inherit;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
}
.plaza-seg button.active { background: #2563eb; color: #fff; }
.plaza-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.plaza-sort-arrow { color: #94a3b8; font-size: 10px; }
.plaza-view button { padding: 4px 8px; }
.plaza-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.plaza-grid.list-view { grid-template-columns: 1fr; }
.plaza-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.plaza-card:hover {
  border-color: #cbd7e6;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
.plaza-card-head { display: flex; align-items: flex-start; gap: 8px; }
.plaza-vendor-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #64748b;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.plaza-title { flex: 1; min-width: 0; }
.plaza-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plaza-name-row code { font-size: 12.5px; font-weight: 700; color: var(--text); word-break: break-all; }
.plaza-discount {
  padding: 1px 6px;
  border-radius: 5px;
  background: #f97316;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.plaza-sub { margin-top: 3px; color: #94a3b8; font-size: 10px; }
.plaza-actions { display: flex; align-items: center; gap: 4px; }
.plaza-detail-btn {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
  white-space: nowrap;
}
.plaza-detail-btn:hover { border-color: #93c5fd; color: #2563eb; }
.plaza-copy {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
}
.plaza-price-table { border: 1px solid #e8edf4; border-radius: 8px; overflow: hidden; }
.plaza-price-head,
.plaza-price-row {
  display: grid;
  grid-template-columns: .9fr 1fr 1fr .6fr;
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
}
.plaza-price-head { background: #f8fafc; color: #94a3b8; font-size: 9.5px; font-weight: 600; }
.plaza-price-row { border-top: 1px solid #eef2f7; font-size: 10.5px; }
.plaza-price-row > span:first-child { color: #64748b; }
.plaza-price-row strong { color: #2563eb; font-size: 11px; font-weight: 700; text-align: left; }
.plaza-official { color: #94a3b8; text-decoration: line-through; }
.plaza-rate { color: #ef4444; font-size: 10.5px; font-weight: 700; }
.plaza-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.plaza-billing { display: flex; align-items: center; gap: 6px; }
.plaza-billing-label { color: #2563eb; font-size: 10.5px; font-weight: 600; }
.plaza-endpoint { color: #94a3b8; font-size: 9.5px; }
.plaza-perf { display: flex; align-items: center; gap: 8px; color: #94a3b8; font-size: 9.5px; }
.plaza-perf b { color: #64748b; font-weight: 600; }
.plaza-status { display: flex; align-items: center; gap: 4px; }
.signal-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.signal-bars i { display: block; width: 3px; border-radius: 1px; background: #00c853; }
.signal-bars i:nth-child(1) { height: 4px; }
.signal-bars i:nth-child(2) { height: 7px; }
.signal-bars i:nth-child(3) { height: 9px; }
.signal-bars i:nth-child(4) { height: 12px; }
@media (max-width: 1100px) {
  .plaza-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .plaza-layout { grid-template-columns: 1fr; }
  .plaza-filters { position: static; }
}
@media (max-width: 640px) {
  .plaza-grid { grid-template-columns: 1fr; }
  .plaza-card { padding: 12px; }
  .plaza-search { width: 100%; }
}
@media (max-width: 420px) {
  .plaza-price-head,
  .plaza-price-row { grid-template-columns: 1.1fr 1fr .7fr; }
  .plaza-price-head span:nth-child(3),
  .plaza-price-row span:nth-child(3) { display: none; }
}

/* ---------- 首页模型详情抽屉 ---------- */
.public-detail-backdrop {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(3px);
}
.model-detail-drawer {
  width: min(560px, 100%);
  height: 100vh;
  overflow-y: auto;
  padding: 22px 24px 32px;
  background: #fff;
  box-shadow: -20px 0 50px rgba(15, 23, 42, 0.18);
  animation: detail-slide-in 0.24s ease;
}
@keyframes detail-slide-in {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.mdd-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f7;
}
.mdd-head .plaza-vendor-icon { width: 34px; height: 34px; flex-basis: 34px; font-size: 14px; }
.mdd-title-wrap { flex: 1; min-width: 0; }
.mdd-title-row { display: flex; align-items: center; gap: 6px; }
.mdd-title-row h3 { margin: 0; font-size: 18px; word-break: break-all; }
.mdd-copy { font-size: 14px; }
.mdd-sub { display: flex; align-items: center; gap: 8px; margin-top: 5px; color: #94a3b8; font-size: 11px; }
.mdd-billing {
  padding: 2px 7px;
  border-radius: 5px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 10px;
}
.mdd-close { font-size: 24px; }
.mdd-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0; }
.mdd-tab {
  padding: 7px 0;
  border: none;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.mdd-tab.active {
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  color: #111827;
  font-weight: 600;
}
.mdd-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #f8fafc;
}
.mdd-metrics div { display: flex; flex-direction: column; gap: 2px; }
.mdd-metrics span { color: #94a3b8; font-size: 10px; }
.mdd-metrics strong { color: #111827; font-size: 18px; }
.mdd-metrics em { color: #cbd5e1; font-size: 9px; font-style: normal; }
.mdd-section { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mdd-section h4 { margin: 0; font-size: 12px; font-weight: 700; }
.mdd-section span { color: #94a3b8; font-size: 10px; }
.mdd-section-gap { margin-top: 18px; }
.mdd-price-wrap { overflow: hidden; border: 1px solid #e8edf4; border-radius: 10px; }
.mdd-price-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.mdd-price-table th {
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 600;
  text-align: left;
}
.mdd-price-table td { padding: 8px 10px; border-bottom: 1px solid #eef2f7; font-size: 11px; }
.mdd-price-table tr:last-child td { border-bottom: none; }
.mdd-price-table td:first-child { color: #475569; }
.mdd-price { color: #2563eb; font-weight: 700; }
.mdd-official { color: #94a3b8; text-decoration: line-through; }
.mdd-rate { color: #ef4444; font-weight: 700; }
.mdd-model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #fcfdff;
}
.mdd-model-grid > div { display: flex; flex-direction: column; gap: 4px; }
.mdd-model-grid span { color: #94a3b8; font-size: 10px; }
.mdd-model-grid strong { font-size: 12px; }
.mdd-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mdd-chip {
  padding: 2px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  color: #64748b;
  font-size: 9.5px;
}
.mdd-overview { margin: 16px 0 0; color: #475569; font-size: 12px; line-height: 1.8; }
.mdd-privacy {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.mdd-privacy-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 16px;
  font-weight: 700;
}
.mdd-privacy strong { font-size: 12.5px; }
.mdd-privacy p { margin: 5px 0 0; color: #64748b; font-size: 11.5px; line-height: 1.7; }
.mdd-privacy-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mdd-privacy-list span {
  padding: 4px 9px;
  border: 1px dashed #dbe3ee;
  border-radius: 999px;
  color: #94a3b8;
  font-size: 10px;
}
.mdd-api-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
}
.mdd-meta-item { display: flex; flex-direction: column; gap: 3px; }
.mdd-meta-item > span { color: #94a3b8; font-size: 10px; }
.mdd-meta-item code { font-size: 10px; word-break: break-all; }
.mdd-example { margin-top: 12px; }
.mdd-example-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mdd-example pre { max-height: 240px; overflow: auto; margin: 0; }
body.drawer-open { overflow: hidden; }
@media (max-width: 640px) {
  .model-detail-drawer { width: 100%; padding: 18px 16px 26px; }
  .mdd-model-grid { grid-template-columns: 1fr; }
  .mdd-api-meta { grid-template-columns: 1fr; }
}
.model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.model-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.model-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.model-card-name { font-size: 14px; font-weight: 700; word-break: break-all; }
.model-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.category-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.market-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 20px;
}
.market-kicker { font-size: 10px; letter-spacing: 2px; color: var(--accent); font-weight: 700; }
.market-intro h2 { margin: 4px 0 6px; font-size: 22px; }
.market-api { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.market-api code { font-size: 12px; }
.market-grid { margin-top: 14px; }
.market-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  border: 1px solid var(--border);
}
.market-card:hover {
  transform: translateY(-2px);
  border-color: #b9cbea;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .10);
}
.market-model-head { display: flex; align-items: flex-start; gap: 10px; }
.model-avatar {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #1a365d, #2b6cb0);
  color: #fff; font-size: 16px; font-weight: 800;
  box-shadow: 0 4px 10px rgba(43, 108, 176, .22);
}
.market-model-title { flex: 1; min-width: 0; }
.market-model-title code { font-size: 13px; font-weight: 700; color: var(--text); word-break: break-all; }
.discount-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 7px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.market-price-table { border: 1px solid #e4eaf2; border-radius: 10px; overflow: hidden; }
.market-price-head, .market-price-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr .85fr;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
}
.market-price-head { background: #f4f7fb; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.market-price-row { border-top: 1px solid #e8eef5; font-size: 11.5px; }
.market-price-row strong { font-size: 12px; color: var(--text); }
.official-price { color: #94a3b8; text-decoration: line-through; }
.row-discount { color: #059669; font-weight: 700; font-size: 11px; }
.market-model-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.market-card-remark {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.market-status { font-size: 11.5px; color: var(--muted); max-width: 420px; }
.modal.modal-xl { max-width: 980px; width: 94vw; }
.detail-head { align-items: center; }
.detail-avatar { width: 44px; height: 44px; flex-basis: 44px; border-radius: 12px; }
.detail-title-wrap { flex: 1; min-width: 0; }
.detail-title-wrap h3 { margin: 0 0 5px; font-size: 20px; word-break: break-all; }
.detail-sub { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 22px 16px; }
.detail-metric {
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  background: #fbfcff;
  padding: 10px 12px;
}
.detail-metric span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.detail-metric strong { font-size: 17px; color: var(--primary); }
.detail-tabs { display: flex; gap: 6px; padding: 0 22px; border-bottom: 1px solid var(--border); }
.detail-tab {
  border: 0; background: transparent; color: var(--muted);
  padding: 9px 14px; font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent;
}
.detail-tab.active { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
.detail-body { padding-top: 16px; }
.detail-panel { min-height: 120px; }
.detail-section-title { font-size: 13px; font-weight: 700; margin: 14px 0 8px; color: var(--text); }
.detail-section-title:first-child { margin-top: 0; }
.market-detail-table { font-size: 12px; }
.market-detail-table th { background: #f4f7fb; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; margin-top: 12px; }
.detail-info-item { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid #edf1f6; font-size: 12px; }
.detail-info-item > span { flex: 0 0 110px; color: var(--muted); }
.detail-info-item > div { min-width: 0; word-break: break-word; }
.detail-overview { white-space: pre-line; color: var(--text); line-height: 1.8; font-size: 12.5px; }
.detail-metrics-secondary { padding: 0; margin-bottom: 16px; }
.api-example { margin-top: 12px; }
.api-example-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.api-example pre { max-height: 260px; overflow: auto; }
@media (max-width: 760px) {
  .detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .market-price-head, .market-price-row { grid-template-columns: 1fr 1fr 1fr .8fr; }
}
.ledger-table { min-width: 1180px; }
.log-filter-card .filters { align-items: center; gap: 7px; }
.log-filters input[type="date"] { width: 132px; }
.logs-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 0 20px 16px;
}
.log-summary-card {
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff, #f6f9fd);
  padding: 9px 12px;
}
.log-summary-card span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.log-summary-card strong { font-size: 15px; color: var(--primary); }
.log-table { min-width: 1120px; }
.log-main-row td { vertical-align: middle; }
.log-main-row:hover td { background: #fafcff; }
.log-model { display: flex; align-items: center; gap: 7px; }
.log-model-avatar {
  width: 25px; height: 25px; flex: 0 0 25px;
  border-radius: 7px;
  background: linear-gradient(135deg, #2b6cb0, #60a5fa);
  color: #fff; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.log-model code { font-size: 11.5px; white-space: nowrap; }
.log-token-cell { display: flex; flex-direction: column; gap: 2px; }
.log-token-cell strong { font-size: 12.5px; color: var(--text); }
.latency-box {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
  padding: 4px 7px;
  border: 1px solid #e2e9f3;
  border-radius: 8px;
  background: #f9fbff;
}
.latency-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  line-height: 1.45;
}
.latency-label { color: var(--muted); font-size: 10px; }
.latency-value { font-weight: 600; color: #059669; font-variant-numeric: tabular-nums; }
.latency-fast {
  color: #00c853;
  background: rgba(0, 200, 83, 0.10);
  border-radius: 5px;
  padding: 0 4px;
  font-weight: 700;
}
.log-detail-row td { padding: 0 !important; background: #f8fafd; }
.log-detail { border-top: 1px dashed #dbe4ef; padding: 12px 18px 14px; }
.log-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 18px; }
.log-detail-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.log-detail-item span { font-size: 10.5px; color: var(--muted); }
.log-detail-item div { font-size: 11.5px; word-break: break-all; }
.log-error {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  display: flex; gap: 10px;
  font-size: 11.5px; color: #b91c1c;
}
.log-error strong { flex: 0 0 64px; }
.log-error span { word-break: break-all; }
@media (max-width: 900px) {
  .logs-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ledger-model { display: flex; flex-direction: column; gap: 2px; min-width: 170px; }
.ledger-metric { display: flex; align-items: baseline; gap: 5px; line-height: 1.9; white-space: nowrap; font-size: 12px; }
.ledger-metric .metric-label { color: var(--muted); min-width: 24px; }
.ledger-metric .metric-sub { color: var(--muted); font-size: 11px; }
.ledger-metric strong { font-size: 12.5px; }
.price-up { color: #dc2626; }
.price-down { color: #059669; }
.diff-chip { font-size: 10.5px; padding: 1px 4px; border-radius: 5px; font-weight: 600; }
.diff-chip.price-up { background: #fef2f2; }
.diff-chip.price-down { background: #ecfdf5; }
.diff-flat { color: #9ca3af; font-size: 10.5px; }
.ledger-legend { display: inline-flex; gap: 10px; font-size: 11.5px; }
.badge-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.modal.modal-wide { max-width: 1080px; width: 94vw; }
.alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.category-check-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfcff;
}
.model-card-remark {
  margin: 0;
  min-height: 38px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}
.model-price-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}
.model-price-row strong { color: var(--text); }
.model-grid > .empty { grid-column: 1 / -1; }

/* ---------- 首页图片 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.gallery-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eef0f6;
}
.gallery-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
}
.image-thumb {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f3f4f6;
}
.image-preview {
  display: block;
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.qr-editor {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #fbfdff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qr-editor-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.qr-preview {
  width: 132px;
  height: 132px;
  border: 1px dashed #c9d4e3;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  align-self: center;
}
.qr-preview img { width: 100%; height: 100%; object-fit: cover; }
.qr-preview span { font-size: 24px; font-weight: 800; letter-spacing: 1px; color: #c2ccda; }
.qr-editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qr-editor-foot .checkline { margin-bottom: 0; }
@media (max-width: 760px) {
  .qr-grid { grid-template-columns: 1fr; }
}

/* ---------- 页脚 ---------- */
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-main { flex: 1 1 420px; min-width: 280px; }
.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-brand span { font-size: 9px; letter-spacing: 2px; color: var(--muted); font-weight: 600; }
.footer-contacts {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 36px;
  margin-bottom: 16px;
  text-align: left;
}
.footer-contact strong {
  display: block;
  color: var(--text);
  font-size: 12.5px;
  margin-bottom: 4px;
}
.footer-contact span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.footer-copy {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}
.footer-qrs { display: flex; align-items: flex-start; gap: 18px; }
.footer-qr {
  width: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.footer-qr img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}
.footer-qr > span { font-size: 11.5px; font-weight: 600; color: var(--text); }
.footer-qr small { font-size: 10px; color: var(--muted); }
.footer-qr-empty {
  width: 110px;
  height: 110px;
  border: 1px dashed #c9d4e3;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff, #f4f7fb);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.footer-qr-empty span { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #c2ccda; }
.footer-qr-empty em { font-style: normal; font-size: 10px; color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--primary); }

/* ---------- 管理表格 ---------- */
.user-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}
.user-link:hover { text-decoration: underline; }
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sort .sort-indicator { font-size: 10px; color: var(--muted); }
.th-sort.active { color: var(--primary); }
.th-sort.active .sort-indicator { color: var(--primary); }
.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  cursor: pointer;
}
.checkline input { width: auto; margin: 0; }

/* ---------- 模型多选下拉 ---------- */
.model-select { position: relative; }
.model-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
}
.model-select-trigger:hover { border-color: #c7cbe3; }
.model-select-trigger:disabled { opacity: 0.6; cursor: wait; }
.model-select-trigger[aria-expanded="true"] { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12); }
.model-select-arrow { color: var(--muted); font-size: 12px; }
.model-select-panel {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}
.model-select-search { margin-bottom: 8px; padding: 8px 10px; font-size: 12.5px; }
.model-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}
.model-option:hover { background: #f7f8ff; }
.model-option input { width: auto; margin: 0; }
.model-option.hidden { display: none; }
.model-option-all {
  border-bottom: 1px dashed var(--border);
  margin-bottom: 6px;
  padding-bottom: 9px;
  font-weight: 600;
}
.model-select-panel .empty { padding: 14px 8px !important; }

@media (max-width: 1100px) {
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .model-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-contacts { gap: 16px; }
}

@media (max-width: 640px) {
  .pay-methods { grid-template-columns: 1fr; }
  .amount-row input { width: 100%; }
}

/* ---------- 登录 / 注册 ---------- */
.auth-body {
  background: radial-gradient(900px 500px at 50% 0%, #e7e9ff, #f7f8fc 70%);
  min-height: 100vh;
}
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(31, 41, 55, 0.1);
  padding: 34px;
}
.auth-card h1 { font-size: 22px; margin: 22px 0 6px; letter-spacing: -0.01em; }
.auth-card .muted { margin: 0 0 22px; font-size: 13px; }
.auth-card .field { margin-bottom: 16px; }
.auth-foot { margin-top: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.auth-foot .hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; word-break: break-all; }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

/* 密码复杂度提示 */
.password-hint {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.password-hint .hint-item {
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 4px;
}
.password-hint .hint-icon { font-size: 11px; }

/* 图形验证码行 */
.captcha-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.captcha-row canvas {
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
}
.captcha-row input { flex: 1; }
.captcha-row input:placeholder-shown { font-size: 13px; }

/* ---------- 首页 ---------- */
.landing-body { background: #f7f8fc; }
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6vw;
  position: sticky;
  top: 0;
  background: rgba(247, 248, 252, 0.88);
  backdrop-filter: blur(12px);
  z-index: 10;
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}
.landing-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lang-select {
  width: auto;
  min-width: 104px;
  padding: 8px 10px;
  font-size: 12.5px;
  border-radius: 10px;
  background: #fff;
}
.btn-login svg { width: 15px; height: 15px; flex-shrink: 0; }

.hero {
  padding: 84px 6vw 64px;
  text-align: center;
  background: radial-gradient(1100px 480px at 50% -10%, #e6e9ff 0%, rgba(247, 248, 252, 0) 65%);
}
.hero-inner { max-width: 960px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.16;
  margin: 18px auto 16px;
  letter-spacing: -0.025em;
}
.gradient-text {
  background: linear-gradient(120deg, #4f46e5, #8b5cf6 55%, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 660px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; }
.hero-meta { margin-top: 18px; color: var(--muted); font-size: 12.5px; }

.pill {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eef0ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #dbe0ff;
}

.section { padding: 64px 6vw; }
.section-head { max-width: 680px; margin: 0 auto 26px; text-align: center; }
.section-head h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.02em; }
.section-head p { color: var(--muted); margin: 0; font-size: 14px; }

.announce-card {
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  box-shadow: var(--shadow);
}
.announce-card strong { color: var(--primary); white-space: nowrap; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.feature { padding: 24px; }
.feature h3 { margin: 14px 0 8px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.feature-tag {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef0ff, #e0e7ff);
  color: #4338ca;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.code {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  margin: 0 0 14px;
  border: 1px solid #1e293b;
}
.code:last-child { margin-bottom: 0; }

.pricing-wrap { max-width: 860px; margin: 0 auto; }
.quickstart { max-width: 860px; margin: 0 auto; }

/* ---------- 个人资料 ---------- */
.profile-hero { padding: 0; overflow: hidden; }
.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.profile-avatar {
  position: relative;
  width: 76px; height: 76px; flex: 0 0 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
  background: linear-gradient(135deg, #eef0ff, #dbe0ff);
  color: #4338ca;
  font-size: 28px;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar-mask {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 22px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.profile-avatar:hover .profile-avatar-mask { opacity: 1; }
.profile-who { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.profile-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-name-row strong { font-size: 20px; }
.profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.profile-stat {
  display: flex;
  gap: 10px;
  padding: 18px 22px;
  border-right: 1px solid var(--border);
}
.profile-stat:last-child { border-right: none; }
.profile-stat-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex: 0 0 10px; }
.dot-green { background: #00c853; }
.dot-blue { background: #2563eb; }
.dot-purple { background: #a855f7; }
.dot-orange { background: #f59e0b; }
.profile-stat small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.profile-stat strong { display: block; font-size: 18px; color: var(--text); }
.profile-stat em { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.profile-bind-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.profile-bind-row .muted.small { display: block; margin-bottom: 2px; }
.profile-bind-row strong { font-size: 13px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row .btn { white-space: nowrap; }
.twofa-bound {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: 12px;
}
.twofa-icon {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: grid; place-items: center;
  font-weight: 800;
}
.twofa-bound strong { font-size: 13px; }
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stat:nth-child(2) { border-right: none; }
  .profile-stat:nth-child(1), .profile-stat:nth-child(2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .profile-stats { grid-template-columns: 1fr; }
  .profile-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .profile-stat:last-child { border-bottom: none; }
}

.site-footer {
  padding: 40px 6vw 30px;
  text-align: left;
  color: var(--muted);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  background: #fbfcfe;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar .nav {
    flex-direction: row;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .sidebar .nav:last-of-type { margin-left: auto; }
  .nav-label, .sidebar-foot, .brand-sub, .brand-name { display: none; }
  .brand { flex-shrink: 0; padding: 0; }
  .topbar { padding: 18px 18px 0; }
  .content { padding: 0 18px 30px; }
}

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 22px; }
  .hero { padding-top: 56px; }
  .hero-actions { flex-direction: column; }
  .landing-nav { padding: 14px 18px; }
  .section { padding: 44px 18px; }
  .user-name { display: none; }
}
