/* ===== 骨架屏 ===== */
@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}
.skeleton-title {
  height: 18px;
  width: 60%;
  margin-bottom: 12px;
}
.skeleton-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fade { animation: fadeIn 0.3s ease-out; }
.animate-slide { animation: slideInRight 0.3s ease-out; }
.animate-scale { animation: scaleIn 0.25s ease-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ===== 渐变卡片 ===== */
.card-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: white;
  position: relative;
  overflow: hidden;
}
.card-gradient::after {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.card-gradient .stat-value,
.card-gradient .stat-label,
.card-gradient .stat-change {
  color: white !important;
}

.card-gradient-success { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
.card-gradient-warning { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.card-gradient-danger  { background: linear-gradient(135deg, #ef4444 0%, #f87171 100%); }
.card-gradient-info    { background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%); }

/* ===== 环形进度条 ===== */
.progress-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.progress-ring svg {
  transform: rotate(-90deg);
}
.progress-ring-circle-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 4;
}
.progress-ring-circle {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.progress-ring-text {
  position: absolute;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* ===== Mini 趋势图 ===== */
.sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 32px;
}
.sparkline-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-width: 3px;
  background: rgba(255,255,255,0.3);
  transition: height 0.3s ease;
}
.sparkline-bar.highlight {
  background: rgba(255,255,255,0.7);
}

/* ===== 确认弹窗 ===== */
.modal-confirm {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: 400px;
  width: 90vw;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.modal-confirm-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.modal-confirm-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.modal-confirm-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}
.modal-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ===== 审批时间轴 ===== */
.timeline {
  display: flex;
  align-items: flex-start;
  padding: 16px 0;
}
.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  min-width: 0;
}
.timeline-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  border: 3px solid var(--bg-card);
  z-index: 2;
  transition: all 0.3s ease;
}
.timeline-item.completed .timeline-dot {
  background: var(--success);
  color: white;
}
.timeline-item.active .timeline-dot {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-bg);
  animation: pulse 2s ease-in-out infinite;
}
.timeline-content {
  text-align: center;
  margin-top: 8px;
  padding: 0 4px;
}
.timeline-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.timeline-operator {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.timeline-comment {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-line {
  position: absolute;
  top: 14px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.timeline-line.completed {
  background: var(--success);
}

/* ===== 空状态现代版 ===== */
.empty-state-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}
.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}
.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 400px;
  line-height: 1.6;
}

/* ===== 自定义日历 ===== */
.date-picker-popup {
  position: absolute;
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  min-width: 280px;
  animation: scaleIn 0.15s ease-out;
}
.dp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}
.dp-header button {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}
.dp-header button:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.dp-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.dp-weekdays > div {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 4px;
}
.dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dp-day {
  text-align: center;
  padding: 6px 4px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  transition: var(--transition);
}
.dp-day:hover {
  background: var(--primary-bg);
  color: var(--primary);
}
.dp-day.dp-today {
  color: var(--primary);
  font-weight: 600;
}
.dp-day.dp-selected {
  background: var(--primary);
  color: white;
}
.dp-day.dp-empty {
  cursor: default;
}
.dp-shortcuts {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.dp-shortcuts button {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-secondary);
  transition: var(--transition);
}
.dp-shortcuts button:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

/* ===== 拖拽排序 ===== */
.dragging {
  opacity: 0.5;
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
  cursor: grabbing !important;
}
.drag-over {
  border-top: 3px solid var(--primary) !important;
}

/* ===== 批量操作工具栏 ===== */
.batch-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  margin-bottom: 12px;
  animation: slideInRight 0.2s ease-out;
}
.batch-toolbar-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
}

/* ===== 行快捷操作 ===== */
.row-actions {
  display: flex;
  gap: 4px;
  opacity: 1; /* 默认始终显示，不再hover才出现 */
  flex-wrap: nowrap;
  white-space: nowrap;
}
.row-actions button {
  width: auto; height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-secondary);
  transition: var(--transition);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.row-actions button:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

/* ===== 卡片式列表 ===== */
.card-list {
  display: grid;
  gap: 12px;
}
.card-list-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}
.card-list-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.card-list-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--border);
}
.card-list-item.status-pending::before { background: var(--warning); }
.card-list-item.status-approved::before { background: var(--success); }
.card-list-item.status-rejected::before { background: var(--danger); }
.card-list-item.status-overdue::before { background: var(--danger); }
.card-list-item.status-done::before { background: var(--primary); }
.card-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.card-list-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.card-list-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}
.card-list-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== 视图切换按钮 ===== */
.view-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-toggle button {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: var(--transition);
}
.view-toggle button.active {
  background: var(--primary);
  color: white;
}
.view-toggle button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.view-toggle button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ===== 搜索高亮 ===== */
.search-highlight {
  background: #fef08a;
  color: #854d0e;
  padding: 0 2px;
  border-radius: 2px;
}

