/* ============================================
   Project Management App - PC Version CSS
   ============================================ */

/* CSS Variables */
:root {
  /* Primary Colors */
  --primary: #007AFF;
  --success: #34C759;
  --warning: #FF9500;
  --danger: #FF3B30;
  --purple: #AF52DE;
  --pink: #FF2D55;
  --teal: #5AC8FA;
  
  /* Neutral Colors */
  --bg-main: #F5F5F7;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --border-color: #E5E5EA;
  --text-primary: #1D1D1F;
  --text-secondary: #86868B;
  --text-white: #FFFFFF;
  
  /* Priority Colors */
  --priority-high: #FF3B30;
  --priority-medium: #FF9500;
  --priority-low: #34C759;
  
  /* Dimensions */
  --sidebar-width: 260px;
  --header-height: 64px;
  --border-radius: 12px;
  
  /* Font */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), #5856D6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.sidebar-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all 0.2s;
  margin-bottom: 4px;
  cursor: pointer;
}

.nav-item:hover {
  background-color: var(--bg-main);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: rgba(0, 122, 255, 0.1);
  color: var(--primary);
}

.nav-item i {
  width: 20px;
  font-size: 16px;
}

.nav-item span {
  font-size: 14px;
  font-weight: 500;
}

/* Sidebar User */
.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.sidebar-user-info {
  flex: 1;
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-user-role {
  font-size: 12px;
  color: var(--text-secondary);
}

.sidebar-logout-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sidebar-logout-btn:hover {
  background: var(--bg-main);
  color: #FF3B30;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  height: var(--header-height);
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-search {
  position: relative;
}

.header-search input {
  width: 280px;
  height: 40px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background-color: var(--bg-main);
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: white;
}

.header-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  background-color: var(--bg-main);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn:hover {
  background-color: var(--border-color);
}

/* Page Content */
.page-content {
  flex: 1;
  padding: 32px;
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--border-radius);
  padding: 32px;
  color: white;
  margin-bottom: 32px;
}

.welcome-banner h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.welcome-banner p {
  font-size: 16px;
  opacity: 0.9;
}

/* Stat Cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-card-icon.todo {
  background-color: rgba(255, 149, 0, 0.15);
  color: var(--warning);
}

.stat-card-icon.progress {
  background-color: rgba(0, 122, 255, 0.15);
  color: var(--primary);
}

.stat-card-icon.done {
  background-color: rgba(52, 199, 89, 0.15);
  color: var(--success);
}

.stat-card-icon.projects {
  background-color: rgba(175, 82, 222, 0.15);
  color: var(--purple);
}

.stat-card-content {
  flex: 1;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-link {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

/* Grid Layout */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* Project Cards Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.project-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.project-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.project-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-menu {
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.project-progress {
  margin-bottom: 16px;
}

.progress-bar {
  height: 6px;
  background-color: var(--bg-main);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-date {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Task List */
.task-list {
  display: flex;
  flex-direction: column;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.task-item:last-child {
  border-bottom: none;
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 2px;
}

.task-checkbox:hover {
  border-color: var(--primary);
}

.task-checkbox.checked {
  background-color: var(--success);
  border-color: var(--success);
  color: white;
}

.task-checkbox.in-progress {
  border-color: var(--primary);
}

.task-checkbox.in-progress::after {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
}

.task-content {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.task-title.completed {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.task-priority {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.task-priority.high {
  background-color: rgba(255, 59, 48, 0.15);
  color: var(--priority-high);
}

.task-priority.medium {
  background-color: rgba(255, 149, 0, 0.15);
  color: var(--priority-medium);
}

.task-priority.low {
  background-color: rgba(52, 199, 89, 0.15);
  color: var(--priority-low);
}

.task-due {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 主TAB标签（任务/附件） */
.filter-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  background: white;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid var(--border-color);
}

.filter-tabs .filter-tab {
  padding: 14px 28px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-tabs .filter-tab:hover {
  color: var(--primary-color);
  background: rgba(0, 122, 255, 0.05);
}

.filter-tabs .filter-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--cyan);
  border-bottom-width: 5px;
}
.card{margin-top:10px;}
/* 子筛选标签（未完成/待办/进行中/已完成） */
.filter-sub-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 0;
  margin-bottom: 16px;
}

.filter-sub-tab {
  padding: 6px 16px;
  border: none;
  background: var(--bg-main);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-sub-tab:hover {
  background: #e0e0e5;
}

.filter-sub-tab.active {
  background: var(--text-primary);
  color: white;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: #0066CC;
}

.btn-secondary {
  background-color: var(--bg-main);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background-color: #E02020;
}

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-success:hover {
  background-color: #28A745;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-actions {
  display: flex;
  gap: 12px;
}

/* Table */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: var(--bg-main);
}

.data-table td {
  font-size: 14px;
  color: var(--text-primary);
}

.data-table tr:hover td {
  background-color: var(--bg-main);
}

/* Status Badge */
.status-badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.todo {
  background-color: rgba(255, 149, 0, 0.15);
  color: var(--warning);
}

.status-badge.in-progress {
  background-color: rgba(0, 122, 255, 0.15);
  color: var(--primary);
}

.status-badge.completed {
  background-color: rgba(52, 199, 89, 0.15);
  color: var(--success);
}

/* Custom Modal */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.custom-modal {
  background-color: white;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.custom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.custom-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.custom-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background-color: var(--bg-main);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-modal-body {
  padding: 24px;
}

.custom-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  margin-top: 16px;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background-color: white;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background-color: white;
  color: var(--text-primary);
  resize: vertical;
  font-family: inherit;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-select {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background-color: white;
  color: var(--text-primary);
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Color Picker */
.color-picker {
  display: flex;
  gap: 12px;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.2s;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: var(--text-primary);
}

/* Priority Selector */
.priority-selector {
  display: flex;
  gap: 12px;
}

.priority-btn {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background-color: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.priority-btn:hover {
  background-color: var(--bg-main);
}

.priority-btn.high.selected {
  background-color: var(--priority-high);
  color: white;
  border-color: var(--priority-high);
}

.priority-btn.medium.selected {
  background-color: var(--priority-medium);
  color: white;
  border-color: var(--priority-medium);
}

.priority-btn.low.selected {
  background-color: var(--priority-low);
  color: white;
  border-color: var(--priority-low);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
}

/* Responsive */
@media (max-width: 1200px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .stat-cards {
    grid-template-columns: 1fr;
  }
  
  .header-search {
    display: none;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}


/* Toast 通知 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  max-width: 400px;
  animation: slideIn 0.3s ease;
}

.toast.hiding {
  animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}

.toast.success .toast-icon {
  background-color: rgba(52, 199, 89, 0.15);
  color: var(--success);
}

.toast.error .toast-icon {
  background-color: rgba(255, 59, 48, 0.15);
  color: var(--danger);
}

.toast.warning .toast-icon {
  background-color: rgba(255, 149, 0, 0.15);
  color: var(--warning);
}

.toast.info .toast-icon {
  background-color: rgba(0, 122, 255, 0.15);
  color: var(--primary);
}

.toast-content {
  flex: 1;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
}

.toast-close:hover {
  color: var(--text-primary);
}

/* 状态操作按钮 */
.action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-status {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-status i {
  font-size: 10px;
}

.btn-start {
  background-color: rgba(0, 122, 255, 0.15);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-start:hover {
  background-color: var(--primary);
  color: white;
}

.btn-complete {
  background-color: rgba(52, 199, 89, 0.15);
  color: var(--success);
  border: 1px solid var(--success);
}

.btn-complete:hover {
  background-color: var(--success);
  color: white;
}

.btn-reset {
  background-color: rgba(255, 149, 0, 0.15);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.btn-reset:hover {
  background-color: var(--warning);
  color: white;
}

/* 图标按钮样式 - 用于需求文档等操作 */
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
}

.btn-icon:hover {
  background-color: var(--bg-main);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-icon-danger {
  color: var(--text-secondary);
}

.btn-icon-danger:hover {
  background-color: rgba(255, 59, 48, 0.1);
  color: var(--danger);
  border-color: var(--danger);
}

/* 任务详情样式 */
.task-detail {
  padding: 0;
}

.task-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.task-detail-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.task-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background-color: var(--bg-main);
  border-radius: 8px;
}

.task-detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.task-detail-item i {
  width: 16px;
  color: var(--primary);
}

.task-detail-item.completed-time {
  color: var(--success);
}

.task-detail-item.completed-time i {
  color: var(--success);
}

.completed-time-text {
  color: var(--success);
  font-size: 13px;
}

.started-time-text {
  color: var(--primary);
  font-size: 13px;
}

.task-detail-section {
  margin-bottom: 20px;
}

.task-detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-detail-description {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  min-height: 60px;
  padding: 12px;
  background-color: var(--bg-main);
  border-radius: 8px;
}

/* 任务名称可点击样式 */
.task-title-link {
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.2s;
}

.task-title-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* 编辑按钮样式 */
.btn-edit {
  background-color: rgba(0, 122, 255, 0.15);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-edit:hover {
  background-color: var(--primary);
  color: white;
}

/* 任务名称前的状态图标 */
.task-title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.status-icon.todo {
  color: var(--warning);
}

.status-icon.in-progress {
  color: var(--primary);
}

.status-icon.completed {
  color: var(--success);
}

/* 项目选择器（胶囊样式） */
.project-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.project-capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-color);
  background-color: white;
  color: var(--text-secondary);
}

.project-capsule:hover {
  background-color: var(--bg-main);
  border-color: var(--primary);
  color: var(--text-primary);
}

.project-capsule.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.project-capsule i {
  font-size: 8px;
}

.capsule-badge {
  background-color: rgba(0, 0, 0, 0.15);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 2px;
}

.project-capsule.active .capsule-badge {
  background-color: rgba(255, 255, 255, 0.3);
}

/* 项目信息栏样式 */
.project-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-main) 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.project-info-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.project-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.project-info-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-info-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.project-info-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.project-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.project-info-item i {
  font-size: 12px;
  color: var(--text-tertiary);
}

.project-info-actions {
  display: flex;
  gap: 8px;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-outline:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* 项目详情模态框样式 */
.project-detail {
  padding: 10px 0;
}

.project-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.project-detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.project-detail-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-detail-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.project-detail-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  width: fit-content;
}

.project-detail-status.active {
  background-color: rgba(52, 199, 89, 0.15);
  color: var(--success);
}

.project-detail-status.completed {
  background-color: rgba(134, 134, 139, 0.15);
  color: var(--text-secondary);
}

.project-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.project-stat-item {
  background-color: var(--bg-main);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.project-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.project-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.project-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px;
  background-color: var(--bg-main);
  border-radius: 10px;
}

.project-detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.project-detail-item i {
  width: 18px;
  color: var(--text-tertiary);
}

.project-detail-section {
  margin-bottom: 20px;
}

.project-detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-detail-description {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  min-height: 40px;
  padding: 12px;
  background-color: var(--bg-main);
  border-radius: 8px;
}

.project-detail-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar.large {
  flex: 1;
  height: 10px;
  border-radius: 5px;
}

.progress-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 40px;
}


/* 附件相关样式 */
.attachment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.attachment-header h4 {
  margin: 0;
}

.attachment-upload-btn {
  cursor: pointer;
  font-size: 12px;
  padding: 6px 12px;
}

.attachment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
  padding: 12px;
  background-color: var(--bg-main);
  border-radius: 8px;
}

.attachment-empty {
  color: var(--text-tertiary);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s;
}

.attachment-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.1);
}

.attachment-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.attachment-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.attachment-icon.image {
  background-color: rgba(52, 199, 89, 0.15);
  color: var(--success);
}

.attachment-icon.document {
  background-color: rgba(0, 122, 255, 0.15);
  color: var(--primary);
}

.attachment-icon.archive {
  background-color: rgba(255, 149, 0, 0.15);
  color: var(--warning);
}

.attachment-icon.other {
  background-color: rgba(134, 134, 139, 0.15);
  color: var(--text-secondary);
}

.attachment-details {
  flex: 1;
  min-width: 0;
}

.attachment-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.attachment-actions {
  display: flex;
  gap: 6px;
}

.attachment-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

/* 大尺寸模态框 */
.custom-modal-large {
  max-width: 900px;
  width: 90%;
}

/* 超大尺寸模态框（用于需求文档等富文本内容） */
.custom-modal-xlarge {
  max-width: 1200px;
  width: 95%;
  max-height: 92vh;
}

.custom-modal-xlarge .custom-modal-body {
  max-height: calc(92vh - 120px);
  overflow-y: auto;
}

/* 上传进度 */
.upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background-color: rgba(0, 122, 255, 0.1);
  border-radius: 8px;
}

.upload-progress-bar {
  flex: 1;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background-color: var(--primary);
  transition: width 0.3s;
}

.upload-progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 40px;
}


/* 任务详情视图样式 */
.detail-back-bar {
  margin-bottom: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary);
}

.task-detail-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
}

.task-detail-header-left {
  flex: 1;
}

.task-detail-title-large {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.task-detail-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.task-detail-header-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.task-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.task-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.task-info-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.task-info-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-info-value i {
  color: var(--text-tertiary);
}

.task-detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .task-detail-content-grid {
    grid-template-columns: 1fr;
  }
}

.task-detail-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
}

.task-detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.task-detail-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-detail-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.task-detail-description-content {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
  min-height: 120px;
  padding: 12px;
  background-color: var(--bg-main);
  border-radius: 8px;
}

.task-detail-description-empty {
  color: var(--text-tertiary);
  font-style: italic;
}

.task-status-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


/* 图片预览模态框 */
.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.image-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.image-preview-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background-color: transparent;
  z-index: 1;
}

