/* ============================================================
   链接CMS · Design Tokens
   提取自 shadcn-admin (satnaing/shadcn-admin) 官方主题
   亮/暗双主题，基于 oklch 色彩空间
   ============================================================ */

/* ---------- 本地字体（Inter，已下载到 assets/fonts/） ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;              /* variable font，覆盖全重量 */
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --radius: 0.625rem;

  --background: oklch(100% 0 0);
  --foreground: oklch(12.9% 0.042 264.695);

  --card: oklch(100% 0 0);
  --card-foreground: oklch(12.9% 0.042 264.695);

  --popover: oklch(100% 0 0);
  --popover-foreground: oklch(12.9% 0.042 264.695);

  --primary: oklch(20.8% 0.042 265.755);
  --primary-foreground: oklch(98.4% 0.003 247.858);

  --secondary: oklch(96.8% 0.007 247.896);
  --secondary-foreground: oklch(20.8% 0.042 265.755);

  --muted: oklch(96.8% 0.007 247.896);
  --muted-foreground: oklch(55.4% 0.046 257.417);

  --accent: oklch(96.8% 0.007 247.896);
  --accent-foreground: oklch(20.8% 0.042 265.755);

  --destructive: oklch(57.7% 0.245 27.325);
  --destructive-foreground: oklch(98.4% 0.003 247.858);

  --border: oklch(92.9% 0.013 255.508);
  --input: oklch(92.9% 0.013 255.508);
  --ring: oklch(70.4% 0.04 256.788);

  --chart-1: oklch(64.6% 0.222 41.116);
  --chart-2: oklch(60% 0.118 184.704);
  --chart-3: oklch(39.8% 0.07 227.392);
  --chart-4: oklch(82.8% 0.189 84.429);
  --chart-5: oklch(76.9% 0.188 70.08);

  --sidebar: var(--background);
  --sidebar-foreground: var(--foreground);
  --sidebar-primary: var(--primary);
  --sidebar-primary-foreground: var(--primary-foreground);
  --sidebar-accent: var(--accent);
  --sidebar-accent-foreground: var(--accent-foreground);
  --sidebar-border: var(--border);
  --sidebar-ring: var(--ring);

  --success: oklch(64.6% 0.15 152.5);
  --warning: oklch(76.9% 0.16 70.08);
}

.dark {
  --background: oklch(12.9% 0.042 264.695);
  --foreground: oklch(98.4% 0.003 247.858);

  --card: oklch(14% 0.04 259.21);
  --card-foreground: oklch(98.4% 0.003 247.858);

  --popover: oklch(20.8% 0.042 265.755);
  --popover-foreground: oklch(98.4% 0.003 247.858);

  --primary: oklch(92.9% 0.013 255.508);
  --primary-foreground: oklch(20.8% 0.042 265.755);

  --secondary: oklch(27.9% 0.041 260.031);
  --secondary-foreground: oklch(98.4% 0.003 247.858);

  --muted: oklch(27.9% 0.041 260.031);
  --muted-foreground: oklch(70.4% 0.04 256.788);

  --accent: oklch(27.9% 0.041 260.031);
  --accent-foreground: oklch(98.4% 0.003 247.858);

  --destructive: oklch(70.4% 0.191 22.216);
  --destructive-foreground: oklch(98.4% 0.003 247.858);

  --border: oklch(100% 0 0 / 0.1);
  --input: oklch(100% 0 0 / 0.15);
  --ring: oklch(55.1% 0.027 264.364);

  --chart-1: oklch(48.8% 0.243 264.376);
  --chart-2: oklch(69.6% 0.17 162.48);
  --chart-3: oklch(76.9% 0.188 70.08);
  --chart-4: oklch(62.7% 0.265 303.9);
  --chart-5: oklch(64.5% 0.246 16.439);

  --success: oklch(72% 0.15 152.5);
  --warning: oklch(80% 0.16 70.08);
}

/* ---------- 字体 ---------- */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html {
  color-scheme: light;
}
html.dark {
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* hidden 属性优先级最高，防止组件的 display:flex 等作者样式使其失效 */
[hidden] {
  display: none !important;
}
