/* ==========================================================================
   TokenHub UI Kit — 统一设计系统（运营端 / 租户端 / 收银台共用）
   目标：信息密度高但不拥挤；每个页面只有一个主操作；移动端可用。
   ========================================================================== */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f0f2f5;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;
  --text-4: #98a2b3;
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: #eef2ff;
  --success: #039855;
  --success-soft: #ecfdf3;
  --warning: #b54708;
  --warning-soft: #fffaeb;
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --info: #026aa2;
  --info-soft: #f0f9ff;
  --up: #d92d20;
  --down: #039855;
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 4px 12px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .18);
  --sidebar-w: 228px;
  --topbar-h: 58px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size:15.0px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
::selection { background: #c7d2fe; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; font-weight: 700; font-size:14.0px;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px -2px rgba(79, 70, 229, .45);
}
.brand-name { font-size:15.0px; font-weight: 650; letter-spacing: -.01em; }
.brand-sub { font-size:12.0px; color: var(--text-4); margin-top: 1px; }

.nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.nav-group-label {
  font-size:12.0px; font-weight: 600; color: var(--text-4);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 12px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--text-2); font-size:14.5px; font-weight: 500;
  cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; }
.nav-item .badge-dot {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff;
  font-size:11.5px; font-weight: 600; display: grid; place-items: center;
}
.sidebar-foot {
  padding: 12px; border-top: 1px solid var(--border);
  font-size:12.5px; color: var(--text-4);
}
.env-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border-radius: 20px; background: var(--surface-3);
  color: var(--text-3); font-size:12.0px; font-weight: 500;
}
.env-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--success); }

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

.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 15;
}
.topbar-title { font-size:16.0px; font-weight: 650; }
.topbar-sub { font-size:13.0px; color: var(--text-4); margin-left: 2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 4px 4px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size:13.5px;
}
.avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-size:12.0px; font-weight: 700; display: grid; place-items: center;
}

.content { padding: 22px 28px; width: 100%; max-width: none; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.page-title { font-size:22.0px; font-weight: 680; letter-spacing: -.02em; }
.page-desc { font-size:14.0px; color: var(--text-3); margin-top: 3px; }
.page-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.card-title { font-size:14.5px; font-weight: 650; }
.card-desc { font-size:13.0px; color: var(--text-4); }
.card-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }

/* ---------- 指标卡 ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.kpi-label { font-size:13.0px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi-value {
  font-size:26.0px; font-weight: 680; letter-spacing: -.02em; margin-top: 6px;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.kpi-value.sm { font-size:22.0px; }
.kpi-foot { margin-top: 6px; font-size:12.5px; color: var(--text-4); display: flex; align-items: center; gap: 6px; }
.kpi-delta { font-weight: 600; }
.kpi-delta.up { color: var(--up); }
.kpi-delta.down { color: var(--down); }
.kpi-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); opacity: .85; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size:14.0px; }
table.data th {
  text-align: left; font-weight: 600; font-size:12.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 9px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.data td {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text-2);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.strong { color: var(--text); font-weight: 600; }
table.data .mono { font-family: var(--mono); font-size:13.0px; }
.cell-main { color: var(--text); font-weight: 550; }
.cell-sub { font-size:12.5px; color: var(--text-4); margin-top: 2px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }

.table-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.table-toolbar .spacer { flex: 1; }

/* 供应商卡片（模型与定价 → 供应商） */
.prov-card { padding: 14px; border-bottom: 1px solid var(--border); }
.prov-card:last-child { border-bottom: 0; }
.prov-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.prov-card table.data { border: 1px solid var(--border); border-radius: 8px; }
.pager {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  padding: 10px 14px; border-top: 1px solid var(--border); font-size:13.5px; color: var(--text-3);
}

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size:13.0px; font-weight: 550; color: var(--text-2); }
.field .hint { font-size:12.5px; color: var(--text-4); }
.input, .select, textarea.input {
  height: 34px; padding: 0 10px; font-size:14.0px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 70px; }
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.input::placeholder { color: var(--text-4); }
.input.sm, .select.sm { height: 30px; font-size:13.5px; }
.search { position: relative; }
.search .input { padding-left: 30px; width: 220px; }
.search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-4); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 13px; border-radius: var(--radius-sm);
  font-size:14.0px; font-weight: 550; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}