.image-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 8px 8px 0 0;
}

.image-preview-title {
  color: white;
  font-size: 14px;
  font-weight: 500;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.image-preview-download,
.image-preview-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  text-decoration: none;
}

.image-preview-download:hover,
.image-preview-close:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.image-preview-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 0 0 8px 8px;
  padding: 16px;
  overflow: auto;
}

.image-preview-img {
  max-width: 85vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}


/* 项目附件列表 */
.project-attachments-list {
  padding: 16px;
}

.project-attachments-list .empty-state {
  padding: 40px 20px;
}

.attachment-group {
  margin-bottom: 20px;
}

.attachment-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-main);
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.attachment-group-header:hover {
  background: #E5E5EA;
}

.attachment-group-header .task-icon {
  color: var(--primary-color);
}

.attachment-group-header .task-name {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
}

.attachment-group-header .attachment-badge {
  background: var(--yellow);
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}

.attachment-group-items {
  padding-left: 20px;
}

.project-attachment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.project-attachment-item:hover {
  background: var(--bg-main);
}

.project-attachment-item .file-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.project-attachment-item .file-icon.image {
  background: #E3F2FD;
  color: #1976D2;
}

.project-attachment-item .file-icon.pdf {
  background: #FFEBEE;
  color: #D32F2F;
}