/* ===== 最近搜索 ===== */
.search-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.search-history-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 12px;
  background: var(--bg-hover);
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.search-history-item:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

/* ===== 导出面板 ===== */
.export-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  animation: fadeIn 0.2s ease-out;
}
.export-panel-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.export-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.export-columns label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.export-columns input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
}

/* ===== 甘特图样式 ===== */
.gantt-chart {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.gantt-header {
  display: flex;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border);
  min-width: 600px;
}
.gantt-header-cell {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.gantt-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-width: 600px;
  position: relative;
}
.gantt-row:last-child { border-bottom: none; }
.gantt-row-cell {
  padding: 10px 12px;
  font-size: 13px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-bar {
  position: absolute;
  height: 20px;
  border-radius: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  white-space: nowrap;
  padding: 0 8px;
}
.gantt-bar-overdue { background: var(--danger); }
.gantt-bar-today { background: var(--warning); }
.gantt-bar-normal { background: var(--primary); }
.gantt-bar-completed { background: var(--success); }

/* ===== 看板拖拽 ===== */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kanban-column {
  min-width: 280px;
  max-width: 340px;
  flex: 1;
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: 12px;
}
.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.kanban-column-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.kanban-column-count {
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 10px;
}
.kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
}
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  transition: var(--transition);
  position: relative;
}
.kanban-card:hover {
  box-shadow: var(--shadow-md);
}
.kanban-card.dragging {
  opacity: 0.6;
  transform: rotate(2deg);
  cursor: grabbing;
}
.kanban-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}
.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.kanban-card-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: white;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.kanban-empty {
  color: var(--text-tertiary);
  font-size: 12px;
  text-align: center;
  padding: 16px 8px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}
.kanban-card-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.kanban-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.kanban-column {
  max-height: calc(100vh - 260px);
  min-height: 120px;
  overflow: hidden;
}
.kanban-column-body {
  overflow-y: auto;
  max-height: calc(100vh - 320px);
}

/* ===== 金额大写显示 ===== */
.money-chinese {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
  font-style: italic;
}

/* ===== 自动联想下拉 ===== */
.autocomplete-dropdown {
  position: absolute;
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  min-width: 100%;
  animation: fadeIn 0.15s ease-out;
}
.autocomplete-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}
.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--primary-bg);
  color: var(--primary);
}

