/* ===========================================================
   Tokernk — 设计系统落地
   画布 #0B0E13 · 主色 静青 #37D7AC · 分层卡片 · 8pt 栅格
   目标：长看不累、文字清楚、层次自然（不靠发光做区分）
   =========================================================== */

:root {
  /* 底色：中性深灰蓝，去掉原来的紫调 */
  --bg: #0b0e13;
  --bg-soft: #10151c;

  /* 卡片分层：靠亮度差和描边区分，而不是模糊玻璃 */
  --surface-1: #151a22;
  --surface-2: #1a202a;
  --surface-3: #222935;

  /* 主色：比原来的 #3DF5C2 更沉，去掉荧光感 */
  --mint: #37d7ac;
  --mint-dim: #28b18e;
  --mint-soft: rgba(55, 215, 172, 0.13);
  --cyan: #62c6e8;
  --violet: #a294f6;
  --amber: #eab064;
  --rose: #ef7d96;

  /* 文字四级：都在卡片底色上过了 4.5:1 对比度 */
  --t1: #f2f5fa;
  --t2: #cad2e0;
  --t3: #a4aebf;
  --t4: #8b95a7;

  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.06);

  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 20px;
  --pad: 8px;

  /* 字体：拉丁字体在前、中文回退在后，避免中文被拉到奇怪的西文字形上 */
  --f-display: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
    "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", "SF Mono", "JetBrains Mono", Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
  --t-fast: 140ms;
  --t-med: 200ms;
  --t-slow: 320ms;

  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.26);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.34);
  --ring: 0 0 0 3px rgba(55, 215, 172, 0.16);
}

* { box-sizing: border-box; }

/* hidden 必须压过 .app / .auth-gate 的 display:grid，否则登录门会一直盖住应用 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--t1);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  scroll-behavior: smooth;
}

body { overflow-x: hidden; }

/* 去除移动端点击默认高亮，保留自定义反馈 */
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }

/* 可见焦点环：键盘操作可识别，鼠标点击不出现 */
:focus-visible {
  outline: 2px solid rgba(55, 215, 172, 0.6);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 尊重系统减弱动效偏好：关闭装饰动画与过渡 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 极光背景（只做氛围，压低到不会干扰阅读） ---------- */
.aurora {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(38px);
}
.aurora-a {
  width: 880px; height: 880px; top: -400px; left: -220px;
  background: radial-gradient(circle, rgba(88, 160, 210, 0.10), rgba(88, 160, 210, 0.03) 48%, transparent 70%);
}
.aurora-b {
  width: 820px; height: 820px; top: -280px; right: -280px;
  background: radial-gradient(circle, rgba(140, 120, 225, 0.09), rgba(140, 120, 225, 0.025) 50%, transparent 72%);
}
.aurora-c {
  width: 760px; height: 620px; bottom: -360px; left: 34%;
  background: radial-gradient(circle, rgba(55, 215, 172, 0.06), transparent 68%);
}

/* ---------- 布局 ---------- */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 254px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- 侧栏 ---------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 16px;
  border-right: 1px solid var(--line-soft);
  background: var(--bg-soft);
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 0; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--mint-soft);
  border: 1px solid rgba(55, 215, 172, 0.30);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--f-display); font-size: 18px; font-weight: 600; letter-spacing: -0.1px; }
.brand-text span { font-family: var(--f-mono); font-size: 11.5px; color: var(--t4); letter-spacing: 1.1px; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 12px;
  border-radius: var(--r-md);
  color: var(--t2);
  text-decoration: none;
  font-size: 15px;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.nav-item svg { flex: none; opacity: 0.9; }
.nav-item:hover { background: var(--surface-2); color: var(--t1); }
.nav-item.active {
  background: var(--mint-soft);
  color: var(--mint);
  box-shadow: inset 0 0 0 1px rgba(55, 215, 172, 0.22);
}
.nav-item.active::before {
  content: "";
  position: absolute; left: -16px; top: 12px;
  width: 3px; height: 20px; border-radius: 2px;
  background: var(--mint);
}
.nav-count {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-style: normal;
  color: var(--t3);
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 7px;
  border-radius: 999px;
}

.pool {
  margin-top: auto;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--line);
}
.pool h4 {
  margin: 0 0 10px;
  font-size: 12.5px;
  letter-spacing: 0.8px;
  color: var(--t3);
  font-weight: 600;
  font-family: var(--f-body);
  text-transform: uppercase;
}
.pool-row { margin-bottom: 9px; }
.pool-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--t3); margin-bottom: 5px; }
.pool-top b { color: var(--t2); font-weight: 500; }
.pool-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.10); overflow: hidden; }
.pool-bar i { display: block; height: 100%; border-radius: 2px; background: var(--mint); }
.pool-bar i.warn { background: var(--amber); }
.pool-bar i.bad { background: var(--rose); }