.project-attachment-item .file-icon.doc {
  background: #E3F2FD;
  color: #1565C0;
}

.project-attachment-item .file-icon.excel {
  background: #E8F5E9;
  color: #2E7D32;
}

.project-attachment-item .file-icon.archive {
  background: #FFF3E0;
  color: #EF6C00;
}

.project-attachment-item .file-icon.other {
  background: #F5F5F5;
  color: #757575;
}

.project-attachment-item .file-info {
  flex: 1;
  min-width: 0;
}

.project-attachment-item .file-name {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-attachment-item .file-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.project-attachment-item .file-actions {
  display: flex;
  gap: 8px;
}

.project-attachment-item .file-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}

.attachment-count {
  font-size: 13px;
  color: var(--text-secondary);
}


/* 项目附件区域 */
.project-attachments-section {
  background: white;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.project-attachments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
}

.project-attachments-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-attachments-header h3 i {
  color: var(--primary-color);
}

.project-attachments-list {
  padding: 16px 20px;
  overflow-y: auto;
}

.project-attachment-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-main);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.project-attachment-item:last-child {
  margin-bottom: 0;
}

.project-attachment-item:hover {
  background: #f0f0f5;
}

/* 图片缩略图样式 */
.project-attachment-item .file-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 14px;
  flex-shrink: 0;
  background: #f0f0f5;
  border: 1px solid var(--border-color);
}

