/**
 * 任务中心模块样式
 */

/* 页面容器 */
.task-center-page {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 页面头部 */
.task-center-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.task-center-page .page-header h1 {
  margin: 0;
  font-size: 28px;
  color: #333;
}

.task-center-page .header-actions {
  display: flex;
  gap: 10px;
}

/* 按钮样式 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: #1890ff;
  color: white;
}

.btn-primary:hover {
  background: #40a9ff;
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-success {
  background: #52c41a;
  color: white;
}

.btn-success:hover {
  background: #73d13d;
}

.btn-danger {
  background: #ff4d4f;
  color: white;
}

.btn-danger:hover {
  background: #ff7875;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* 仪表盘统计卡片 */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.stat-icon {
  font-size: 36px;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: #666;
}

.stat-card.highlight .stat-label {
  color: rgba(255,255,255,0.9);
}

/* 最近任务区域 */
.recent-tasks-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recent-tasks-section h3 {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: #333;
}

/* 任务项 */
.task-item {
  background: #f9f9f9;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.task-item:hover {
  background: #f0f0f0;
  transform: translateX(5px);
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.task-title {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.task-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-pending {
  background: #fff7e6;
  color: #fa8c16;
}

.status-in_progress {
  background: #e6f7ff;
  color: #1890ff;
}

.status-submitted {
  background: #f9f0ff;
  color: #722ed1;
}

.status-completed {
  background: #f6ffed;
  color: #52c41a;
}

.status-rejected {
  background: #fff1f0;
  color: #ff4d4f;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
  color: #666;
}

/* 任务表单 */
.task-form-container {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 800px;
  margin: 0 auto;
}

.task-form .form-group {
  margin-bottom: 20px;
}

.task-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.task-form .required {
  color: #ff4d4f;
}

.task-form input[type="text"],
.task-form input[type="number"],
.task-form select,
.task-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.task-form input:focus,
.task-form select:focus,
.task-form textarea:focus {
  outline: none;
  border-color: #1890ff;
}

.task-form textarea {
  resize: vertical;
  min-height: 100px;
}

.category-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

/* 任务列表 */
.task-filters {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  gap: 15px;
}

.task-filters input,
.task-filters select {
  flex: 1;
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
}

.task-list {
  display: grid;
  gap: 15px;
}

.task-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s;
}

.task-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.task-card-title {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.task-card-body {
  margin-bottom: 15px;
}

.task-description {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}

.task-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
  color: #666;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-card-footer {
  display: flex;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.page-btn {
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.page-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.page-btn.active {
  background: #1890ff;
  color: white;
  border-color: #1890ff;
}

.page-ellipsis {
  padding: 8px 12px;
  color: #999;
}

/* 加载和空状态 */
.loading-spinner {
  text-align: center;
  padding: 40px;
  color: #999;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
}

.error-message {
  background: #fff1f0;
  color: #ff4d4f;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin: 20px;
}

/* 优先级样式 */
.priority-low {
  color: #52c41a;
}

.priority-medium {
  color: #1890ff;
}

.priority-high {
  color: #fa8c16;
}

.priority-urgent {
  color: #ff4d4f;
  font-weight: bold;
}

/* 文本颜色 */
.text-success {
  color: #52c41a;
}

.text-danger {
  color: #ff4d4f;
}

.text-muted {
  color: #999;
  font-size: 12px;
}

/* 任务详情页面 */
.task-detail-container {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.task-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.task-detail-header h2 {
  margin: 0;
  font-size: 24px;
  color: #333;
}

.task-detail-body {
  margin-bottom: 30px;
}

.detail-section {
  margin-bottom: 30px;
}

.detail-section h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #333;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.detail-item {
  display: flex;
  gap: 10px;
}

.detail-item label {
  font-weight: 500;
  color: #666;
  min-width: 120px;
}

.detail-item span {
  color: #333;
}

.detail-section p {
  color: #666;
  line-height: 1.8;
  margin: 0;
}

.task-detail-actions {
  display: flex;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

/* 审计日志 */
.audit-logs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-log-item {
  background: #f9f9f9;
  border-radius: 6px;
  padding: 12px 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  font-size: 14px;
}

.log-time {
  color: #999;
  font-size: 13px;
}

.log-operator {
  color: #1890ff;
  font-weight: 500;
}

.log-action {
  color: #333;
}

.log-comment {
  color: #666;
  font-style: italic;
  flex: 1 1 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .task-center-page {
    padding: 10px;
  }

  .task-center-page .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .task-filters {
    flex-direction: column;
  }

  .category-selector {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .task-detail-actions {
    flex-direction: column;
  }

  .task-card-footer {
    flex-direction: column;
  }
}