/* ---------- 主区 ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 14, 19, 0.92);
  backdrop-filter: blur(12px);
}

.omni { position: relative; flex: 1; max-width: 560px; }
.omni-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--t4); }
.omni input {
  width: 100%; height: 44px;
  padding: 0 48px 0 40px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--line);
  color: var(--t1);
  font-family: var(--f-body);
  font-size: 14.5px;
  outline: none;
  transition: border-color 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
}
.omni input::placeholder { color: var(--t4); }
.omni input:focus {
  border-color: rgba(55, 215, 172, 0.5);
  background: var(--surface-2);
  box-shadow: var(--ring);
}
.omni-kbd {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-family: var(--f-mono); font-size: 11.5px; color: var(--t4);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; background: var(--surface-2);
}

.omni-pop {
  position: absolute; left: 0; right: 0; top: 44px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 40;
}
.omni-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--t2);
  cursor: pointer;
}
.omni-row:hover, .omni-row.hl { background: var(--surface-3); }
.omni-row .omni-kind { margin-left: auto; font-family: var(--f-mono); font-size: 12px; color: var(--t4); }
.omni-row.accent { color: var(--mint); }
.omni-row.accent .omni-kind { color: var(--mint-dim); }

.top-meta { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(55, 215, 172, 0.16);
  animation: pulse 2.4s var(--ease) infinite;
}
.live-dot.off { background: var(--rose); box-shadow: 0 0 0 3px rgba(239, 125, 150, 0.16); }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}
.live-text { font-size: 12.5px; color: var(--t3); font-family: var(--f-body); }
.ghost-btn {
  height: 32px; padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  color: var(--t2); font-size: 13.5px; font-family: var(--f-body);
  cursor: pointer;
  transition: all 160ms var(--ease);
}
.ghost-btn:hover { background: var(--surface-3); color: var(--t1); border-color: rgba(55, 215, 172, 0.3); }

/* 主视图入场只做位移，不用 opacity 淡入：
   动画被浏览器暂停（后台标签、最小化）时内容不会停留在不可见状态。 */
.view { padding: 30px 32px 70px; animation: viewIn 240ms var(--ease); }
@keyframes viewIn { from { transform: translateY(6px); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 通用件 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-body);
  font-size: 12px; letter-spacing: 0.7px; text-transform: uppercase;
  font-weight: 600;
  color: var(--mint-dim);
  margin-bottom: 8px;
}
.kicker i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.page-title { margin: 0; font-family: var(--f-display); font-size: 30px; font-weight: 600; letter-spacing: -0.2px; color: var(--t1); }
.page-sub { margin: 8px 0 0; font-size: 14.5px; color: var(--t3); max-width: 720px; line-height: 1.75; }

.card {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--surface-1);
  border: 1px solid var(--line);
  padding: 22px 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.card:hover { border-color: rgba(255, 255, 255, 0.16); }
.card.tint-mint {
  background: linear-gradient(180deg, #17241f, #141920);
  border-color: rgba(55, 215, 172, 0.28);
}
.card.tint-violet {
  background: linear-gradient(180deg, #1b1a2b, #141920);
  border-color: rgba(162, 148, 246, 0.26);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--t1); }
.card-note { font-family: var(--f-body); font-size: 12px; color: var(--t3); letter-spacing: 0.4px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { display: flex; flex-direction: column; gap: 10px; min-height: 134px; justify-content: space-between; }
.kpi-label { font-size: 13px; color: var(--t3); letter-spacing: 0.2px; }
.kpi-value { font-family: var(--f-display); font-size: 34px; font-weight: 600; line-height: 1.05; letter-spacing: -0.6px; }
.kpi-value small { font-size: 14px; color: var(--t3); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--t3); }
.kpi-foot .up { color: var(--mint-dim); }
.kpi-foot .warn { color: var(--amber); }
.kpi-foot .bad { color: var(--rose); }

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

.rank-row { display: grid; grid-template-columns: 138px minmax(0, 1fr) 52px 62px; align-items: center; gap: 10px; padding: 10px 0; }
.rank-name { font-size: 14.5px; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 3px; transition: width 600ms var(--ease); }
.rank-pct { font-family: var(--f-mono); font-size: 13px; color: var(--t2); text-align: right; }
.rank-lat { font-family: var(--f-mono); font-size: 12.5px; color: var(--t3); text-align: right; }

.insight {
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  margin-bottom: 10px;
  transition: all 180ms var(--ease);
}
.insight:hover { border-color: rgba(255, 255, 255, 0.16); background: var(--surface-3); }
.insight-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.insight-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.insight-title { font-size: 14.5px; font-weight: 600; color: var(--t1); }
.insight-body { font-size: 13px; color: var(--t3); line-height: 1.7; margin: 0 0 10px; }
.insight-act {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--mint);
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--f-body);
}
.insight-act:hover { text-decoration: underline; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-weight: 600; font-size: 12px;
  color: var(--t3); letter-spacing: 0.4px;
  padding: 0 8px 12px; border-bottom: 1px solid var(--line-soft);
}
.tbl td { padding: 12px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); color: var(--t2); }
.tbl tbody tr { cursor: pointer; transition: background 140ms var(--ease); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr:last-child td { border-bottom: none; }
.tbl .cell-name { color: var(--t1); font-weight: 600; }
.tbl .mono { font-family: var(--f-mono); font-size: 13px; color: var(--t3); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px;
  border-radius: 999px;
  font-size: 12px; font-family: var(--f-body); letter-spacing: 0.1px;
  white-space: nowrap;
}
.pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.active { color: var(--mint-dim); background: rgba(55, 215, 172, 0.11); border: 1px solid rgba(55, 215, 172, 0.26); }
.pill.expiring { color: #d9a44f; background: rgba(234, 176, 100, 0.11); border: 1px solid rgba(234, 176, 100, 0.26); }
.pill.limited { color: #dd9a52; background: rgba(221, 154, 82, 0.11); border: 1px solid rgba(221, 154, 82, 0.26); }
.pill.offline { color: #e07e93; background: rgba(239, 125, 150, 0.11); border: 1px solid rgba(239, 125, 150, 0.24); }

/* 平台卡网格 */
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  height: 34px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  color: var(--t2); font-size: 13.5px; font-family: var(--f-body);
  cursor: pointer; transition: all 150ms var(--ease);
}
.chip:hover { color: var(--t1); background: var(--surface-3); }
.chip.on { color: var(--mint); background: var(--mint-soft); border-color: rgba(55, 215, 172, 0.36); }
.chip .n { font-family: var(--f-mono); font-size: 11.5px; opacity: 0.75; margin-left: 4px; }

.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.prov {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.prov:hover {
  transform: translateY(-2px);
  border-color: rgba(55, 215, 172, 0.34);
  box-shadow: var(--shadow-hover);
}
.prov-top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.prov-logo {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--f-display); font-size: 16px; font-weight: 600;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--t1);
  overflow: hidden;
}
.prov-logo img { width: 20px; height: 20px; object-fit: contain; }
.prov-id { min-width: 0; }
.prov-name { font-size: 15px; font-weight: 600; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prov-host { font-family: var(--f-mono); font-size: 12px; color: var(--t4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prov-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tag {
  font-size: 12px; padding: 2px 8px; border-radius: 6px;
  background: var(--surface-2);
  color: var(--t3); border: 1px solid var(--line-soft);
}
.prov-quota { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.prov-quota .qbar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.10); overflow: hidden; }
.prov-quota .qbar i { display: block; height: 100%; border-radius: 3px; }
.prov-quota .qpct { font-family: var(--f-mono); font-size: 12.5px; color: var(--t2); width: 34px; text-align: right; }
.prov-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--t3); font-family: var(--f-body); }

/* ---------- 网址接入 ---------- */
.scan-input-wrap { display: flex; gap: 10px; align-items: center; }
.scan-field {
  flex: 1; display: flex; align-items: center; gap: 12px;
  height: 68px; padding: 0 12px 0 18px;
  border-radius: 14px;
  background: var(--surface-1);
  border: 1px solid rgba(55, 215, 172, 0.34);
  transition: all 180ms var(--ease);
}
.scan-field:focus-within { border-color: rgba(55, 215, 172, 0.6); box-shadow: var(--ring); }
.scan-field.err { border-color: rgba(239, 125, 150, 0.55); box-shadow: 0 0 0 4px rgba(239, 125, 150, 0.08); }
.scan-field input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--t1); font-family: var(--f-mono); font-size: 15.5px;
}
.scan-field input::placeholder { color: var(--t4); font-family: var(--f-body); font-size: 14.5px; }
.btn-primary {
  height: 48px; padding: 0 22px;
  border-radius: 999px; border: none;
  background: var(--mint);
  color: #04120e;
  font-family: var(--f-body); font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  box-shadow: 0 2px 10px rgba(55, 215, 172, 0.20);
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease), background 140ms var(--ease), opacity 140ms;
}
.btn-primary:hover { background: #45e3ba; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(55, 215, 172, 0.26); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-line {
  height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--t2); font-size: 13.5px; cursor: pointer; font-family: var(--f-body);
}
.btn-line:hover { background: var(--surface-3); color: var(--t1); border-color: rgba(55, 215, 172, 0.3); }

