/* 项目群管理系统 - 全局样式 */

/* 导航菜单 */
.nav-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  transition: all 0.15s ease;
  cursor: pointer;
}
.nav-item:hover { background: #334155; color: #e2e8f0; }
.nav-item.active { background: #3b82f6; color: white; }
.nav-item i { width: 1.25rem; margin-right: 0.75rem; font-size: 0.875rem; }

/* 状态徽章 */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-active    { background:#dbeafe; color:#1d4ed8; }
.badge-planning  { background:#f3f4f6; color:#374151; }
.badge-on_hold   { background:#fef3c7; color:#92400e; }
.badge-completed { background:#d1fae5; color:#065f46; }
.badge-archived  { background:#f3f4f6; color:#6b7280; }
.badge-cancelled { background:#fee2e2; color:#991b1b; }

.badge-todo       { background:#f3f4f6; color:#374151; }
.badge-in_progress{ background:#dbeafe; color:#1d4ed8; }
.badge-on_hold    { background:#fef3c7; color:#92400e; }

.badge-critical { background:#fee2e2; color:#991b1b; }
.badge-high     { background:#fed7aa; color:#9a3412; }
.badge-medium   { background:#fef3c7; color:#92400e; }
.badge-low      { background:#d1fae5; color:#065f46; }

.badge-predictive  { background:#e0e7ff; color:#3730a3; }
.badge-adaptive    { background:#d1fae5; color:#065f46; }
.badge-incremental { background:#fef3c7; color:#92400e; }
.badge-iterative   { background:#fce7f3; color:#9d174d; }
.badge-hybrid      { background:#f3e8ff; color:#6b21a8; }

/* 进度条 */
.progress-bar {
  height: 6px; background: #e5e7eb; border-radius: 9999px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 9999px; transition: width 0.3s ease;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.progress-fill.danger { background: linear-gradient(90deg, #ef4444, #f87171); }
.progress-fill.warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-fill.success { background: linear-gradient(90deg, #10b981, #34d399); }

/* 卡片 */
.card {
  background: white; border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* 统计卡片 */
.stat-card {
  background: white; border-radius: 0.75rem;
  padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 任务看板列 */
.kanban-col {
  background: #f8fafc; border-radius: 0.75rem; 
  padding: 1rem; min-height: 400px;
}
.kanban-card {
  background: white; border-radius: 0.5rem; padding: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 0.5rem;
  cursor: grab; transition: transform 0.1s, box-shadow 0.1s;
  border-left: 3px solid transparent;
}
.kanban-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.kanban-card.dragging { opacity: 0.5; transform: rotate(2deg); }
.kanban-col.drag-over { background: #eff6ff; border: 2px dashed #3b82f6; }

/* 甘特图 */
.gantt-container { overflow-x: auto; }
.gantt-bar {
  height: 28px; border-radius: 4px; position: absolute;
  display: flex; align-items: center; padding: 0 8px;
  font-size: 11px; color: white; white-space: nowrap;
  overflow: hidden; cursor: pointer; transition: filter 0.15s;
}
.gantt-bar:hover { filter: brightness(1.1); }
.gantt-grid-line { border-left: 1px solid #e5e7eb; position: absolute; top: 0; bottom: 0; }
.gantt-today-line { border-left: 2px solid #ef4444; position: absolute; top: 0; bottom: 0; z-index: 10; }

/* 地铁图 */
.metro-container { position: relative; overflow: auto; background: #0f172a; border-radius: 0.75rem; }
.metro-line { stroke-width: 4; fill: none; stroke-linecap: round; }
.metro-station { cursor: pointer; transition: transform 0.15s; }
.metro-station:hover { transform: scale(1.2); }
.metro-hub { stroke-width: 3; }

/* 模态框 */
.modal-enter { animation: modalIn 0.2s ease-out; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Toast 通知 */
.toast {
  display: flex; align-items: center;
  background: white; border-radius: 0.5rem; padding: 0.75rem 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15); min-width: 280px;
  animation: toastIn 0.3s ease-out;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f8fafc; padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e2e8f0; }
.data-table td { padding: 0.875rem 1rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.data-table tr:hover td { background: #f8fafc; }

/* 表单 */
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; margin-bottom: 0.375rem; }
.form-input {
  width: 100%; padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db; border-radius: 0.5rem;
  font-size: 0.875rem; color: #374151;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-select {
  width: 100%; padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db; border-radius: 0.5rem;
  font-size: 0.875rem; background: white; cursor: pointer;
}
.form-select:focus { outline: none; border-color: #3b82f6; }
.form-textarea {
  width: 100%; padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db; border-radius: 0.5rem;
  font-size: 0.875rem; resize: vertical; min-height: 80px;
}
.form-textarea:focus { outline: none; border-color: #3b82f6; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; padding: 0.5rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.15s; border: none; }
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: #f3f4f6; color: #374151; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 0.25rem 0.625rem; font-size: 0.75rem; }

/* 项目类型图标背景 */
.type-icon { width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; }

/* 风险热图 */
.risk-matrix-cell { width: 60px; height: 60px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.1rem; cursor: pointer; transition: transform 0.1s; }
.risk-matrix-cell:hover { transform: scale(1.05); }
.risk-low    { background: #d1fae5; color: #065f46; }
.risk-medium { background: #fef3c7; color: #92400e; }
.risk-high   { background: #fed7aa; color: #9a3412; }
.risk-critical { background: #fee2e2; color: #991b1b; }

/* 干系人影响力/利益相关方矩阵 */
.stakeholder-quadrant { border: 1px solid #e5e7eb; padding: 1rem; min-height: 120px; border-radius: 0.5rem; }

/* 加载动画 */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton 1.5s infinite; border-radius: 0.25rem; }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 项目管理知识域卡片 */
.knowledge-card {
  background: #f0f9ff; border: 1px solid #bae6fd;
  border-radius: 0.5rem; padding: 0.75rem;
  transition: all 0.15s;
}
.knowledge-card:hover { background: #e0f2fe; border-color: #7dd3fc; }
.knowledge-card.has-notes { background: #eff6ff; border-color: #93c5fd; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 响应式隐藏 */
@media (max-width: 768px) {
  #sidebar { display: none; }
}
