// 全局变量定义 $primary-color: #165DFF; $primary-dark: #0E42CB; $secondary-color: #4E5BA6; $success-color: #00B42A; $warning-color: #FF7D00; $danger-color: #F53F3F; $text-primary: #1D2129; $text-secondary: #4E5969; $text-tertiary: #86909C; $border-color: #E5E6EB; $background-primary: #FFFFFF; $background-secondary: #F2F3F5; $background-tertiary: #F7F8FA; $shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05); $shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08); $shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1); $border-radius: 8px; $transition: all 0.3s ease; // 欢迎区域 .welcome-section { margin-bottom: 24px; h2 { font-size: 24px; font-weight: 600; margin-bottom: 8px; color: $text-primary; } p { font-size: 14px; color: $text-secondary; } } // 数据看板 .stats-dashboard { margin-bottom: 24px; .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; } .stat-card { display: flex; align-items: center; gap: 16px; padding: 20px; background-color: $background-primary; border-radius: $border-radius; box-shadow: $shadow-sm; transition: $transition; &:hover { box-shadow: $shadow-md; transform: translateY(-2px); } .stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; &.primary { background-color: $primary-color; } &.secondary { background-color: $secondary-color; } &.warning { background-color: $warning-color; } &.success { background-color: $success-color; } } .stat-content { flex: 1; .stat-value { font-size: 28px; font-weight: 600; color: $text-primary; margin-bottom: 4px; } .stat-label { font-size: 14px; color: $text-secondary; } } .stat-trend { padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; &.positive { background-color: color-mix(in srgb, $success-color 10%, transparent); color: $success-color; } &.negative { background-color: color-mix(in srgb, $danger-color 10%, transparent); color: $danger-color; } &.neutral { background-color: color-mix(in srgb, $text-tertiary 10%, transparent); color: $text-tertiary; } } } } // 内容网格 .content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; } // 通用区块头部 .section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; h3 { font-size: 18px; font-weight: 600; color: $text-primary; } .view-all-link { color: $primary-color; text-decoration: none; font-size: 14px; transition: $transition; &:hover { text-decoration: underline; } } .search-box { max-width: 200px; .search-input { width: 100%; padding: 6px 12px; border: 1px solid $border-color; border-radius: $border-radius; font-size: 14px; background-color: $background-primary; color: $text-primary; &::placeholder { color: $text-tertiary; } &:focus { outline: none; border-color: $primary-color; box-shadow: 0 0 0 2px color-mix(in srgb, $primary-color 20%, transparent); } } } } // 紧急待办列表 .urgent-tasks-section { background-color: $background-primary; border-radius: $border-radius; padding: 24px; box-shadow: $shadow-sm; .tasks-list { display: flex; flex-direction: column; gap: 12px; } .empty-state { text-align: center; padding: 40px 20px; color: $text-tertiary; svg { margin-bottom: 16px; opacity: 0.5; } p { font-size: 14px; } } .task-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid $border-color; border-radius: $border-radius; transition: $transition; &:hover { border-color: $primary-color; box-shadow: 0 2px 8px color-mix(in srgb, $primary-color 10%, transparent); } &.completed { opacity: 0.6; background-color: $background-tertiary; } &.overdue { border-color: $danger-color; background-color: color-mix(in srgb, $danger-color 5%, transparent); } .task-checkbox { margin-top: 2px; input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; } } .task-content { flex: 1; .task-title { font-size: 16px; font-weight: 500; color: $text-primary; margin-bottom: 4px; } .task-project { font-size: 13px; color: $text-secondary; margin-bottom: 8px; } .task-meta { display: flex; gap: 16px; font-size: 12px; color: $text-tertiary; } } .task-actions { display: flex; align-items: flex-start; } } } // 项目动态流 .project-updates-section { background-color: $background-primary; border-radius: $border-radius; padding: 24px; box-shadow: $shadow-sm; .updates-list { display: flex; flex-direction: column; gap: 16px; } .empty-state { text-align: center; padding: 40px 20px; color: $text-tertiary; svg { margin-bottom: 16px; opacity: 0.5; } p { font-size: 14px; } } .update-item { display: flex; gap: 12px; padding: 16px; border: 1px solid $border-color; border-radius: $border-radius; transition: $transition; &:hover { border-color: $primary-color; box-shadow: 0 2px 8px color-mix(in srgb, $primary-color 10%, transparent); } .update-icon { width: 40px; height: 40px; border-radius: 10px; background-color: color-mix(in srgb, $primary-color 10%, transparent); display: flex; align-items: center; justify-content: center; color: $primary-color; flex-shrink: 0; } .update-content { flex: 1; .update-title { font-size: 15px; font-weight: 500; color: $text-primary; margin-bottom: 4px; } .update-text { font-size: 14px; color: $text-secondary; margin-bottom: 8px; line-height: 1.5; } .update-meta { display: flex; justify-content: space-between; align-items: center; .update-time { font-size: 12px; color: $text-tertiary; } .update-status { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 10px; &.completed { background-color: color-mix(in srgb, $success-color 10%, transparent); color: $success-color; } &.pending { background-color: color-mix(in srgb, $primary-color 10%, transparent); color: $primary-color; } &.exception { background-color: color-mix(in srgb, $danger-color 10%, transparent); color: $danger-color; } } } } } } // 按钮样式 .btn-primary { padding: 8px 16px; background-color: $primary-color; color: white; border: none; border-radius: $border-radius; font-size: 14px; font-weight: 500; cursor: pointer; transition: $transition; &:hover { background-color: $primary-dark; transform: translateY(-1px); box-shadow: $shadow-md; } &:active { transform: translateY(0); } &:disabled { background-color: $text-tertiary; cursor: not-allowed; transform: none; box-shadow: none; } } // 回到顶部按钮 .back-to-top { position: fixed; bottom: 20px; right: 20px; width: 40px; height: 40px; border-radius: 50%; background-color: #1976d2; color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; border: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); } .back-to-top.visible { opacity: 1; visibility: visible; } .back-to-top:hover { background-color: #1565c0; } // 响应式设计 @media (max-width: 1024px) { .content-grid { grid-template-columns: 1fr; } .stats-dashboard .stats-grid { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 768px) { .welcome-section { margin-bottom: 16px; h2 { font-size: 20px; } } .stats-dashboard { margin-bottom: 16px; .stats-grid { grid-template-columns: 1fr; gap: 12px; } .stat-card { padding: 16px; .stat-icon { width: 40px; height: 40px; } .stat-value { font-size: 24px; } } } .content-grid { gap: 16px; margin-bottom: 16px; } .section-header { flex-direction: column; align-items: flex-start; gap: 12px; h3 { font-size: 16px; } .search-box { max-width: 100%; width: 100%; } } .urgent-tasks-section, .project-updates-section { padding: 16px; } .task-item, .update-item { padding: 12px; } .back-to-top { bottom: 16px; right: 16px; width: 36px; height: 36px; } } @media (max-width: 480px) { .task-item { flex-direction: column; align-items: flex-start; .task-actions { margin-top: 12px; align-self: flex-end; } } .update-item { .update-icon { width: 32px; height: 32px; } } }