/* 钲鹏机床ERP - 主样式 V3.1 清新简约蓝主题 */

:root {
  /* 主色调 - 清新天蓝 */
  --primary: #4A90D9;
  --primary-light: #72ABE3;
  --primary-dark: #3573B8;
  --primary-bg: #EDF4FC;

  /* 辅助色 */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #5B9BD5;
  --info-light: #E4F1FB;
  --teal: #06b6d4;
  --teal-light: #cffafe;

  /* 背景色系 */
  --bg: #f2f5f9;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f6f9fc;

  /* 侧边栏 - 清新深蓝 */
  --sidebar-bg: #1E2B47;
  --sidebar-bg-hover: #263557;
  --sidebar-text: #95A5C8;
  --sidebar-active: #4A90D9;
  --sidebar-group: #6B7DA8;

  /* 顶栏 */
  --header-bg: #ffffff;
  --header-border: #e2e8f0;

  /* 文字 */
  --text: #1e293b;
  --text-secondary: #475569;
  --text-light: #64748b;
  --text-muted: #94a3b8;

  /* 边框 */
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* 特效用 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.06), 0 4px 10px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.08);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 滚动条美化 - V65加粗醒目 */
html {
  scrollbar-width: auto;
  scrollbar-color: #94a3b8 #f1f5f9;
}
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 6px;
  border: 2px solid #f1f5f9;
  min-height: 40px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}
::-webkit-scrollbar-corner {
  background: #f1f5f9;
}

/* 侧边栏滚动条（深色背景下用亮色） */
.sidebar::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}
.sidebar::-webkit-scrollbar-thumb {
  background: #5c6480;
  border-color: #2d3148;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: #7c84a0;
}
.sidebar {
  scrollbar-color: #5c6480 #2d3148;
}

/* 表格容器滚动条 - 大而不显，好抓又不抢眼 */
.table-hscroll,
.table-container,
.data-table-wrap,
.spreadsheet-table-wrap {
  scrollbar-width: auto;
  scrollbar-color: #a8b6c8 transparent;
}
.table-hscroll::-webkit-scrollbar,
.table-container::-webkit-scrollbar,
.data-table-wrap::-webkit-scrollbar,
.spreadsheet-table-wrap::-webkit-scrollbar {
  height: 18px;
  width: 18px;
}
.table-hscroll::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track,
.data-table-wrap::-webkit-scrollbar-track,
.spreadsheet-table-wrap::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 9px;
}
.table-hscroll::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb,
.data-table-wrap::-webkit-scrollbar-thumb,
.spreadsheet-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.35);
  border-radius: 9px;
  border: 4px solid transparent;
  background-clip: padding-box;
}
.table-hscroll::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover,
.data-table-wrap::-webkit-scrollbar-thumb:hover,
.spreadsheet-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(100,116,139,0.55);
  background-clip: padding-box;
}

/* 表格容器底部留一点padding让滚动条不紧贴边缘 */
.table-container {
  padding-bottom: 2px;
}

/* 知识图谱详情按钮（仓库等模块复用） */
.plm-kg-detail-btn {
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid #c0c8e0;
  border-radius: 4px;
  background: #f5f7fa;
  color: #667eea;
  cursor: pointer;
  transition: all 0.15s;
}
.plm-kg-detail-btn:hover {
  background: #667eea;
  color: #fff;
  border-color: #667eea;
}
