/* ============================================================
   AMS Framework - 核心样式
   年轻简约化设计 | 纯白主色 + #C2D6FF辅色
   ============================================================ */

/* CSS变量 - 色彩体系 */
:root {
  /* 主色调 */
  --color-white: #FFFFFF;
  --color-bg: #F7FAFC;
  /* 辅色调 */
  --color-accent: #C2D6FF;
  --color-accent-light: #E8F0FE;
  --color-accent-dark: #A3C0F5;
  /* 品牌色 */
  --color-brand: #4A7CFF;
  --color-brand-light: #6B95FF;
  --color-brand-dark: #3366E0;
  /* 文字色 */
  --color-text: #2D3748;
  --color-text-secondary: #718096;
  --color-text-placeholder: #A0AEC0;
  /* 边框色 */
  --color-border: #E2E8F0;
  --color-border-light: #EDF2F7;
  /* 状态色 */
  --color-success: #48BB78;
  --color-success-light: #F0FFF4;
  --color-warning: #ED8936;
  --color-warning-light: #FFFAF0;
  --color-error: #F56565;
  --color-error-light: #FFF5F5;
  --color-info: #4299E1;
  --color-info-light: #EBF8FF;
  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 过渡 */
  --transition: all 0.2s ease;
  --transition-fast: all 0.15s ease;
}

/* 全局重置 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover {
  color: var(--color-brand-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: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #A0AEC0;
}

/* ============================================================
   工具类
   ============================================================ */

/* Flex布局 */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* 文字 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-brand { color: var(--color-brand); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }
.text-secondary { color: var(--color-text-secondary); }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-bold { font-weight: 600; }

/* 间距 */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.ml-8 { margin-left: 8px; }
.mr-8 { margin-right: 8px; }
.mr-16 { margin-right: 16px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.px-24 { padding-left: 24px; padding-right: 24px; }
.py-16 { padding-top: 16px; padding-bottom: 16px; }

/* 宽高 */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* 显示/隐藏 */
.hidden { display: none !important; }
.block { display: block; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 光标 */
.cursor-pointer { cursor: pointer; }
.cursor-move { cursor: move; }
.select-none { user-select: none; }

/* 圆角 */
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

/* 阴影 */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* 分割线 */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 16px 0;
}

/* 动画 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-fadeInUp { animation: fadeInUp 0.3s ease; }

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--color-text-placeholder);
}
.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  stroke: #CBD5E0;
}
.empty-state .empty-text {
  font-size: 14px;
}

/* 加载状态 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.loading-mask {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