.scan-checks { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; }
.scan-checks span { display: inline-flex; align-items: center; gap: 5px; }
.dot-s { width: 4px; height: 4px; border-radius: 50%; }

.scan-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.step {
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  transition: all 220ms var(--ease);
}
.step.on { background: var(--mint-soft); border-color: rgba(55, 215, 172, 0.34); }
.step.done { border-color: rgba(55, 215, 172, 0.24); }
.step-num { font-family: var(--f-mono); font-size: 12.5px; color: var(--t3); margin-bottom: 6px; letter-spacing: 0.6px; }
.step.on .step-num, .step.done .step-num { color: var(--mint-dim); }
.step-name { font-size: 14px; font-weight: 600; color: var(--t2); margin-bottom: 4px; }
.step.on .step-name { color: var(--t1); }
.step-desc { font-size: 12.5px; color: var(--t3); line-height: 1.6; min-height: 28px; }

.progress { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.09); overflow: hidden; margin-bottom: 10px; }
.progress i { display: block; height: 100%; border-radius: 3px; background: var(--mint); transition: width 320ms var(--ease); }
.scan-log {
  font-family: var(--f-mono); font-size: 12.5px; color: var(--t2);
  max-height: 152px; overflow-y: auto; line-height: 1.9;
}
.scan-log div { animation: fade 200ms var(--ease); }
.scan-log .t { color: var(--t4); margin-right: 8px; }

/* 结果面板 */
.result-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.field-row {
  display: grid; grid-template-columns: 124px minmax(0, 1fr) 52px;
  align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.field-row:last-child { border-bottom: none; }
.field-key { font-size: 13px; color: var(--t3); }
.field-val { font-size: 14px; color: var(--t1); word-break: break-word; }
.field-val input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 9px; color: var(--t1); font-size: 14px; font-family: var(--f-body); outline: none;
}
.field-val input:focus { border-color: rgba(55, 215, 172, 0.5); }
.conf { font-family: var(--f-mono); font-size: 12.5px; text-align: right; }
.conf.high { color: var(--mint-dim); }
.conf.mid { color: var(--cyan); }
.conf.low { color: var(--amber); }
.conf.zero { color: var(--t4); }
.evi { font-size: 12px; color: var(--t3); margin-top: 4px; font-style: normal; display: block; line-height: 1.6; }
.evi b { color: var(--t2); font-weight: 500; font-family: var(--f-mono); }

