/* ============================================================
   design-tokens.css - 设计令牌
   定义全局颜色、字体、间距、阴影等设计变量
   ============================================================ */

:root {
  /* ---- 主色系 ---- */
  --color-primary: #1890FF;
  --color-primary-dark: #096DD9;
  --color-primary-light: #40A9FF;
  --color-gradient: linear-gradient(135deg, #1890FF 0%, #10B981 100%);
  --color-gradient-hover: linear-gradient(135deg, #40A9FF 0%, #34D399 100%);

  /* ---- 语义色 ---- */
  --color-success: #52C41A;
  --color-success-bg: #F6FFED;
  --color-warning: #FAAD14;
  --color-warning-bg: #FFFBE6;
  --color-danger: #FF4D4F;
  --color-danger-bg: #FFF1F0;
  --color-info: #13C2C2;
  --color-info-bg: #E6FFFB;

  /* ---- 背景色 ---- */
  --bg-page: #F0F4F8;
  --bg-card: #FFFFFF;
  --bg-sidebar: #1A1A2E;
  --bg-sidebar-hover: #2D2D44;
  --bg-sidebar-active: #3D3D5C;
  --bg-header: #FFFFFF;

  /* ---- 文字色 ---- */
  --text-primary: #1A1A2E;
  --text-secondary: #4A5568;
  --text-muted: #A0AEC0;
  --text-white: #FFFFFF;
  --text-link: #1890FF;

  /* ---- 边框 ---- */
  --border-color: #E8E8E8;
  --border-radius: 8px;

  /* ---- 间距 ---- */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* ---- 圆角 ---- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* ---- 阴影 ---- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.12);

  /* ---- 布局 ---- */
  --sidebar-width: 240px;
  --header-height: 60px;
  --content-max-width: 1400px;

  /* ---- 动效 ---- */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* ---- Z-Index ---- */
  --z-sidebar: 100;
  --z-header: 200;
  --z-mobile-nav: 300;
  --z-modal: 1000;
  --z-toast: 2000;
}

/* ---- 全局重置 ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---- 滚动条样式 ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E0;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #A0AEC0;
}