.project-attachment-item .file-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-attachment-item.is-image:hover {
  background: rgba(0, 122, 255, 0.08);
  border-color: var(--primary);
}

.project-attachment-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  font-size: 18px;
}

.project-attachment-icon.image { background: #E3F2FD; color: #1976D2; }
.project-attachment-icon.pdf { background: #FFEBEE; color: #D32F2F; }
.project-attachment-icon.doc { background: #E3F2FD; color: #1565C0; }
.project-attachment-icon.excel { background: #E8F5E9; color: #388E3C; }
.project-attachment-icon.archive { background: #FFF3E0; color: #F57C00; }
.project-attachment-icon.other { background: #F5F5F5; color: #757575; }

.project-attachment-info {
  flex: 1;
  min-width: 0;
}

.project-attachment-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.project-attachment-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-attachment-task {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-color);
  cursor: pointer;
}

.project-attachment-task:hover {
  text-decoration: underline;
}

.project-attachment-actions {
  display: flex;
  gap: 8px;
}

.project-attachment-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}

.project-attachments-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.project-attachments-empty i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.project-attachments-empty p {
  margin: 0;
  font-size: 14px;
}


/* 附件分组样式 */
.project-attachments-count {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.attachment-group {
  margin-bottom: 16px;
}

.attachment-group:last-child {
  margin-bottom: 0;
}

.attachment-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.attachment-group-header:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.attachment-group-header .task-icon {
  color: var(--primary-color);
  font-size: 14px;
}

.attachment-group-header .task-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-group-header .attachment-badge {
  background: var(--yellow);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.attachment-group-items {
  padding-left: 12px;
}

.file-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 16px;
}

.file-icon.image { background: #E3F2FD; color: #1976D2; }
.file-icon.pdf { background: #FFEBEE; color: #D32F2F; }
.file-icon.doc { background: #E3F2FD; color: #1565C0; }
.file-icon.excel { background: #E8F5E9; color: #388E3C; }
.file-icon.archive { background: #FFF3E0; color: #F57C00; }
.file-icon.other { background: #F5F5F5; color: #757575; }

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.file-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.file-actions {
  display: flex;
  gap: 6px;
}

.file-actions .btn {
  padding: 5px 8px;
  font-size: 11px;
}


/* 项目附件头部 */
.project-attachments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-main);
}

.attachments-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.attachments-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}


/* 返回项目列表导航 */
.project-back-nav {
  margin-bottom: 16px;
}

.project-back-nav .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.project-back-nav .back-link:hover {
  color: var(--primary-color);
  background: rgba(0, 122, 255, 0.1);
}

.project-back-nav .back-link i {
  font-size: 12px;
}


/* 任务详情页附件缩略图 */
.attachment-item .attachment-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  background: #f0f0f5;
}

.attachment-item.attachment-item-image {
  transition: background 0.2s;
}

.attachment-item.attachment-item-image:hover {
  background: rgba(0, 122, 255, 0.08);
}

.attachment-item .attachment-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}


/* 搜索类别选择器 */
.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.search-category-select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-size: 13px;
  background-color: var(--bg-main);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
}

.search-category-select:focus {
  border-color: var(--primary);
}

.header-search input {
  border-radius: 0 8px 8px 0 !important;
  padding-left: 50px !important;
}

.header-search i.fa-search {
  position: absolute;
  left: 100px;
  z-index: 1;
}

/* 搜索结果下拉框 */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.search-results-section {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.search-results-section:last-child {
  border-bottom: none;
}

.search-results-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  padding: 8px 16px 4px;
  letter-spacing: 0.5px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-result-item:hover {
  background: var(--bg-main);
}

.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.search-result-icon.project {
  background: rgba(175, 82, 222, 0.15);
  color: var(--purple);
}

.search-result-icon.task {
  background: rgba(0, 122, 255, 0.15);
  color: var(--primary);
}

.search-result-icon.attachment {
  background: rgba(255, 149, 0, 0.15);
  color: var(--warning);
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.search-no-results {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary);
}

.search-no-results i {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.5;
}


/* ==================== 需求文档样式 ==================== */

/* 需求状态徽章 */
.status-badge.status-pending {
  background-color: #FFF3CD;
  color: #856404;
}

.status-badge.status-approved {
  background-color: #D4EDDA;
  color: #155724;
}

.status-badge.status-rejected {
  background-color: #F8D7DA;
  color: #721C24;
}

/* 需求详情样式 */
.requirement-detail {
  padding: 0;
}

.requirement-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E5EA;
}

.requirement-detail-title {
  font-size: 24px;
  font-weight: 600;
  color: #1D1D1F;
  margin: 0;
  flex: 1;
}

.requirement-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background-color: #F5F5F7;
  border-radius: 12px;
}

.requirement-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #1D1D1F;
}

.requirement-detail-item i {
  color: #86868B;
  width: 16px;
}

.requirement-detail-section {
  margin-bottom: 24px;
}

.requirement-detail-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1D1D1F;
  margin: 0 0 12px 0;
}

.requirement-detail-description {
  font-size: 14px;
  line-height: 1.6;
  color: #1D1D1F;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* 状态变更历史 */
.status-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-history-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background-color: #F5F5F7;
  border-radius: 8px;
}

.status-history-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #007AFF;
  color: white;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-history-content {
  flex: 1;
}

.status-history-change {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1D1D1F;
  margin-bottom: 4px;
}

.status-history-change .fa-arrow-right {
  color: #86868B;
  font-size: 12px;
}

.status-from,
.status-to {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.status-from {
  background-color: #E5E5EA;
  color: #1D1D1F;
}

.status-to {
  background-color: #007AFF;
  color: white;
}

.status-history-meta {
  font-size: 12px;
  color: #86868B;
}

/* ============================================
   需求文档统计徽章样式
   ============================================ */

/* 项目信息栏中的需求统计 */
.project-info-requirements {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background-color: #F5F5F7;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.project-info-requirements:hover {
  background-color: #E5E5EA;
}

.requirement-badges {
  display: inline-flex;
  gap: 4px;
}

.req-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.req-badge.pending {
  background-color: #FF9500;
}

.req-badge.approved {
  background-color: #34C759;
}

.req-badge.rejected {
  background-color: #FF3B30;
}

/* 项目需求文档容器 */
.project-requirements-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.requirements-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.requirements-actions {
  display: flex;
  gap: 8px;
}

#projectRequirementsContainer .filter-sub-tabs {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
}

#projectRequirementsContainer .table-container {
  padding: 0;
}

/* 项目卡片中的需求统计 */
.project-card .requirement-stats {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.project-card .req-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.project-card .req-stat i {
  font-size: 10px;
}

.project-card .req-stat.pending i {
  color: #FF9500;
}

.project-card .req-stat.approved i {
  color: #34C759;
}

.project-card .req-stat.rejected i {
  color: #FF3B30;
}

/* Quill 富文本编辑器样式 */
.quill-editor {
  background: white;
  border-radius: 8px;
}

.quill-editor .ql-toolbar {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-color: var(--border-color);
}

.quill-editor .ql-container {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  border-color: var(--border-color);
  min-height: 280px;
  font-size: 14px;
}

.quill-editor .ql-editor {
  min-height: 280px;
  max-height: 500px;
  overflow-y: auto;
}

/* Quill 编辑器内图片尺寸限制 */
.quill-editor .ql-editor img {
  max-width: 300px;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  cursor: pointer;
}

/* 需求详情中的富文本显示样式 */
.ql-editor-view {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 16px;
  min-height: 100px;
}

.ql-editor-view p {
  margin-bottom: 8px;
}

.ql-editor-view ul, .ql-editor-view ol {
  padding-left: 20px;
  margin-bottom: 8px;
}

.ql-editor-view h1, .ql-editor-view h2, .ql-editor-view h3 {
  margin-bottom: 12px;
}

.ql-editor-view img {
  max-width: 100%;
  height: auto;
}

.ql-editor-view a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* 需求文档详情弹窗布局 */
.requirement-detail-modal {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.requirement-detail-modal .custom-modal-header {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-color);
}

.requirement-detail-modal .custom-modal-header .custom-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 16px;
}

.requirement-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.requirement-detail-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-color);
  padding: 16px 24px;
  background: var(--bg-card);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 需求文档编辑弹窗布局 */