.page-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 13px; color: var(--t3); border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.page-item:last-child { border-bottom: none; }
.page-item .role { font-family: var(--f-body); font-size: 12px; color: var(--mint-dim); background: var(--mint-soft); padding: 1px 7px; border-radius: 5px; flex: none; }
.page-item .u { font-family: var(--f-mono); font-size: 12px; color: var(--t4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.warn-line {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(234, 176, 100, 0.10);
  border: 1px solid rgba(234, 176, 100, 0.26);
  color: #ddb277; font-size: 13px; margin-bottom: 7px;
}

/* ---------- 抽屉 ---------- */
.drawer-shell { position: fixed; inset: 0; z-index: 60; }
.drawer-mask { position: absolute; inset: 0; background: rgba(4, 6, 10, 0.72); backdrop-filter: blur(2px); animation: fade 200ms var(--ease); }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(620px, 96vw);
  background: var(--bg-soft);
  border-left: 1px solid var(--line);
  padding: 26px 28px 46px;
  overflow-y: auto;
  animation: slideIn 260ms var(--ease);
}
@keyframes slideIn { from { transform: translateX(26px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.drawer-title { margin: 0; font-family: var(--f-display); font-size: 23px; font-weight: 600; color: var(--t1); }
.drawer-sub { font-family: var(--f-mono); font-size: 12px; color: var(--t4); margin-top: 4px; }
.drawer-close {
  margin-left: auto; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--t2); cursor: pointer; font-size: 17px; line-height: 1;
}
.drawer-close:hover { color: var(--t1); background: var(--surface-3); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 13.5px; }
.kv span { color: var(--t3); flex: none; }
.kv b { color: var(--t1); font-weight: 600; text-align: right; word-break: break-word; }
.sec-label { font-family: var(--f-body); font-size: 12px; letter-spacing: 0.8px; color: var(--t3); margin: 20px 0 10px; text-transform: uppercase; font-weight: 600; }

/* ---------- toast ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 10px 16px; border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--t1); font-size: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.44);
  animation: toastIn 220ms var(--ease);
}
.toast.good { border-color: rgba(55, 215, 172, 0.44); }
.toast.bad { border-color: rgba(239, 125, 150, 0.44); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 空态 ---------- */
.empty { padding: 46px 20px; text-align: center; color: var(--t3); font-size: 14px; line-height: 1.7; }
.empty b { display: block; color: var(--t1); font-size: 16px; margin-bottom: 6px; font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .result-grid { grid-template-columns: minmax(0, 1fr); }
  .scan-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 70px minmax(0, 1fr); }
  .sidebar { padding: 16px 10px; align-items: center; }
  .brand-text, .nav-item span, .nav-count, .pool { display: none; }
  .nav-item { justify-content: center; padding: 0; width: 46px; }
  .nav-item.active::before { display: none; }
  .view { padding: 18px 16px 50px; }
  .topbar { padding: 12px 16px; }
  .page-title { font-size:23px; }
  .kpi-value { font-size:30px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .scan-steps { grid-template-columns: minmax(0, 1fr); }
  .scan-input-wrap { flex-direction: column; align-items: stretch; }
  .btn-primary { justify-content: center; }
  .rank-row { grid-template-columns: 84px minmax(0, 1fr) 36px; }
  .rank-lat { display: none; }
}

/* ===========================================================
   登录门 · 云服务账号
   =========================================================== */

.auth-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  z-index: 40;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 444px;
  padding: 32px 32px 28px;
  border-radius: var(--r-xl);
  background: var(--surface-1);
  border: 1px solid var(--line);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.46);
  animation: authIn 320ms var(--ease);
}

/* 同样不用 opacity 起步，动画没跑也不会让登录卡消失 */
@keyframes authIn {
  from { transform: translateY(10px); }
  to { transform: none; }
}

.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-brand .brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--mint-soft);
  border: 1px solid rgba(55, 215, 172, 0.28);
}
.auth-brand strong { display: block; font-family: var(--f-display); font-size: 17px; letter-spacing: 0.1px; color: var(--t1); }
.auth-brand span { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--t4); }

.auth-title { font-family: var(--f-display); font-size: 26px; font-weight: 600; letter-spacing: -0.2px; margin: 0 0 10px; color: var(--t1); }
.auth-sub { font-size: 14.5px; line-height: 1.8; color: var(--t3); margin: 0 0 22px; }

.auth-btn { width: 100%; justify-content: center; height: 46px; font-size: 15px; letter-spacing: 0.1px; }

.auth-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.7;
  color: #f0a3b3;
  background: rgba(239, 125, 150, 0.10);
  border: 1px solid rgba(239, 125, 150, 0.28);
}

.auth-facts {
  list-style: none;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 9px;
}
.auth-facts li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--t3);
}
.auth-facts li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--mint-dim);
}

/* 顶部账号胶囊 */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px 0 4px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  color: var(--t2);
  font-family: var(--f-body);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
.user-chip:hover { border-color: rgba(55, 215, 172, 0.36); background: var(--surface-2); }
.user-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--mint-soft);
  border: 1px solid rgba(55, 215, 172, 0.32);
  color: var(--mint);
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 600;
}
.user-name { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-out { color: var(--t3); font-size: 12px; padding-left: 7px; border-left: 1px solid var(--line); }
.user-chip:hover .user-out { color: var(--rose); }

@media (max-width: 560px) {
  .user-name, .user-out { display: none; }
  .user-chip { padding: 0 4px; }
}

/* ===========================================================
   交互增强 · 可点入口 / 排序 / 快捷操作
   =========================================================== */

/* 可点 KPI 卡 */
.kpi { cursor: pointer; transition: transform 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(55, 215, 172, 0.32);
  box-shadow: var(--shadow-hover);
}
.kpi-label { display: flex; align-items: center; gap: 5px; }
.kpi-label .arrow { opacity: 0; transform: translateX(-3px); transition: all 160ms var(--ease); color: var(--mint); }
.kpi:hover .arrow { opacity: 1; transform: none; }

/* 侧栏额度池条目可点 */
.pool-row {
  cursor: pointer;
  margin: 0 -6px 8px;
  padding: 4px 6px 6px;
  border-radius: 9px;
  transition: background 140ms var(--ease);
}
.pool-row:hover { background: var(--surface-2); }
.pool-row:hover .pool-top b { color: var(--mint); }
.pool-top b { transition: color 140ms var(--ease); }
.pool-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  color: var(--t3);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 140ms var(--ease);
}
.pool-all:hover { color: var(--mint); }

