/* ============================================================
   客户线索管理系统 CRM - 全局样式
   ============================================================ */
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; padding: 0; }
body {
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 14px;
  color: #303133;
  background: #f0f2f5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 登录页 ---------- */
.login-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f2027 0%, #203a43 48%, #2c5364 100%);
}
.login-card {
  width: 400px;
  max-width: 92vw;
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px 32px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.login-title { margin: 0 0 8px; text-align: center; color: #1f2d3d; font-size: 24px; font-weight: 700; letter-spacing: 2px; }
.login-sub { margin: 0 0 30px; text-align: center; color: #909399; font-size: 13px; }
.login-btn { width: 100%; margin-top: 6px; letter-spacing: 6px; }

/* ---------- 整体布局 ---------- */
.layout { height: 100vh; }
.aside { background: #001529; overflow-x: hidden; }
.aside .logo {
  height: 56px; line-height: 56px; text-align: center; color: #fff;
  font-size: 16px; font-weight: 600; letter-spacing: 2px;
  background: #002140; white-space: nowrap; overflow: hidden;
}
.aside .el-menu { border-right: none; }
.aside .el-menu-item { height: 48px; line-height: 48px; }
.header {
  background: #fff; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08); z-index: 10;
}
.header-title { font-size: 17px; font-weight: 600; color: #1f2d3d; }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-right .uname { font-size: 14px; color: #303133; }
.main { padding: 16px; overflow: auto; background: #f0f2f5; }

/* ---------- 通用卡片 / 工具栏 / 分页 ---------- */
.page-card { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.toolbar .grow { flex: 1; }
.pager { display: flex; justify-content: flex-end; margin-top: 14px; }
.page-title { font-size: 16px; font-weight: 600; color: #1f2d3d; margin: 0 0 14px; }
.money { color: #f56c6c; font-weight: 600; }

/* ---------- 数据看板 ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border-radius: 8px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #409eff;
}
.stat-card.c2 { border-left-color: #67c23a; }
.stat-card.c3 { border-left-color: #e6a23c; }
.stat-card.c4 { border-left-color: #f56c6c; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-label { color: #909399; font-size: 13px; }
.chart-row { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; margin-bottom: 16px; }
.chart-box { background: #fff; border-radius: 8px; padding: 14px 14px 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); }
.chart-box .chart-title { font-size: 14px; font-weight: 600; color: #303133; margin: 0 0 8px; }
.chart { width: 100%; height: 320px; }

/* ---------- 详情对话框 ---------- */
.timeline-box { max-height: 320px; overflow: auto; padding-right: 8px; }
.follow-item { white-space: pre-wrap; word-break: break-all; }
.deal-tag { margin-left: 8px; }

/* ---------- 导入结果 ---------- */
.result-banner {
  border-radius: 8px; padding: 14px 18px; margin-bottom: 14px;
  display: flex; flex-wrap: wrap; gap: 26px; align-items: center;
}
.result-banner.success { background: #f0f9eb; border: 1px solid #e1f3d8; }
.result-banner.warn { background: #fdf6ec; border: 1px solid #faecd8; }
.result-banner .item { display: flex; flex-direction: column; gap: 4px; }
.result-banner .num { font-size: 24px; font-weight: 700; }
.result-banner .lab { font-size: 12px; color: #909399; }

/* ---------- 表格通用 ---------- */
.el-table .cell { word-break: break-all; }
.opt-btns { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .chart-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .aside { width: 64px !important; }
  .aside .logo { font-size: 0; }
  .header-title { display: none; }
}
