/* ============================================================================
 *  L-api 皮肤  ·  for New API
 * ----------------------------------------------------------------------------
 *  设计语言：深青绿（Teal）× 冷灰中性
 *  适配版本：New API v1.0.0-rc.x（前端 CSS 变量驱动，共 357 个变量）
 *
 *  ▍怎么改主色
 *    只需改下面 4 个值，其余色（--accent / --sidebar-accent / --table-* 等）
 *    由 color-mix() 自动派生，不用管：
 *        亮色  --primary  /  --primary-foreground
 *        暗色  --primary  /  --primary-foreground
 *    ⚠️ 亮色的 --primary 必须压得比暗色**深** —— 因为它上面压白字，
 *       对比度需 ≥ 4.5:1。改完务必重新验证（见 docs/L-api换肤说明.md）。
 *
 *  ▍色层结构（改色时别只改一半）
 *    外壳 = --sidebar      侧边栏 + 顶栏 + 画布
 *    内容 = --background   内嵌的圆角面板
 *    卡片 = --card         面板里的卡片
 *    三者必须在同一明度家族，只允许差一档，否则会出现「深壳浅内容」的割裂感。
 *
 *  ▍使用前提
 *    请把后台的「主题预设」保持为 default，否则预设会与本文件互相打架
 *    （预设走 [data-theme-preset=xxx]，与本文件是两条改色路径）。
 *
 *  ▍选择器说明
 *    用 :root:root / :root:root.dark（特异性 0,2,0 / 0,3,0），
 *    目的是压过应用的 `[data-theme-preset=xxx]`(0,1,0) 和
 *    `.dark [data-theme-preset=xxx]`(0,2,0)。
 * ========================================================================= */

/* ============================ 亮色模式 ============================ */
:root:root {
  --background: #f4f8f7 !important;  /* 极浅青灰 —— 内容面板底色 */
  --foreground: #0c1514 !important;  /* 正文，带青调近黑 */
  --card: #ffffff !important;  /* 卡片：比内容面板亮一档 */
  --card-foreground: #0c1514 !important;
  --popover: #ffffff !important;
  --popover-foreground: #0c1514 !important;
  --primary: #0e7a68 !important;  /* ★ 主色（深青绿），压深以保证白字可读 */
  --primary-foreground: #ffffff !important;  /* ★ 主色上的字 */
  --secondary: #e8f0ee !important;
  --secondary-foreground: #0d5c4f !important;
  --muted: #eef4f3 !important;
  --muted-foreground: #5f6f6d !important;  /* 次要文字 */
  --accent-foreground: #0c1514 !important;  /* accent 底色由 color-mix 派生，只覆盖前景 */
  --destructive: #c62b20 !important;
  --destructive-foreground: #ffffff !important;
  --success: #0a7d52 !important;
  --success-foreground: #ffffff !important;
  --warning: #8f6200 !important;
  --warning-foreground: #ffffff !important;
  --info: #0a6b86 !important;  /* 青蓝，与主色同族 */
  --info-foreground: #ffffff !important;
  --neutral: #657270 !important;
  --neutral-foreground: #ffffff !important;
  --border: #dde8e6 !important;
  --input: #dde8e6 !important;
  --ring: #0e7a68 !important;  /* 聚焦环 = 主色 */
  --sidebar: #ffffff !important;  /* 外壳层：白 */
  --sidebar-foreground: #0c1514 !important;
  --sidebar-primary: #0e7a68 !important;
  --sidebar-primary-foreground: #ffffff !important;
  --sidebar-accent-foreground: #0e7a68 !important;
  --sidebar-border: #e5eeec !important;
  --sidebar-ring: #0e7a68 !important;
  --chart-1: #0e7a68 !important;  /* 图表色 5 个：与主色协调 */
  --chart-2: #2f9e8f !important;
  --chart-3: #3f7fae !important;
  --chart-4: #8a6fc4 !important;
  --chart-5: #b0761f !important;
  --overview-accent-1: #0e7a68 !important;  /* 概览页强调色 */
  --overview-accent-2: #3f7fae !important;
  --overview-accent-3: #8a6fc4 !important;
  --skeleton-base: #eef4f3 !important;  /* 骨架屏 */
  --skeleton-highlight: #f7fbfa !important;
}

/* ============================ 暗色模式 ============================ */
:root:root.dark,
:root:root[data-theme-mode="dark"] {
  --background: #0a1211 !important;  /* 深青黑 —— 内容面板 */
  --foreground: #e6f0ee !important;
  --card: #121c1a !important;
  --card-foreground: #e6f0ee !important;
  --popover: #141e1c !important;
  --popover-foreground: #e6f0ee !important;
  --primary: #3ec9ae !important;  /* ★ 主色（亮青绿）—— 暗色下提亮，压深字 */
  --primary-foreground: #04241e !important;  /* ★ 主色上的字 */
  --secondary: #1b2624 !important;
  --secondary-foreground: #a8d8cf !important;
  --muted: #182220 !important;
  --muted-foreground: #8fa3a0 !important;
  --accent-foreground: #e6f0ee !important;
  --destructive: #ff6b66 !important;
  --destructive-foreground: #2a0806 !important;
  --success: #3ddc9a !important;
  --success-foreground: #04241e !important;
  --warning: #f0a83c !important;
  --warning-foreground: #2a1c02 !important;
  --info: #4ab8d8 !important;
  --info-foreground: #04212a !important;
  --neutral: #8a9996 !important;
  --neutral-foreground: #0a1211 !important;
  --border: #22302d !important;
  --input: #22302d !important;
  --ring: #3ec9ae !important;
  --sidebar: #070e0d !important;  /* 外壳层：比内容更深一档 */
  --sidebar-foreground: #e6f0ee !important;
  --sidebar-primary: #3ec9ae !important;
  --sidebar-primary-foreground: #04241e !important;
  --sidebar-accent-foreground: #7fdcc8 !important;
  --sidebar-border: #1a2523 !important;
  --sidebar-ring: #3ec9ae !important;
  --chart-1: #3ec9ae !important;
  --chart-2: #5fd6c4 !important;
  --chart-3: #6aa8d8 !important;
  --chart-4: #b39ae8 !important;
  --chart-5: #e8b06a !important;
  --overview-accent-1: #3ec9ae !important;
  --overview-accent-2: #6aa8d8 !important;
  --overview-accent-3: #b39ae8 !important;
  --skeleton-base: #182220 !important;
  --skeleton-highlight: #233130 !important;
}