/* 下拉排序 */
.head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  height: 36px;
  padding: 0 32px 0 14px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  color: var(--t2);
  font-family: var(--f-body);
  font-size: 13.5px;
  cursor: pointer;
  outline: none;
  transition: all 150ms var(--ease);
}
.select-wrap select:hover { color: var(--t1); border-color: rgba(55, 215, 172, 0.34); }
.select-wrap select:focus { border-color: rgba(55, 215, 172, 0.5); box-shadow: var(--ring); }
.select-wrap select option { background: var(--surface-2); color: var(--t1); }
.select-wrap svg { position: absolute; right: 12px; pointer-events: none; color: var(--t4); }

/* 小号次级按钮 */
.ghost-mini {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  color: var(--t2);
  font-size: 13px;
  font-family: var(--f-body);
  cursor: pointer;
  transition: all 150ms var(--ease);
  white-space: nowrap;
}
.ghost-mini:hover { color: var(--mint); border-color: rgba(55, 215, 172, 0.34); background: var(--surface-3); }
.ghost-mini:active { transform: scale(0.97); }

/* 搜索输入（平台库） */
.chip-input {
  flex: 1;
  min-width: 190px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  color: var(--t1);
  font-family: var(--f-body);
  font-size: 13.5px;
  outline: none;
  transition: all 160ms var(--ease);
}
.chip-input::placeholder { color: var(--t4); }
.chip-input:focus { border-color: rgba(55, 215, 172, 0.48); background: var(--surface-2); box-shadow: var(--ring); }

/* 示例网址 */
.suggest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.suggest > span { font-size: 13px; color: var(--t3); }

/* 结果卡顶栏按钮组 */
.result-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.card-head { flex-wrap: wrap; }

/* 移动端小幅回落，避免大字号把窄屏挤爆 */
@media (max-width: 560px) {
  .view { padding: 18px 14px 56px; }
  .page-title { font-size: 23px; }
  .kpi-value { font-size: 30px; }
  .head-tools { width: 100%; }
}

/* ---------- 第二轮视觉微调 ---------- */
.rank-pct { color: var(--t2); }
.rank-lat { color: var(--t3); }
.tbl td { padding: 11px 8px; }
.filters { gap: 9px; margin-bottom: 14px; }
.pill { padding: 0 9px; letter-spacing: 0.1px; }
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  gap: 3px;
}
.card > .empty { min-height: 210px; }
.omni-kbd { letter-spacing: 0.3px; }

.chip-input { flex: 1 1 auto; width: 0; }

/* ---------- 移动端专项：大字号下的横向溢出修复 ---------- */
@media (max-width: 860px) {
  .live-text { display: none; }
  .topbar { gap: 10px; padding: 12px 14px; }
  .omni { max-width: none; }
  .page-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .page-head > div:first-child { min-width: 0; }
  .page-head .btn-primary { align-self: flex-start; }
  .view { padding: 20px 14px 56px; }
  .card { padding: 18px; }
  .field-row { grid-template-columns: 104px minmax(0, 1fr) 46px; }
  .rank-row { grid-template-columns: 96px minmax(0, 1fr) 42px; }
  .kpi { min-height: 118px; }
}

@media (max-width: 560px) {
  .page-title { font-size: 24px; line-height: 1.4; }
  .page-sub { font-size: 13.5px; }
  .head-tools { width: 100%; }
  .head-tools .select-wrap { flex: 1; }
  .head-tools select { width: 100%; }
  .head-tools .btn-primary { flex: 1; justify-content: center; }
  .field-row { grid-template-columns: 92px minmax(0, 1fr) 44px; }
  .prov-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-value { font-size: 32px; }
  .suggest { gap: 6px; }
  .ghost-mini { font-size: 12.5px; padding: 0 11px; }
  .cred-row { grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; }
  .cred-row > div:last-child { text-align: left; }
  .cred-sub { grid-template-columns: minmax(0, 1fr) !important; }
}

/* 顶栏可收缩，避免长占位符把整页撑宽 */
.omni { min-width: 0; }
.omni input { min-width: 0; }
.top-meta { flex: none; }
.main, .view { min-width: 0; max-width: 100%; }

@media (max-width: 860px) {
  .card:has(.tbl) { overflow-x: auto; }
  .tbl { min-width: 420px; }
  .ghost-btn { height: 34px; padding: 0 11px; font-size: 13px; }
}

@media (max-width: 560px) {
  .live-dot { display: none; }
  .top-meta { gap: 6px; }
  .omni-kbd { display: none; }
  .omni input { padding-right: 14px; }
}

/* 次级文字统一提亮，长文本更易读 */
.step-desc { color: var(--t3); }
.card-note { color: var(--t3); }
.kpi-foot { color: var(--t3); }
.evi { color: var(--t3); }
.rank-lat { color: var(--t3); }
.prov-foot { color: var(--t3); }
.pool-top { color: var(--t3); }

/* ===========================================================
   我的订阅 · 账号与账单汇总
   =========================================================== */

