/* ============================================================
   styles-ui-pages.css — UI 模板全站视觉（20260606ui）
   来源：C:\Users\项目管理系统\UI模板\ 23 页 + 手机端 14 页
   策略：保留 DOM ID / JS 绑定，只改视觉层
   ============================================================ */

/* --- 内容区背景（模板化层次） --- */
.content-area {
  padding: 1.25rem 1.5rem 2rem;
}
.ui-page {
  animation: uiPageIn 0.25s ease;
}
@keyframes uiPageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 页头（模板 headline） --- */
.ui-page-header,
.section-header.ui-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.ui-page-header__text { flex: 1; min-width: 200px; }
.ui-page-title,
.section-header.ui-page-header .ui-page-title,
.section-header.ui-page-header h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  border-left: none;
  padding-left: 0;
}
.ui-page-subtitle,
.section-header.ui-page-header .ui-page-subtitle,
.section-header.ui-page-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}
.ui-page-toolbar,
.section-header.ui-page-header > div:last-child:not(.ui-page-header__text) {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* --- 统计网格（模板 metric cards） --- */
.ui-stat-grid,
.dashboard-stats.ui-stat-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.ui-stat-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) {
  .ui-stat-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .ui-stat-grid--4 { grid-template-columns: 1fr; }
}

.stat-card,
.ui-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card::before,
.ui-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0.85;
}
.stat-card:hover,
.ui-stat-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}
.stat-icon {
  background: rgba(59, 130, 246, 0.12);
  border-radius: 10px;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.stat-value,
.ui-stat-card .ui-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  background: none;
  -webkit-text-fill-color: unset;
}
.stat-label,
.ui-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}
.ui-stat-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}
.ui-stat-value--mono { font-variant-numeric: tabular-nums; }

/* --- 表格容器（模板 soft card） --- */
.table-container {
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table thead th {
  background: rgba(59, 130, 246, 0.08);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}
.data-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
}
.data-table tbody tr {
  transition: background 0.15s ease;
}
.data-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}
.data-table tbody tr td[colspan] {
  padding: 2.5rem 1rem !important;
  color: var(--text-secondary);
  text-align: center;
}

/* --- 按钮（模板渐变主按钮） --- */
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s !important;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}
.btn-secondary {
  border-radius: 10px !important;
  border: 1px solid var(--border-color) !important;
  font-weight: 500 !important;
}

/* --- 筛选栏 --- */
.filter-bar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.filter-bar select {
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* --- 图表区 --- */
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 900px) {
  .dashboard-charts { grid-template-columns: 1fr; }
}
.chart-card {
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  padding: 1.1rem 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.chart-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}

/* --- 任务看板 --- */
.task-column {
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
}
.task-card-enhanced {
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.task-card-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* --- 文档网格 --- */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.document-card {
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  transition: transform 0.2s, box-shadow 0.2s;
}
.document-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* --- 考勤统计条 --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stats-bar .stat-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.85rem;
  text-align: center;
}

/* --- 个人中心 --- */
.profile-card,
.profile-form-card {
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.profile-avatar {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

/* --- 项目一览表（深度适配） --- */
.ui-page--project-overview .ui-pot-cards > div:first-child {
  border-radius: 14px;
  margin-bottom: 1.25rem;
}
.ui-page--project-overview .ui-pot-cards > div:not(:first-child) {
  border-radius: 14px;
}
.ui-section-block { margin-top: 0.25rem; }
.ui-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

/* --- 模态框 --- */
.modal-content {
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0,  0.45);
}

/* --- 进度条 --- */
.progress-bar {
  border-radius: 10px;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
}
.progress-fill {
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* --- 分类按钮 --- */
.category-btn {
  border-radius: 10px;
  font-weight: 500;
}

/* --- 最近活动 --- */
.recent-activity {
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  padding: 1.1rem 1.25rem;
}
.recent-activity h3 {
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

/* --- 组织架构 --- */
.org-chart-container {
  border-radius: 16px;
  border: 1px solid var(--border-color);
}