.btn:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.25); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #b42318; color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-3); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { height: 28px; padding: 0 9px; font-size:13.0px; }
.btn.sm svg { width: 13px; height: 13px; }
.btn.link { border: 0; background: none; color: var(--brand); padding: 0 4px; height: auto; font-size:13.5px; }
.btn.link:hover { text-decoration: underline; background: none; }
.btn-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.btn-group .btn { border: 0; border-radius: 0; height: 30px; font-size:13.5px; }
.btn-group .btn + .btn { border-left: 1px solid var(--border); }
.btn-group .btn.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* ---------- 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px; border-radius: 5px;
  font-size:12.5px; font-weight: 550; white-space: nowrap;
  background: var(--surface-3); color: var(--text-3);
}
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.badge.outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-3); }
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  border-radius: 5px; background: var(--surface-3); color: var(--text-3);
  font-size:12.0px; font-weight: 500;
}

/* ---------- 提示条 ---------- */
.notice {
  display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm);
  font-size:13.5px; line-height: 1.55;
  background: var(--info-soft); color: var(--info); border: 1px solid #b9e6fe;
}
.notice.warning { background: var(--warning-soft); color: var(--warning); border-color: #fedf89; }
.notice.danger { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.notice.success { background: var(--success-soft); color: var(--success); border-color: #abefc6; }
.notice svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.notice b { font-weight: 650; }

/* ---------- 空态 / 加载 ---------- */
.empty { padding: 44px 20px; text-align: center; color: var(--text-4); }
.empty-icon {
  width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 12px;
  background: var(--surface-3); display: grid; place-items: center;
}
.empty-title { font-size:14.5px; font-weight: 600; color: var(--text-2); margin-bottom: 3px; }
.empty-desc { font-size:13.5px; }
.skeleton {
  background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%);
  background-size: 400% 100%; animation: shimmer 1.3s infinite;
  border-radius: 5px; height: 14px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(0,0,0,.12);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 弹窗 / 抽屉 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .45);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px; animation: fade .14s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 520px;
  max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  animation: pop .16s ease;
}
.modal.wide { max-width: 720px; }
@keyframes pop { from { transform: translateY(6px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.modal-title { font-size:16.0px; font-weight: 650; }
.modal-desc { font-size:13.5px; color: var(--text-3); margin-top: 2px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot {
  padding: 13px 18px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.icon-btn {
  width: 28px; height: 28px; border-radius: 7px; border: 0; background: transparent;
  color: var(--text-4); cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 94vw);
  background: var(--surface); box-shadow: var(--shadow-lg); z-index: 101;
  display: flex; flex-direction: column; animation: slide .18s ease;
}
@keyframes slide { from { transform: translateX(20px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---------- Toast ---------- */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 9px; min-width: 240px; max-width: 380px;
  padding: 11px 13px; border-radius: var(--radius);
  background: #101828; color: #f9fafb; font-size:14.0px;
  box-shadow: var(--shadow-lg); animation: toastIn .18s ease; pointer-events: auto;
}
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.toast.success svg { color: #6ce9a6; }
.toast.error svg { color: #fda29b; }
.toast.warn svg { color: #fec84b; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab {
  padding: 9px 13px; font-size:14.0px; font-weight: 550; color: var(--text-3);
  border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- 图表 ---------- */
.chart-box { position: relative; width: 100%; }
.chart-box svg { display: block; width: 100%; overflow: visible; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size:13.0px; color: var(--text-3); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }
.chart-tip {
  position: absolute; pointer-events: none; background: #101828; color: #fff;
  font-size:12.5px; padding: 5px 8px; border-radius: 6px; white-space: nowrap;
  transform: translate(-50%, -120%); opacity: 0; transition: opacity .1s; z-index: 5;
}
.chart-box:hover .chart-tip.on { opacity: 1; }

.bar-row { display: grid; grid-template-columns: 120px 1fr 74px; gap: 10px; align-items: center; padding: 6px 0; }
.bar-row .label { font-size:13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 7px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--brand); }
.bar-row .value { text-align: right; font-size:13.5px; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ---------- 描述列表 ---------- */
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 9px 14px; font-size:14.0px; }
.dl dt { color: var(--text-3); font-size:13.5px; }
.dl dd { margin: 0; color: var(--text); word-break: break-all; }
.section-label {
  font-size:12.5px; font-weight: 600; color: var(--text-4);
  text-transform: uppercase; letter-spacing: .05em; margin: 4px 0 10px;
}

/* ---------- 代码片段 ---------- */
pre.code {
  margin: 0; padding: 12px 14px; background: #0f172a; color: #e2e8f0;
  border-radius: var(--radius-sm); font-family: var(--mono); font-size:13.0px;
  line-height: 1.65; overflow-x: auto; position: relative;
}
pre.code .tok-key { color: #93c5fd; }
pre.code .tok-str { color: #86efac; }
pre.code .tok-com { color: #64748b; }
.code-copy {
  position: absolute; top: 8px; right: 8px; height: 24px; padding: 0 8px;
  font-size:12.0px; border-radius: 5px; border: 1px solid #334155;
  background: #1e293b; color: #cbd5e1; cursor: pointer;
}
.code-copy:hover { background: #334155; }

/* ---------- 登录 ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--surface);
}
.auth-side {
  background: linear-gradient(155deg, #312e81 0%, #4338ca 45%, #6d28d9 100%);
  color: #fff; padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.auth-side::after {
  content: ""; position: absolute; width: 460px; height: 460px; right: -160px; bottom: -180px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); border-radius: 50%;
}
.auth-side h1 { font-size:32.0px; line-height: 1.25; letter-spacing: -.025em; margin-top: auto; }
.auth-side p { color: rgba(255,255,255,.78); font-size:15.0px; margin-top: 14px; line-height: 1.7; max-width: 400px; }
.auth-points { margin-top: 26px; display: grid; gap: 10px; position: relative; z-index: 1; }
.auth-point { display: flex; gap: 9px; align-items: flex-start; font-size:14.0px; color: rgba(255,255,255,.9); }
.auth-point svg { width: 16px; height: 16px; margin-top: 2px; color: #a5b4fc; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size:24.0px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--text-3); font-size:14.0px; margin: 6px 0 22px; }
.auth-tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 3px; border-radius: 8px; margin-bottom: 18px; }
.auth-tabs button {
  flex: 1; height: 30px; border: 0; border-radius: 6px; background: transparent;
  font-size:13.5px; font-weight: 550; color: var(--text-3); cursor: pointer;
}
.auth-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-foot { margin-top: 18px; font-size:13.0px; color: var(--text-4); text-align: center; }
.auth-foot a { color: var(--brand); font-weight: 650; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
.auth-hint { margin-top: 10px; font-size:11.5px; color: var(--text-4); text-align: center; line-height: 1.5; }
.signup-card { max-width: 430px; }
.signup-card .sub { margin-bottom: 18px; }
.signup-card .field { margin-bottom: 12px; }
.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1; min-width: 0; }
.code-row .btn { height: 38px; white-space: nowrap; }
.pwd-rules { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size:11.5px; color: var(--text-4); }
.pwd-rules .ok { color: var(--success); }
.signup-agree { display: flex; align-items: flex-start; gap: 7px; font-size:12.5px; color: var(--text-3); line-height: 1.5; }
.signup-agree input { margin-top: 3px; accent-color: var(--brand); }

/* ---------- 工具类 ---------- */
.grid { display: grid; gap: 16px; }
/* 网格子项默认 min-width:auto，长代码块会把整页撑出横向滚动条 */
.grid > * { min-width: 0; }
pre.code { max-width: 100%; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 8px; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.muted { color: var(--text-3); } .dim { color: var(--text-4); }
.small { font-size:13.0px; } .tiny { font-size:12.5px; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.right { margin-left: auto; }
.center { text-align: center; }
.pos { color: var(--up); } .neg { color: var(--down); }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.clickable { cursor: pointer; }
.copy-inline { font-family: var(--mono); font-size:13.0px; color: var(--text-2); }

/* ---------- 移动端 ---------- */
.mobile-only { display: none; }
@media (max-width: 1180px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .app { flex-direction: column; }
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; height: auto; flex-direction: row; border-right: 0;
    border-top: 1px solid var(--border); padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
    z-index: 50;
  }
  .brand, .sidebar-foot, .nav-group-label { display: none; }
  .nav { display: flex; padding: 0; gap: 2px; overflow-x: auto; width: 100%; }
  .nav-item {
    flex: 1 1 0; width: auto; min-width: 0; flex-direction: column; gap: 2px;
    padding: 6px 4px; margin-bottom: 0; font-size:11.5px;
    text-align: center; justify-content: center;
  }
  .nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-item svg { width: 19px; height: 19px; }
  .nav-item .badge-dot { position: absolute; margin: 0; transform: translate(14px, -8px); }
  .content { padding: 14px 14px 84px; }
  .topbar { padding: 0 14px; }
  .page-head { flex-direction: column; gap: 10px; }
  .page-actions { margin-left: 0; width: 100%; }
  .grid-2, .grid-3, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-value { font-size:22.0px; }
  .search .input { width: 100%; }
  .table-toolbar { gap: 6px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .drawer { width: 100%; }
  .dl { grid-template-columns: 96px 1fr; }
  .mobile-only { display: block; }
  .desktop-only { display: none !important; }
  .hide-sm { display: none !important; }
}

/* ===== 模型发布向导 / 供应商图标 ===== */
.wiz-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.wiz-step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-4); }
.wiz-step b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11.5px; background: var(--surface-3); color: var(--text-3); }
.wiz-step.active { color: var(--brand); font-weight: 600; }
.wiz-step.active b { background: var(--brand); color: #fff; }
.wiz-step.done b { background: var(--success); color: #fff; }
.wiz-line { flex: 1; height: 1px; background: var(--border); }
.wiz-pane[hidden] { display: none !important; }
.sw { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-track { width: 38px; height: 21px; border-radius: 999px; background: var(--border-strong);
  transition: background .18s; position: relative; flex: 0 0 auto; }
.sw-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s; }
.sw input:checked + .sw-track { background: var(--brand); }
.sw input:checked + .sw-track::after { transform: translateX(17px); }
.tag-picks { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-pick { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; font-size: 13px; background: var(--surface); user-select: none; }
.tag-pick input { accent-color: var(--brand); }
.tag-pick.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.logo-preview { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.logo-preview .pic { width: 52px; height: 52px; border: 1px dashed var(--border-strong); border-radius: 10px;
  display: grid; place-items: center; overflow: hidden; background: var(--surface-2); font-size: 20px; font-weight: 700; color: var(--brand); }
.logo-preview .pic img { width: 100%; height: 100%; object-fit: cover; }
.logo-preview .tip { font-size: 11.5px; color: var(--text-4); line-height: 1.6; }
.res-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.res-grid th, .res-grid td { border: 1px solid var(--border); padding: 7px 8px; text-align: center; }
.res-grid th { background: var(--surface-2); font-weight: 600; }
.res-grid input { width: 100%; min-width: 78px; text-align: center; }
.res-grid td.num { font-variant-numeric: tabular-nums; }
.price-block { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-top: 10px; background: var(--surface-2); }
.price-block .pb-title { font-size: 12.5px; font-weight: 600; margin-bottom: 10px; color: var(--text-2); }
.period-note { font-size: 11.5px; color: var(--text-4); margin: 6px 0 10px; line-height: 1.6; }
