/* ===========================================================================
   EthanQuay 主题层 —— 方向 A「精密仪器感」
   ---------------------------------------------------------------------------
   设计约束（务必遵守，这是上一版翻车的教训）：
     · 只覆盖 NewAPI 已有的设计令牌「值」，不新增、不覆盖任何组件类名
     · 全文件零 !important —— 一旦需要 !important，说明改错层了
     · 不触碰 layout / position / display / width / height
     · 中文一律回退系统字体，绝不加载 CJK 网络字体
   =========================================================================== */

/* ---------- 自托管字体：仅拉丁子集，中文走系统字体 ---------- */
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;
  src:url("/fonts/inter-400.woff2") format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;
  src:url("/fonts/inter-500.woff2") format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;
  src:url("/fonts/inter-600.woff2") format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;
  src:url("/fonts/inter-700.woff2") format("woff2")}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:400;font-display:swap;
  src:url("/fonts/jetbrains-mono-400.woff2") format("woff2")}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:500;font-display:swap;
  src:url("/fonts/jetbrains-mono-500.woff2") format("woff2")}

/* ---------- 浅色令牌 ---------- */
:root{
  /* 圆角从 1rem 收到 6px —— 这是「精密感」最主要的来源 */
  --radius:.375rem;

  /* 更沉稳的蓝，降低饱和、压深明度，读起来更可信 */
  --primary:#1f7fc4;
  --primary-foreground:#fff;
  --ring:#1f7fc4;

  /* 边框转冷、提高清晰度 —— 精密语言靠边框分层，而不是靠阴影 */
  --border:#e3e7ec;
  --input:#d5dbe2;
  --sidebar-border:#e3e7ec;

  /* 中性色整体偏冷 */
  --background:#fff;
  --card:#fff;
  --popover:#fff;
  --muted:#f5f7f9;
  --muted-foreground:#58626e;
  --secondary:#eef1f4;
  --secondary-foreground:#1f7fc4;

  /* Inter 仅含拉丁字形，中文由系统黑体承接（PingFang SC / 微软雅黑）。
     选 Inter 的原因：字形中性、专为屏幕设计，与中文黑体并置时骨架冲突最小；
     IBM Plex 是 IBM 企业定制字体，个性过强，混排时与中文割裂明显。
     绝不加载中文网络字体 —— CJK 字库动辄数 MB，是首屏灾难。 */
  --font-sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",
              "PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

/* ---------- 深色令牌 ---------- */
.dark{
  --primary:#4ea3e0;
  --primary-foreground:#0b0f14;
  --ring:#4ea3e0;

  --border:#333a42;
  --input:#3a424b;
  --sidebar-border:#333a42;

  /* 比原生 #1e1e1e 更冷一档，贴合工程感。
     注意：覆盖 --background 就必须同步覆盖对应的前景色。
     只改背景会让 NewAPI 原生 .dark 里的 --foreground 被本规则挤掉而失效，
     color:var(--foreground) 解析为空后回落成黑色，在深色底上等于隐形。 */
  --background:#14181d;
  --foreground:#e8ecf1;
  --card:#1b2026;
  --card-foreground:#e8ecf1;
  --popover:#1b2026;
  --popover-foreground:#e8ecf1;
  --muted:#262b31;
  --muted-foreground:#9aa5b1;
  --secondary:#262b31;
  --secondary-foreground:#8fc5ee;
}

/* ---------- 等宽字体应用到标准 HTML 元素（非组件类名，安全）---------- */
code,pre,kbd,samp{font-family:var(--font-mono)}

/* ---------- 数字等宽对齐：金额/额度/用量读起来更像仪表 ---------- */
table{font-variant-numeric:tabular-nums}
