/* ===== 产品数据看板样式 ===== */

/* 页面容器 - 深色主题 */
#page-dashboard {
  background: #0a0e1a;
  min-height: 100vh;
  color: #e2e8f0;
}

/* 顶部导航栏 */
.dashboard-topnav {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dashboard-refresh-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
}

.refresh-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.refresh-time {
  font-family: 'Outfit', monospace;
}

/* 主内容区域 */
.dashboard-main {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 数据概览卡片网格 */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* 数据卡片 - 毛玻璃效果 */
.dashboard-stat-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.dashboard-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s;
}

.dashboard-stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

.dashboard-stat-card:hover::before {
  opacity: 1;
}

.dashboard-stat-card:active {
  transform: translateY(-2px);
}

/* 卡片图标 */
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 24px;
}

.stat-icon.planned {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
  color: #8b5cf6;
}

.stat-icon.total {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0.05));
  color: #06b6d4;
}

.stat-icon.completed {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
  color: #22c55e;
}

.stat-icon.in-progress {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.05));
  color: #fbbf24;
}

.stat-icon.stuck {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05));
  color: #ef4444;
}

.stat-icon.shipped {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.05));
  color: #a855f7;
}

/* 卡片内容 */
.stat-label {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  font-family: 'Outfit', monospace;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-trend {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-trend.up {
  color: #22c55e;
}

.stat-trend.down {
  color: #ef4444;
}

/* 表格区域 */
.dashboard-table-section {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 24px;
}

.dashboard-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-table-title {
  font-size: 18px;
  font-weight: 600;
  color: #e2e8f0;
}

.dashboard-table-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dashboard-search-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 8px 16px;
  color: #e2e8f0;
  font-size: 14px;
  width: 240px;
  transition: all 0.3s;
}

.dashboard-search-input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.dashboard-filter-select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 8px 16px;
  color: #e2e8f0;
  font-size: 14px;
  cursor: pointer;
}

/* ===== 3D动态滚动效果 ===== */

/* 表格容器 - 3D透视上下文 */
.dashboard-table-container {
  overflow-x: auto;
  margin-bottom: 20px;
  perspective: 1000px;
  transform-style: preserve-3d;
  position: relative;
}

/* 表格 - 启用3D变换 */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

/* 表格行 - 3D效果 */
.dashboard-table tbody tr {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  transform-style: preserve-3d;
  opacity: 0;
  transform: rotateX(-30deg) translateY(20px);
  animation-fill-mode: forwards;
}

/* 行项进入视口时的3D动画 */
.dashboard-table tbody tr.row-visible {
  opacity: 1;
  transform: rotateX(0deg) translateY(0px);
}

/* 行项悬停 - 3D凸出效果 */
.dashboard-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.08);
  transform: translateZ(20px) scale(1.02);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
  z-index: 10;
  position: relative;
}

/* 隔行变色 + 3D深度 */
.dashboard-table tbody tr:nth-child(odd) {
  background: rgba(30, 41, 59, 0.3);
}

.dashboard-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.3);
}

/* 表头 - 3D固定效果 */
.dashboard-table thead {
  background: rgba(15, 23, 42, 0.9);
  transform: translateZ(30px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 20;
}

/* 状态标签 - 3D徽章效果 */
.dashboard-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  transform: translateZ(10px);
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dashboard-status-badge:hover {
  transform: translateZ(15px) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 进度条 - 3D凹槽效果 */
.dashboard-progress-bar {
  width: 100px;
  height: 6px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: translateZ(-5px);
}

.dashboard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  transform: translateZ(5px);
}

/* 分页按钮 - 3D按钮效果 */
.dashboard-pag-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 8px 16px;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  transform-style: preserve-3d;
  transform: translateZ(0px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dashboard-pag-btn:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.6);
  transform: translateZ(10px) translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

.dashboard-pag-btn:active {
  transform: translateZ(5px) translateY(0px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.dashboard-pag-btn.active {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.6);
  transform: translateZ(15px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* 3D滚动指示器 */
.dashboard-scroll-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) translateZ(50px);
  width: 4px;
  height: 100px;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.dashboard-table-container:hover .dashboard-scroll-indicator {
  opacity: 1;
}

.dashboard-scroll-indicator-fill {
  width: 100%;
  height: 30%;
  background: linear-gradient(180deg, #8b5cf6, #06b6d4);
  border-radius: 2px;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* 粒子背景效果（装饰性） */
.dashboard-table-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
  pointer-events: none;
  animation: float 10s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotateZ(0deg); }
  50% { transform: translateY(-10px) rotateZ(1deg); }
}

/* 数据卡片 - 3D悬停效果（增强现有样式） */
.dashboard-stat-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: translateZ(0px);
}

.dashboard-stat-card:hover {
  transform: translateY(-8px) translateZ(30px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 
    0 20px 40px rgba(139, 92, 246, 0.15),
    0 0 30px rgba(139, 92, 246, 0.1);
}

.dashboard-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s;
  transform: translateZ(40px);
}

.dashboard-stat-card:hover::before {
  opacity: 1;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .dashboard-main {
    padding: 16px;
  }

  .dashboard-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }

  .dashboard-stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 24px;
  }

  .dashboard-table-section {
    padding: 16px;
  }

  .dashboard-table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-table-controls {
    width: 100%;
  }

  .dashboard-search-input {
    flex: 1;
    width: auto;
  }
}

/* 加载状态 */
.dashboard-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #94a3b8;
}

.dashboard-loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 空状态 */
.dashboard-empty {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.dashboard-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.dashboard-empty-text {
  font-size: 16px;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.dashboard-table thead {
  background: rgba(15, 23, 42, 0.8);
}

.dashboard-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #94a3b8;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s;
}

.dashboard-table th:hover {
  color: #e2e8f0;
}

.dashboard-table th.sortable::after {
  content: '↕';
  margin-left: 8px;
  opacity: 0.5;
}

.dashboard-table th.sorted-asc::after {
  content: '↑';
  opacity: 1;
}

.dashboard-table th.sorted-desc::after {
  content: '↓';
  opacity: 1;
}

.dashboard-table tbody tr {
  transition: all 0.3s;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.dashboard-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.08);
}

.dashboard-table td {
  padding: 12px 16px;
  color: #e2e8f0;
}

/* 状态标签 */
.dashboard-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.dashboard-status-badge.not-started {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

.dashboard-status-badge.in-progress {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.dashboard-status-badge.completed {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.dashboard-status-badge.cancelled {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* 进度条 */
.dashboard-progress-bar {
  width: 100px;
  height: 6px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.dashboard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-progress-text {
  font-size: 12px;
  color: #94a3b8;
  font-family: 'Outfit', monospace;
}

/* 分页控件 */
.dashboard-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.dashboard-pag-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 8px 16px;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.dashboard-pag-btn:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.6);
}

.dashboard-pag-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dashboard-pag-btn.active {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.6);
}

.dashboard-pag-info {
  font-size: 14px;
  color: #94a3b8;
  margin: 0 12px;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .dashboard-main {
    padding: 16px;
  }

  .dashboard-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }

  .dashboard-stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 24px;
  }

  .dashboard-table-section {
    padding: 16px;
  }

  .dashboard-table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-table-controls {
    width: 100%;
  }

  .dashboard-search-input {
    flex: 1;
    width: auto;
  }
}

/* 加载状态 */
.dashboard-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #94a3b8;
}

.dashboard-loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 空状态 */
.dashboard-empty {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.dashboard-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.dashboard-empty-text {
  font-size: 16px;
}
