/* ============ 全局样式 ============ */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #f5f7fa;
  color: #303133;
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100vh; }

/* ============ 登录页 ============ */
.login-bg {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(64,131,255,0.92) 0%, rgba(35,84,170,0.92) 100%),
    radial-gradient(circle at 20% 80%, rgba(120,180,255,0.15), transparent 50%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.login-bg::before, .login-bg::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.login-bg::before { width: 600px; height: 600px; top: -200px; right: -200px; }
.login-bg::after  { width: 400px; height: 400px; bottom: -150px; left: -150px; }

.login-card {
  background: rgba(255,255,255,0.98);
  padding: 48px 56px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  width: 420px; max-width: 92vw;
  position: relative; z-index: 1;
  backdrop-filter: blur(20px);
}
.login-title {
  text-align: center;
  font-size: 22px; font-weight: 600;
  color: #1a2a4e;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.login-subtitle {
  text-align: center; color: #909399;
  font-size: 13px; margin-bottom: 32px;
}
.login-card .el-input { margin-bottom: 4px; }

.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .el-input { flex: 1; }
.captcha-img {
  height: 40px; border: 1px solid #dcdfe6; border-radius: 6px;
  cursor: pointer; transition: opacity .2s;
  user-select: none;
}
.captcha-img:hover { opacity: 0.85; }

/* ============ 主布局 ============ */
.layout-wrap { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: linear-gradient(180deg, #1f2d4e 0%, #2c3e6f 100%);
  color: #fff;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  box-shadow: 2px 0 12px rgba(0,0,0,0.08);
}
.sidebar-logo {
  padding: 24px 20px;
  font-size: 16px; font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #67c23a; box-shadow: 0 0 8px rgba(103,194,58,0.5);
}
.menu-list { flex: 1; padding: 12px 0; overflow-y: auto; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: all .2s;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.menu-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.menu-item.active {
  background: rgba(64,131,255,0.18);
  color: #fff;
  border-left-color: #4083ff;
}
.menu-item .icon { font-size: 18px; }

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px; color: rgba(255,255,255,0.7);
}

.main-content {
  flex: 1; padding: 24px 32px;
  min-width: 0;
  background: #f5f7fa;
}

/* ============ 通用卡片 ============ */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.page-title { font-size: 22px; font-weight: 600; color: #1a2a4e; }
.page-desc  { color: #909399; font-size: 13px; margin-top: 4px; }

.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  margin-bottom: 20px;
  border: 1px solid #ebeef5;
}
.card-title {
  font-size: 16px; font-weight: 600; color: #1a2a4e;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before {
  content: ''; width: 4px; height: 16px;
  background: linear-gradient(180deg, #4083ff, #2354aa);
  border-radius: 2px;
}

/* ============ 看板 KPI ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.kpi-card {
  background: linear-gradient(135deg, #fff 0%, #f8fafe 100%);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #ebeef5;
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.kpi-card::after {
  content: ''; position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  background: linear-gradient(135deg, rgba(64,131,255,0.08), transparent);
  border-radius: 50%;
}
.kpi-label { color: #909399; font-size: 13px; margin-bottom: 8px; }
.kpi-value { font-size: 28px; font-weight: 700; color: #1a2a4e; line-height: 1.2; }
.kpi-trend { font-size: 12px; color: #67c23a; margin-top: 4px; }

/* ============ 图表网格 ============ */
.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.chart-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 1000px) {
  .chart-grid, .chart-grid-2 { grid-template-columns: 1fr; }
}

/* ============ 上传进度 ============ */
.upload-progress {
  margin-top: 16px;
  padding: 16px;
  background: #f0f6ff;
  border-left: 3px solid #4083ff;
  border-radius: 6px;
}
.upload-result {
  margin-top: 16px;
  padding: 16px;
  background: #f0f9eb;
  border-left: 3px solid #67c23a;
  border-radius: 6px;
}

/* ============ 表格强化 ============ */
.el-table { border-radius: 8px; overflow: hidden; }
.el-table th { background: #fafbfd !important; color: #5a6987 !important; font-weight: 600 !important; }
.el-table .cell { font-size: 13px; }

/* ============ 按钮强化 ============ */
.el-button--primary {
  background: linear-gradient(135deg, #4083ff 0%, #2354aa 100%);
  border: none;
  box-shadow: 0 2px 8px rgba(64,131,255,0.3);
}
.el-button--primary:hover {
  background: linear-gradient(135deg, #5b95ff 0%, #2e62c2 100%);
  box-shadow: 0 4px 12px rgba(64,131,255,0.4);
}
.el-button--success {
  background: linear-gradient(135deg, #67c23a 0%, #4a9928 100%);
  border: none;
}
.el-button--danger {
  background: linear-gradient(135deg, #f56c6c 0%, #c45656 100%);
  border: none;
}

/* ============ 标签 ============ */
.status-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.status-pending  { background: #fdf6ec; color: #e6a23c; }
.status-done     { background: #f0f9eb; color: #67c23a; }
.status-cancel   { background: #f4f4f5; color: #909399; }

.duration-tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 500;
}
.dur-not   { background: #f4f4f5; color: #909399; }
.dur-0_15  { background: #fef0f0; color: #f56c6c; }
.dur-15_30 { background: #fdf6ec; color: #e6a23c; }
.dur-30_60 { background: #ecf5ff; color: #4083ff; }
.dur-60p   { background: #f0f9eb; color: #67c23a; }

/* ============ 筛选栏 ============ */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.filter-bar .el-select, .filter-bar .el-input, .filter-bar .el-date-editor {
  min-width: 140px;
}

/* ============ 空状态 ============ */
.empty-state {
  text-align: center; padding: 60px 0;
  color: #c0c4cc; font-size: 14px;
}

/* ============ 顶部 bar(用户菜单) ============ */
.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 0 16px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid #ebeef5;
}
.user-zone { display: flex; align-items: center; gap: 16px; }
.user-trigger {
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #ebeef5;
  font-size: 14px;
  color: #303133;
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.user-trigger:hover {
  background: #f5f7fa;
  border-color: #4083ff;
  color: #4083ff;
}
.user-trigger .arrow { font-size: 10px; color: #909399; }

/* ============ 工作流程引导卡片 ============ */
.workflow-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.workflow-title {
  font-size: 14px;
  color: #909399;
  margin-bottom: 16px;
  font-weight: 600;
}
.workflow-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
}
.workflow-step {
  flex: 1;
  min-width: 130px;
  padding: 14px 12px;
  background: linear-gradient(135deg, #ecf5ff 0%, #f5faff 100%);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  text-align: center;
  border: 1px solid #d9ecff;
}
.workflow-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(64,131,255,.15);
  border-color: #4083ff;
}
.workflow-step-grey {
  background: linear-gradient(135deg, #f4f4f5 0%, #fafafa 100%);
  border-color: #e4e7ed;
  cursor: default;
}
.workflow-step-grey:hover {
  transform: none;
  box-shadow: none;
  border-color: #e4e7ed;
}
.workflow-num {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 22px;
  height: 22px;
  background: #409eff;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.workflow-step-grey .workflow-num { background: #909399; }
.workflow-icon {
  font-size: 28px;
  margin-bottom: 4px;
}
.workflow-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.workflow-desc {
  font-size: 11px;
  color: #909399;
  line-height: 1.4;
}
.workflow-arrow {
  color: #c0c4cc;
  font-size: 20px;
  flex-shrink: 0;
}
/* 移动端折叠 */
@media (max-width: 900px) {
  .workflow-steps { flex-wrap: wrap; }
  .workflow-arrow { display: none; }
}

/* ============ 可点击的 KPI 卡片 ============ */
.kpi-card-clickable {
  cursor: pointer;
  transition: all .2s;
}
.kpi-card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

/* ============ 操作进度提示 ============ */
.action-progress {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  min-width: 280px;
  max-width: 360px;
}
.action-progress-title {
  font-size: 13px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 6px;
}
.action-progress-desc {
  font-size: 12px;
  color: #909399;
  margin-top: 6px;
}