/* 侧栏账单入口 */
.pool-bill {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--t3); font-size: 13px; text-decoration: none;
  transition: color 140ms var(--ease);
}
.pool-bill b { font-family: var(--f-display); font-size: 16px; color: var(--mint); font-weight: 600; }
.pool-bill:hover { color: var(--t1); }

/* 临期横幅 */
.bill-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(234, 176, 100, 0.09);
  border: 1px solid rgba(234, 176, 100, 0.24);
}
.bill-strip.urgent { background: rgba(239, 125, 150, 0.09); border-color: rgba(239, 125, 150, 0.28); }
.strip-mark {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(234, 176, 100, 0.18); color: var(--amber);
  font-size: 14px; font-weight: 700;
}
.bill-strip.urgent .strip-mark { background: rgba(239, 125, 150, 0.18); color: var(--rose); }
.strip-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.strip-body b { font-size: 14px; color: var(--t1); font-weight: 600; }
.strip-body span { font-size: 13px; color: var(--t3); line-height: 1.6; }

/* 预算进度条 */
.kpi-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.10); overflow: hidden; }
.kpi-bar i { display: block; height: 100%; border-radius: 3px; transition: width 400ms var(--ease); }

.card.tint-amber { background: linear-gradient(180deg, #221d15, #141920); border-color: rgba(234, 176, 100, 0.22); }
.card.tint-rose { background: linear-gradient(180deg, #231a1d, #141920); border-color: rgba(239, 125, 150, 0.22); }

/* 续费时间轴 */
.due-row {
  position: relative;
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 88px 96px;
  align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; margin: 0 -6px 4px;
  border-radius: 12px; cursor: pointer;
  transition: background 140ms var(--ease);
}
.due-row:hover { background: var(--surface-2); }
.due-edge { position: absolute; left: 2px; top: 13px; bottom: 13px; width: 3px; border-radius: 2px; }
.due-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 0; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
}
.due-date b { font-family: var(--f-display); font-size: 17px; line-height: 1; color: var(--t1); }
.due-date span { font-family: var(--f-mono); font-size: 11px; color: var(--t4); margin-top: 3px; }
.due-main { min-width: 0; }
.due-name { font-size: 14.5px; font-weight: 600; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.due-sub { font-size: 12.5px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.due-amt { font-family: var(--f-mono); font-size: 13.5px; color: var(--t2); text-align: right; }
.due-left { font-size: 12.5px; text-align: right; font-family: var(--f-body); }

/* 明细表 */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.acct-tbl { min-width: 820px; }
.acct-tbl .r { text-align: right; }
.acct-tbl td { padding: 12px 8px; vertical-align: middle; }
.acct-name { display: flex; align-items: center; gap: 10px; }
.acct-logo {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center; border-radius: 9px;
  background: var(--surface-3); border: 1px solid var(--line);
  font-family: var(--f-display); font-size: 13px; color: var(--t1);
}
.acct-id { display: flex; flex-direction: column; min-width: 0; }
.acct-id b { font-size: 14px; font-weight: 600; color: var(--t1); }
.acct-id em {
  font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--t4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px;
}
.acct-plan { font-size: 13.5px; color: var(--t2); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-mini {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 12px; color: var(--t3);
  background: var(--surface-2); border: 1px solid var(--line-soft);
}
.due-mini { display: block; font-style: normal; font-size: 12px; margin-top: 2px; }

.pill.soon { color: var(--cyan); background: rgba(98, 198, 232, 0.11); border: 1px solid rgba(98, 198, 232, 0.26); }
.pill.free { color: var(--violet); background: rgba(162, 148, 246, 0.11); border: 1px solid rgba(162, 148, 246, 0.26); }
.pill.muted { color: var(--t3); background: var(--surface-2); border: 1px solid var(--line); }

/* 费用构成 */
.compose-row { margin-bottom: 14px; }
.compose-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 5px; font-size: 13.5px; color: var(--t2);
}
.compose-top span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-top span em { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--t4); margin-left: 8px; }
.compose-top b { font-family: var(--f-mono); font-size: 13.5px; color: var(--t1); flex: none; }
.compose-top b em { font-style: normal; font-size: 11.5px; color: var(--t4); font-weight: 400; }
.compose-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.compose-bar i { display: block; height: 100%; border-radius: 3px; background: var(--mint); }
.compose-total {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px; color: var(--t3);
}
.compose-total b { font-family: var(--f-display); font-size: 21px; color: var(--t1); font-weight: 600; }
.compose-total b em { font-style: normal; font-family: var(--f-body); font-size: 12.5px; color: var(--t4); font-weight: 400; margin-left: 6px; }
.note-mini { font-size: 12.5px; color: var(--t3); line-height: 1.75; margin: 10px 0 0; }

/* 变动记录 */
.evt-row { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.evt-row:last-child { border-bottom: none; }
.evt-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; margin-top: 8px; }
.evt-body { min-width: 0; }
.evt-text { font-size: 13.5px; color: var(--t2); line-height: 1.6; }
.evt-time { font-family: var(--f-mono); font-size: 11.5px; color: var(--t4); margin-top: 4px; }

/* 抽屉表单 */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field > span {
  font-family: var(--f-body); font-size: 12px; letter-spacing: 0.4px;
  color: var(--t3); text-transform: uppercase; font-weight: 600;
}
.form-field input, .form-field select {
  height: 42px; padding: 0 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--t1); font-family: var(--f-body); font-size: 14px; outline: none;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
.form-field input:focus, .form-field select:focus { border-color: rgba(55, 215, 172, 0.5); background: var(--surface-3); }
.form-field input::placeholder { color: var(--t4); }
.form-field select option { background: var(--surface-2); color: var(--t1); }
.form-check { display: flex; align-items: center; gap: 9px; margin-top: 6px; font-size: 13.5px; color: var(--t2); cursor: pointer; }
.form-check input { width: 16px; height: 16px; accent-color: var(--mint); cursor: pointer; }

@media (max-width: 860px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .due-row { grid-template-columns: 42px minmax(0, 1fr) 78px; }
  .due-amt { display: none; }
  .bill-strip { flex-wrap: wrap; }
  .bill-strip .btn-line { margin-left: 38px; }
}

@media (max-width: 560px) {
  .due-row { grid-template-columns: 40px minmax(0, 1fr); row-gap: 2px; }
  .due-left { grid-column: 2; text-align: left; }
  .acct-tbl { min-width: 660px; }
  .compose-total b { font-size: 18px; }
  .acct-id em { max-width: 130px; }
}

/* 按量账户余额（时间轴卡底部） */
.usage-block { border-top: 1px solid var(--line-soft); margin-top: 6px; }
.usage-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 96px 66px;
  align-items: center; gap: 10px;
  padding: 8px; margin: 0 -6px; border-radius: 9px;
  font-size: 13.5px; color: var(--t2); cursor: pointer;
  transition: background 140ms var(--ease);
}
.usage-row:hover { background: var(--surface-2); }
.usage-row span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.09); overflow: hidden; display: block; }
.usage-bar i { display: block; height: 100%; border-radius: 3px; }
.usage-row b { font-family: var(--f-mono); font-size: 13px; font-weight: 500; text-align: right; }

/* 表单控件里的数字/日期垂直居中更稳 */
.form-field input, .form-field select { line-height: 1.2; }
.form-field input[type="number"]::-webkit-outer-spin-button,
.form-field input[type="number"]::-webkit-inner-spin-button { opacity: 0.35; }

/* ===========================================================
   交互反馈统一 · 按压回弹 / 过渡属性收敛
   =========================================================== */
.btn-primary:active { transform: translateY(0) scale(0.97); }
.btn-line:active,
.ghost-btn:active,
.ghost-mini:active,
.chip:active,
.chip-input:active,
.select-wrap select:active { transform: scale(0.97); }

.btn-line { transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.ghost-btn { transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.chip { transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.chip-input { transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }

/* 可点容器 hover 只动 transform / 边框 / 阴影，避免触发布局抖动 */
.prov, .kpi { transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }

/* ---------- 凭证托管面板 ---------- */
.cred-row { align-items: center; }
.cred-sub { align-items: center; }
.cred-row > div:last-child { display: inline-flex; gap: 6px; justify-content: flex-end; }
.cred-row .btn-line + .btn-line { margin-left: 0; }
.cred-row .field-val .evi { margin-top: 3px; }

/* ---------- 模型行情 ---------- */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.model-card {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.model-card:hover {
  transform: translateY(-2px);
  border-color: rgba(55, 215, 172, 0.34);
  box-shadow: var(--shadow-hover);
}
.model-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.model-logo {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--t1); font-family: var(--f-display); font-size: 16px; font-weight: 600;
}
.model-id-wrap { min-width: 0; }
.model-name { font-size: 15px; font-weight: 600; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-host { font-family: var(--f-mono); font-size: 12px; color: var(--t4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-desc { font-size: 13px; color: var(--t3); line-height: 1.65; min-height: 36px; }
.model-price { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 11px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-soft); }
.model-price > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.model-price span { font-size: 12px; color: var(--t3); }
.model-price b { font-family: var(--f-mono); font-size: 13.5px; color: var(--t1); font-weight: 500; }
.model-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.model-bench { font-family: var(--f-mono); font-size: 12px; color: var(--cyan); }
.model-link { margin-left: auto; font-size: 13px; color: var(--mint); text-decoration: none; }
.model-link:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .model-grid { grid-template-columns: minmax(0, 1fr); }
  .model-price { gap: 8px; }
}

/* ===========================================================
   移动端（手机 / 小屏）布局：底部标签栏 + 单列 + 关键数据优先
   =========================================================== */
@media (max-width: 720px) {
  /* 主区占满整宽，不再被侧栏挤压 */
  .app { grid-template-columns: minmax(0, 1fr); }

  /* 侧栏整体改为底部固定标签栏 */
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    z-index: 30;
    height: calc(58px + env(safe-area-inset-bottom));
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    flex-direction: row;
    align-items: center;
    gap: 0;
    border-right: none;
    border-top: 1px solid var(--line);
    background: rgba(11, 14, 19, 0.96);
    backdrop-filter: blur(16px);
  }
  .brand, .pool { display: none !important; }

  .nav {
    flex-direction: row;
    gap: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 1 1 0;
    min-width: 0;
    height: 48px;
    padding: 3px 3px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.15;
  }
  .nav-item svg { width: 19px; height: 19px; opacity: 0.85; }
  .nav-item span { display: block; font-size: 11px; white-space: nowrap; }
  .nav-item.active::before { display: none; }
  .nav-item.active svg { opacity: 1; }
  .nav-count { display: none; }

  /* 顶栏紧凑：搜索 + 刷新 + 状态点 */
  .main { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .topbar { padding: 9px 12px; gap: 8px; }
  .omni input { height: 38px; padding: 0 12px 0 34px; font-size: 14px; border-radius: 11px; }
  .omni-icon { left: 11px; width: 14px; height: 14px; }
  .omni-kbd { display: none; }
  .live-text { display: none; }
  .top-meta { gap: 7px; }
  .ghost-btn { height: 30px; padding: 0 10px; font-size: 13px; }

  /* 内容区：更紧的留白，一屏能看到关键数字 */
  .view { padding: 14px 12px 26px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 14px; }
  .page-title { font-size: 22px; line-height: 1.35; }
  .page-sub { font-size: 13px; line-height: 1.65; margin-top: 6px; }
  .kicker { font-size: 11px; margin-bottom: 6px; }
  .page-head .btn-primary, .page-head .btn { width: 100%; justify-content: center; }
  .btn-primary { height: 44px; }

  /* 关键指标：手机上固定 2×2，先看数字 */
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
  .kpi { min-height: 96px; gap: 5px; padding: 13px 12px; }
  .kpi-label { font-size: 12px; }
  .kpi-value { font-size: 25px; letter-spacing: -0.3px; }
  .kpi-value small { font-size: 12px; margin-left: 3px; }
  .kpi-foot { font-size: 11.5px; gap: 5px; flex-wrap: wrap; word-break: keep-all; }

  .card { padding: 14px 13px; border-radius: 16px; }
  .card-head { margin-bottom: 12px; gap: 8px; }
  .card-title { font-size: 15px; }
  .card-note { font-size: 11px; }

  /* 排行榜：去掉延迟列，把条子留宽 */
  .rank-row { grid-template-columns: 88px minmax(0, 1fr) 42px; gap: 8px; padding: 9px 0; }
  .rank-name { font-size: 13.5px; }
  .rank-pct { font-size: 12.5px; }
  .rank-lat { display: none; }

  /* 账单提醒条：按钮独占一行，避免把正文挤成窄条 */
  .bill-strip { flex-wrap: wrap; gap: 10px; padding: 12px 13px; }
  .bill-strip .btn-line { margin-left: 0 !important; width: 100%; }

  /* 表格横向滚动，不撑破页面 */
  .card:has(.tbl), .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { font-size: 13px; }
  .tbl th { white-space: nowrap; }
  .tbl td { padding: 10px 7px; }

  /* 其它多列布局统一收成一列 */
  .grid-2, .result-grid, .scan-steps, .model-grid, .split { grid-template-columns: minmax(0, 1fr) !important; }

  /* 抽屉铺满，便于手机上阅读与操作 */
  .drawer { width: 100%; border-left: none; padding: 18px 14px calc(24px + env(safe-area-inset-bottom)); }
  .drawer-title { font-size: 20px; }

  .toast-wrap { bottom: calc(72px + env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .toast { max-width: 100%; font-size: 13.5px; text-align: center; }
}

/* 超窄屏（小屏手机）：进一步压字号，7 个标签挤进一行 */
@media (max-width: 420px) {
  .kpi-value { font-size: 23px; }
  .nav-item { font-size: 10.5px; gap: 2px; padding: 3px 2px; }
  .nav-item span { font-size: 10.5px; }
  .nav-item svg { width: 18px; height: 18px; }
  .omni input { font-size: 13.5px; }
}
@media (max-width: 350px) {
  .nav-item span { font-size: 10px; }
  .kpi { padding: 12px 10px; }
  .kpi-value { font-size: 21px; }
}

/* ===========================================================
   站点档案 / 抓取模式（新增）
   =========================================================== */

/* 抓取模式开关：三张卡片式 chip */
.scan-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.opt-chip {
  display: flex; flex-direction: column; gap: 3px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-1);
  color: var(--t2);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
.opt-chip b { font-size: 13.5px; font-weight: 600; color: var(--t1); }
.opt-chip span { font-size: 11.5px; color: var(--t4); line-height: 1.5; }
.opt-chip.on { border-color: rgba(55, 215, 172, 0.42); background: var(--mint-soft); }
.opt-chip.on b { color: var(--mint); }
.opt-chip:disabled { opacity: 0.5; cursor: not-allowed; }

/* 档案卡片 */
.prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.prof-card { padding: 16px 18px; transition: border-color 160ms var(--ease), transform 160ms var(--ease); }
.prof-card:hover { border-color: rgba(55, 215, 172, 0.34); transform: translateY(-1px); }
.prof-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.prof-ident { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.prof-name { font-size: 15.5px; font-weight: 600; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-host { font-family: var(--f-mono); font-size: 12px; color: var(--t4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-score { font-family: var(--f-mono); font-size: 13px; color: var(--mint-dim); flex: none; }
.prof-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 11.5px; color: var(--t4); }
.prof-badge { font-size: 11px; color: var(--cyan); border: 1px solid rgba(98, 198, 232, 0.3); background: rgba(98, 198, 232, 0.10); padding: 1px 7px; border-radius: 999px; }

/* 证据原文 */
.ev-row { padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.045); }
.ev-meta { font-family: var(--f-mono); font-size: 11px; color: var(--t4); }
.ev-quote { font-size: 12.5px; color: var(--t3); line-height: 1.65; margin-top: 3px; }

/* 变化条目 */
.chg { display: flex; align-items: flex-start; gap: 8px; padding: 8px 11px; margin-bottom: 6px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 12.5px; color: var(--t3); line-height: 1.6; }
.chg.warn { background: rgba(234, 176, 100, 0.10); border-color: rgba(234, 176, 100, 0.28); color: var(--amber); }

/* 时间线 */
.timeline { display: flex; flex-direction: column; gap: 2px; }
.tl-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.045); }
.tl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--t4); flex: none; }
.tl-row.latest .tl-dot { background: var(--mint); }
.tl-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tl-main b { font-size: 13px; color: var(--t1); font-weight: 500; }
.tl-main span { font-size: 11.5px; color: var(--t4); }

@media (max-width: 720px) {
  .scan-opts { grid-template-columns: minmax(0, 1fr); }
  .prof-grid { grid-template-columns: minmax(0, 1fr); }
}
