/* 列表页样式 */

/* 筛选面板 */
.filter-panel {
  background: #fff;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-3);
  box-shadow: var(--shadow-sm);
  margin-top: var(--header-h);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* 年份选择栏 */
.year-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--gray-3);
  margin-top: var(--header-h);
}

.year-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-7);
  white-space: nowrap;
}

.year-select {
  height: 30px;
  padding: 0 24px 0 8px;
  border: 1px solid var(--gray-3);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--gray-8);
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

.year-select:focus {
  border-color: var(--primary);
  outline: none;
}

/* 统计栏 */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--gray-3);
  font-size: 13px;
  color: var(--gray-7);
}

/* 筛选面板展开时，由筛选面板负责避开header，年份栏和统计栏不需要额外margin */
#filterPanel[style*="block"] ~ .year-bar,
#filterPanel[style*="block"] ~ .stats-bar {
  margin-top: 0;
}
/* 筛选面板收起时，年份栏需要避开header（默认状态由 year-bar 自己的 margin-top 承担） */

.stat-tags { display: flex; gap: 8px; }

.stat-tag {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}
.stat-tag.gray    { background: var(--gray-3);      color: var(--gray-6); }
.stat-tag.warning { background: var(--warning-light); color: var(--warning); }
.stat-tag.success { background: var(--success-light); color: var(--success); }

/* 人员列表容器 */
.list-body {
  padding: 12px 16px;
  min-height: calc(100vh - var(--header-h) - 40px);
}

/* 人员列表 */
.person-list {}

.pl-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-3);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
.pl-item:last-child { border-bottom: none; }
.pl-item:active { background: var(--gray-1); }

.pl-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}
.pl-avatar.female { background: #e84393; }

.pl-main { flex: 1; min-width: 0; }

.pl-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.pl-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-8);
}

.pl-meta {
  font-size: 12px;
  color: var(--gray-6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 量表微进度 */
.assess-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 5px;
}
.assess-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gray-3);
}
.assess-dot.done { background: var(--success); }
.assess-dot.dot-warn { background: #e6a23c; }
.assess-dot.dot-danger { background: var(--danger); }

.pl-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: 10px;
  flex-shrink: 0;
}

.pl-arrow {
  color: var(--gray-4);
}

/* 健康分类标签 */
.classify-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  line-height: 1.5;
  flex-shrink: 0;
}
.classify-tag.c1         { background: #e8f7ee; color: #2eaa6b; }   /* 一级-绿 */
.classify-tag.c2         { background: #fef5e0; color: #d49520; }   /* 二级-黄 */
.classify-tag.c3         { background: #fde8e8; color: #e74c3c; }   /* 三级-红 */
.classify-tag.c4         { background: #e8f0fc; color: #3a7bd5; }   /* 已管理-蓝 */
.classify-tag.c0         { background: #f0f0f0; color: #999; }      /* 未分类-灰 */
.classify-tag.c-chronic  { background: #e8f2fc; color: #1a6bbd; }   /* 慢病-蓝 */

@media (min-width: 640px) {
  .filter-grid { grid-template-columns: repeat(4, 1fr); }
}