.requirement-edit-modal {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.requirement-edit-modal .custom-modal-header {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-color);
}

/* 需求弹窗标题栏布局 */
.requirement-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.requirement-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.requirement-modal-divider {
  color: var(--border-color);
  font-weight: 300;
}

.requirement-modal-project {
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.requirement-edit-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
}

.requirement-edit-body form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.requirement-edit-body .form-group-flex {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.requirement-edit-body .form-group-flex .quill-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.requirement-edit-body .form-group-flex .quill-editor .ql-container {
  flex: 1;
  min-height: 350px;
}

.requirement-edit-body .form-group-flex .quill-editor .ql-editor {
  max-height: none;
}

/* 需求列表表格列宽 */
.requirement-table {
  table-layout: fixed;
  width: 100%;
}

.requirement-table .col-title {
  min-width: 200px;
  width: auto;
}

.requirement-table .col-project {
  width: 150px;
}

.requirement-table .col-submitter {
  width: 100px;
}

.requirement-table .col-time {
  width: 140px;
}

.requirement-table .col-actions {
  width: 100px;
}

.requirement-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.requirement-table td .action-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: center;
}

.requirement-table td:first-child {
  white-space: normal;
  word-break: break-word;
}

/* 单个需求文档展示样式 */
.empty-requirement-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.empty-requirement-state i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.empty-requirement-state p {
  margin: 0;
  font-size: 14px;
}

