/* 基础样式重置和CSS变量定义 */ :root { /* 主色调 - 中性专业 */ --primary-50: #f8fafc; --primary-100: #f1f5f9; --primary-200: #e2e8f0; --primary-300: #cbd5e1; --primary-400: #94a3b8; --primary-500: #64748b; --primary-600: #475569; --primary-700: #334155; --primary-800: #1e293b; --primary-900: #0f172a; /* 强调色 - 蓝色系 */ --accent-50: #eff6ff; --accent-100: #dbeafe; --accent-200: #bfdbfe; --accent-300: #93c5fd; --accent-400: #60a5fa; --accent-500: #3b82f6; --accent-600: #2563eb; --accent-700: #1d4ed8; --accent-800: #1e40af; --accent-900: #1e3a8a; /* 状态色 */ --success: #10b981; --warning: #f59e0b; --error: #ef4444; --info: #06b6d4; /* 背景色 */ --bg-primary: #ffffff; --bg-secondary: #f8fafc; --bg-tertiary: #f1f5f9; /* 文字色 */ --text-primary: #0f172a; --text-secondary: #475569; --text-tertiary: #64748b; --text-muted: #94a3b8; /* 边框色 */ --border-light: #e2e8f0; --border-medium: #cbd5e1; --border-dark: #94a3b8; /* 间距 */ --spacing-xs: 4px; --spacing-sm: 8px; --spacing-md: 16px; --spacing-lg: 24px; --spacing-xl: 32px; /* 圆角 */ --radius-sm: 4px; --radius-md: 6px; --radius-lg: 8px; --radius-xl: 12px; /* 阴影 */ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); } /* 暗色主题支持 */ [data-theme="dark"] { --bg-primary: #0f172a; --bg-secondary: #1e293b; --bg-tertiary: #334155; --text-primary: #f8fafc; --text-secondary: #e2e8f0; --text-tertiary: #cbd5e1; --border-light: #334155; --border-medium: #475569; --border-dark: #64748b; } /* 重置样式 */ * { box-sizing: border-box; } body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 14px; line-height: 1.5; color: var(--text-primary); background-color: var(--bg-secondary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* 主容器布局 */ .app-container { display: grid; grid-template-columns: 260px 1fr; height: 100vh; overflow: hidden; } /* 响应式布局 */ @media (max-width: 1024px) { .app-container { grid-template-columns: 240px 1fr; } } @media (max-width: 768px) { .app-container { grid-template-columns: 1fr; } } /* 通用工具类 */ .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } /* 焦点样式 */ :focus-visible { outline: 2px solid var(--accent-600); outline-offset: 2px; } /* 减少动画偏好 */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } /* 滚动条样式 */ ::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: var(--border-dark); } /* 加载动画 */ @keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } } .loading-shimmer { background: linear-gradient( 90deg, var(--bg-tertiary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100% ); background-size: 200px 100%; animation: shimmer 1.5s infinite linear; } /* 通用按钮样式 */ .btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border: 1px solid var(--border-medium); border-radius: var(--radius-md); background: var(--bg-primary); color: var(--text-primary); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; transition: all 0.2s ease; gap: 8px; } .btn:hover { background: var(--bg-tertiary); border-color: var(--border-dark); } .btn:focus-visible { outline: 2px solid var(--accent-600); outline-offset: 2px; } .btn-primary { background: var(--accent-600); color: white; border-color: var(--accent-600); } .btn-primary:hover { background: var(--accent-700); border-color: var(--accent-700); } .btn-secondary { background: var(--bg-secondary); color: var(--text-secondary); border-color: var(--border-light); } .btn-secondary:hover { background: var(--bg-tertiary); color: var(--text-primary); } /* 表单元素样式 */ input, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-results-button, input[type="search"]::-webkit-search-results-decoration { display: none; } /* 表格样式 */ .table-container { background: var(--bg-primary); border: 1px solid var(--border-light); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); } .table { width: 100%; border-collapse: collapse; } .table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-light); } .table th { background: var(--bg-secondary); font-weight: 600; color: var(--text-secondary); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; } .table tbody tr:hover { background: var(--bg-secondary); } .table tbody tr:last-child td { border-bottom: none; } /* 空状态样式 */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; color: var(--text-secondary); } .empty-state-icon { width: 48px; height: 48px; margin-bottom: 16px; color: var(--text-muted); } .empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; } .empty-state-description { font-size: 14px; color: var(--text-secondary); max-width: 300px; } /* 分页样式 */ .pagination { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: var(--bg-primary); border-top: 1px solid var(--border-light); } .pagination-info { font-size: 14px; color: var(--text-secondary); } .pagination-controls { display: flex; align-items: center; gap: 8px; } .pagination-button { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 12px; border: 1px solid var(--border-medium); border-radius: var(--radius-sm); background: var(--bg-primary); color: var(--text-secondary); font-size: 14px; text-decoration: none; transition: all 0.2s ease; white-space: nowrap; } .pagination-button:hover { background: var(--bg-secondary); border-color: var(--border-dark); color: var(--text-primary); } .pagination-button.active { background: var(--accent-600); color: white; border-color: var(--accent-600); } .pagination-button:disabled { opacity: 0.5; cursor: not-allowed; } /* 模态框样式 */ .modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; animation: fadeIn 0.2s ease; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .modal.hidden { display: none; } .modal-content { background: var(--bg-primary); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 600px; width: 100%; max-height: 80vh; overflow-y: auto; animation: slideUp 0.2s ease; } @keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border-light); } .modal-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0; } .modal-close { background: none; border: none; padding: 8px; color: var(--text-secondary); cursor: pointer; border-radius: var(--radius-sm); transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; } .modal-close:hover { background: var(--bg-secondary); color: var(--text-primary); } .modal-close svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; } .modal-body { padding: 24px; } /* 详情内容样式 */ .detail-content { display: flex; flex-direction: column; gap: 16px; } .detail-item { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--bg-secondary); border-radius: var(--radius-md); border: 1px solid var(--border-light); } .detail-label { font-weight: 600; font-size: 14px; color: var(--text-secondary); text-transform: capitalize; } .detail-value { font-size: 16px; color: var(--text-primary); line-height: 1.5; word-break: break-word; } .detail-value:empty::before { content: '- -'; color: var(--text-muted); font-style: italic; } /* 通知样式 */ .notification { position: fixed; top: 16px; right: 16px; padding: 12px 16px; border-radius: var(--radius-md); color: white; font-size: 14px; z-index: 1001; box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease; } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } .notification-success { background: var(--success); } .notification-error { background: var(--error); } .notification-warning { background: var(--warning); } .notification-info { background: var(--info); }