/* ===== 响应式优化 ===== */
@media (max-width: 768px) {
  /* 表格横向滚动 */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .table-responsive .data-table {
    min-width: 600px;
  }

  /* 卡片列表单列 */
  .card-list {
    grid-template-columns: 1fr !important;
  }

  /* 表单垂直堆叠 */
  .form-row {
    flex-direction: column !important;
    gap: 0 !important;
  }
  .form-row .form-group {
    width: 100% !important;
  }

  /* 看板横向滑动 */
  .kanban-board {
    gap: 12px;
  }
  .kanban-column {
    min-width: 260px;
    max-width: 300px;
  }

  /* 仪表盘卡片双列 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* 甘特图横向滑动 */
  .gantt-chart {
    overflow-x: auto;
  }

  /* 数据表格字体强制缩小 */
  .data-table {
    font-size: 12px;
  }
  .card-body {
    padding: 12px;
  }
  .modal {
    max-width: 95vw;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .batch-toolbar {
    flex-wrap: wrap;
  }
  .page-title {
    font-size: 16px;
  }
  .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* ===== 移动端触摸优化（不改变桌面布局）===== */
@media (max-width: 768px) {
  /* 禁用长按选择菜单 */
  * {
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
  }
  /* 允许输入框选择 */
  .input, .textarea, select {
    -webkit-user-select: text;
    user-select: text;
  }
  /* 滚动条更窄 */
  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }
  /* 安全区域适配（刘海屏/底部横条） */
  .topbar {
    padding-top: env(safe-area-inset-top);
    height: calc(48px + env(safe-area-inset-top));
  }
  .sidebar {
    padding-bottom: env(safe-area-inset-bottom);
  }
  /* 看板卡片触摸友好 */
  .kanban-card {
    touch-action: pan-y;
  }
  /* 侧边栏菜单项触摸目标 ≥44px */
  .nav-item {
    min-height: 44px;
  }
  /* Toast 避免被键盘遮挡 */
  .toast {
    bottom: env(safe-area-inset-bottom);
  }
}

/* ===== T4: 成员头像 chip 与悬停信息卡片 ===== */
.mh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: default;
}
.mh-avatar {
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary, #6366f1);
  color: #fff;
  line-height: 1;
  vertical-align: middle;
}
.mh-avatar svg,
.mh-avatar > span {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-hover-card {
  position: fixed;
  z-index: 9999;
  min-width: 200px;
  max-width: 280px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  padding: 12px 14px;
  font-size: 13px;
  pointer-events: none;
}
.member-hover-card .mh-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.member-hover-card .mh-avatar-lg {
  width: 38px;
  height: 38px;
  font-size: 15px;
}
.member-hover-card .mh-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text, #1f2937);
}
.member-hover-card .mh-title {
  font-size: 12px;
  color: var(--text-tertiary, #6b7280);
  margin-top: 1px;
}
.member-hover-card .mh-body {
  border-top: 1px dashed var(--border, #e5e7eb);
  padding-top: 8px;
}
.member-hover-card .mh-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  word-break: break-all;
}
.member-hover-card .mh-row:last-child {
  margin-bottom: 0;
}
.member-hover-card .mh-label {
  flex-shrink: 0;
  width: 32px;
  color: var(--text-tertiary, #6b7280);
  font-size: 12px;
}
[data-theme="dark"] .member-hover-card {
  background: var(--bg-card, #1f2937);
  border-color: var(--border, #374151);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ===== T5: 附件缩略图与在线预览 ===== */
.att-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-hover, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  overflow: hidden;
  flex-shrink: 0;
  color: var(--text-tertiary, #6b7280);
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
}
.att-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.att-thumb-pdf {
  cursor: pointer;
  color: #dc2626;
}
.att-thumb-pdf:hover {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}
.att-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  flex-direction: column;
  gap: 10px;
}
.att-lg-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.att-lg-title {
  color: #fff;
  font-size: 13px;
  opacity: 0.85;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.att-pdf-frame {
  width: 100%;
  height: 72vh;
  border: none;
  border-radius: 6px;
  background: #525659;
}
[data-theme="dark"] .att-thumb {
  background: var(--bg-hover, #1f2937);
  border-color: var(--border, #374151);
}

/* ===== T6: 项目时间线 ===== */
.pm-timeline {
  position: relative;
  padding: 4px 0;
}
.pm-tl-item {
  position: relative;
  padding: 0 0 18px 24px;
  border-left: 2px solid var(--border-light, #e5e7eb);
  margin-left: 7px;
}
.pm-tl-item:last-child {
  padding-bottom: 2px;
}
.pm-tl-dot {
  position: absolute;
  left: -7px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px currentColor;
}
.pm-tl-body {
  font-size: 13px;
}
.pm-tl-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.pm-tl-title {
  font-weight: 600;
  color: var(--text, #1f2937);
}
.pm-tl-date {
  font-size: 12px;
  color: var(--text-tertiary, #9ca3af);
  margin-left: auto;
}
.pm-tl-desc {
  margin-top: 2px;
  color: var(--text-secondary, #6b7280);
  white-space: pre-wrap;
}
[data-theme="dark"] .pm-tl-item {
  border-left-color: var(--border, #374151);
}
[data-theme="dark"] .pm-tl-title {
  color: #e5e7eb;
}
[data-theme="dark"] .pm-tl-dot {
  border-color: var(--bg, #111827);
}

/* ===== T7: 最近访问 ===== */
.sidebar-recent { padding: 0 12px 12px; }
.sidebar-section-title { font-size: 11px; font-weight: 600; color: var(--text-tertiary, #9ca3af); text-transform: uppercase; letter-spacing: .5px; margin: 8px 0 6px; padding-left: 2px; }
.sidebar-recent-item { padding: 5px 8px; font-size: 12px; color: var(--text-secondary, #6b7280); cursor: pointer; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-recent-item:hover { background: var(--bg-hover, #f3f4f6); color: var(--text, #1f2937); }
[data-theme="dark"] .sidebar-recent-item:hover { background: var(--bg-hover, #1f2937); color: #e5e7eb; }

/* ===== T14: 实时协作 - 编辑冲突横幅 ===== */
.edit-conflict-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin: 0 0 12px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 12.5px;
  line-height: 1.5;
}
[data-theme="dark"] .edit-conflict-banner {
  background: #451a03;
  border-color: #92400e;
  color: #fdba74;
}