.single-requirement-content {
  padding: 20px;
}

.single-requirement-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.single-requirement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.single-requirement-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.single-requirement-meta i {
  color: var(--text-tertiary);
}

.single-requirement-description {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 16px;
  min-height: 100px;
}

.requirement-edit-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-color);
  padding: 16px 24px;
  background: var(--bg-card);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 编辑模式下禁用的选择器样式 */
#requirementProjectSelect:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.7;
}

/* ==================== 需求文档评论区样式 ==================== */
.requirement-comments-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.comments-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-title i {
  color: var(--primary-color);
}

.comments-list {
  margin-bottom: 20px;
}

.comments-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-tertiary);
  font-size: 14px;
  background: #f9f9f9;
  border-radius: 8px;
}

.comment-loading {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
}

.comment-item {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.comment-item:last-child {
  margin-bottom: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author i {
  font-size: 20px;
  color: var(--primary-color);
}

.comment-author-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-time {
  font-size: 12px;
  color: var(--text-tertiary);
}

.comment-edited {
  font-size: 11px;
  color: var(--text-tertiary);
  font-style: italic;
}

.comment-content {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.btn-link:hover {
  color: var(--primary-color);
}

.btn-link-danger:hover {
  color: var(--danger-color);
}

.comment-form {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 16px;
}

.comment-input {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  background: var(--bg-card);
}

.comment-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.comment-input::placeholder {
  color: var(--text-tertiary);
}

.comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.comment-char-count {
  font-size: 12px;
  color: var(--text-tertiary);
}

.comment-edit-input {
  width: 100%;
  min-height: 60px;
  padding: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  background: var(--bg-card);
  margin-bottom: 8px;
}

.comment-edit-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.comment-edit-actions {
  display: flex;
  gap: 8px;
}
