/* ==========================================================
   首页 / 到期列表页 专用样式
   ----------------------------------------------------------
   只被 index.html 和 expiring.html 引用，不影响其它页面的 style.css。
   配色参照参考图：浅灰底 + 白色圆角卡片 + 四色渐变统计卡。
   ========================================================== */

.home-wrap { max-width: 1360px; margin: 0 auto; padding: 20px 20px 40px; }

/* ---------- 顶部标题条 ---------- */
.home-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.home-title h2 { font-size: 18px; color: #1f2d3d; display: flex; align-items: center; gap: 8px; }
.home-title h2::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px; background: #4a8af4;
}
.home-title .tip { font-size: 12px; color: #909399; margin-left: 6px; font-weight: normal; }

/* ---------- 顶部 4 个渐变统计卡 ---------- */
.sum-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 20px;
}
.sum-card {
  position: relative; display: block; overflow: hidden;
  border-radius: 12px; padding: 18px 22px 18px 28px;
  color: #fff; text-decoration: none; cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.sum-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.13); }
/* 左侧白色小竖条（参考图每张卡左侧的彩色柱） */
.sum-card::before {
  content: ""; position: absolute; left: 13px; top: 19px;
  width: 4px; height: 22px; background: rgba(255,255,255,.9); border-radius: 2px;
}
/* 右下角淡色圆环，模拟参考图的装饰插画 */
.sum-card::after {
  content: ""; position: absolute; right: -34px; bottom: -48px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.14);
}
.sum-card .sc-label { font-size: 14px; opacity: .95; margin-left: 6px; }
.sum-card .sc-num { font-size: 34px; font-weight: 700; line-height: 1.2; margin: 10px 0 6px 6px; }
.sum-card .sc-sub { position: relative; z-index: 1; font-size: 12px; opacity: .9; margin-left: 6px; }

/* 四种渐变色：蓝 / 绿 / 橙 / 紫 */
.c-blue   { background: linear-gradient(135deg, #4a8af4 0%, #6fa8ff 100%); }
.c-green  { background: linear-gradient(135deg, #2fb37a 0%, #57c99a 100%); }
.c-orange { background: linear-gradient(135deg, #f5923e 0%, #ffb35c 100%); }
.c-purple { background: linear-gradient(135deg, #8a5cf6 0%, #a884ff 100%); }
/* 基础数据卡：青 / 靛蓝 */
.c-cyan   { background: linear-gradient(135deg, #17a2b8 0%, #3ec6d8 100%); }
.c-indigo { background: linear-gradient(135deg, #5a6fd8 0%, #7f92f0 100%); }
/* 基础数据行：两列布局 */
.sum-grid-2 { grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
/* 大数字后面的单位（人/辆） */
.sc-unit { font-size: 14px; font-weight: normal; margin-left: 4px; opacity: .9; }

/* ---------- 四个分区卡（两列布局） ---------- */
.sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sec-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid #f0f2f5;
}
.sec-head h3 {
  font-size: 16px; color: #1f2d3d; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.sec-head h3::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px; background: #4a8af4;
}
.sec-head .cnt { font-size: 12px; color: #909399; font-weight: normal; margin-left: 2px; }
.sec-head .more {
  font-size: 13px; color: #4a8af4; text-decoration: none; white-space: nowrap;
}
.sec-head .more:hover { text-decoration: underline; }

/* ---------- 列表行：主区可点击跳详情，右侧是标签和"处理"按钮 ---------- */
.ri {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid #f7f8fa;
  transition: background .15s;
}
.ri:last-child { border-bottom: none; }
.ri:hover { background: #f7f9fc; }
/* 行内左侧主区：整块可点，跳转到员工/车辆详情 */
.ri-main { flex: 1; min-width: 0; text-decoration: none; color: inherit; display: block; }
.ri-right { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ri-title { font-size: 14px; color: #1f2d3d; font-weight: 500; }
.ri-sub { font-size: 12px; color: #909399; margin-left: 6px; font-weight: normal; }
.ri-meta { font-size: 12px; color: #909399; margin-top: 3px; }

/* 空状态 */
.empty-row { padding: 34px 20px; text-align: center; color: #b6bcc6; font-size: 13px; }

/* 窄屏自适应：统计卡两列、分区卡单列 */
@media (max-width: 900px) {
  .sum-grid { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: 1fr; }
}
