app.css 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
  2. @tailwind base;
  3. @tailwind components;
  4. @tailwind utilities;
  5. @layer base {
  6. :root {
  7. --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  8. }
  9. body {
  10. @apply bg-slate-50 text-slate-900 font-sans antialiased;
  11. }
  12. /* 平滑滚动 */
  13. html {
  14. scroll-behavior: smooth;
  15. }
  16. /* 自定义滚动条 */
  17. ::-webkit-scrollbar {
  18. @apply w-2 h-2;
  19. }
  20. ::-webkit-scrollbar-track {
  21. @apply bg-slate-100 rounded-lg;
  22. }
  23. ::-webkit-scrollbar-thumb {
  24. @apply bg-slate-300 rounded-lg hover:bg-slate-400 transition-colors duration-200;
  25. }
  26. ::-webkit-scrollbar-thumb:hover {
  27. @apply bg-slate-400;
  28. }
  29. }
  30. @layer components {
  31. /* Filament 登录页面定制 */
  32. .fi-logo {
  33. display: none !important;
  34. }
  35. .fi-logo::after {
  36. content: '数学知识图谱管理系统' !important;
  37. display: inline-block !important;
  38. font-size: 1.25rem !important;
  39. font-weight: 600 !important;
  40. color: #0ea5e9 !important;
  41. }
  42. /* 玻璃态面板 */
  43. .glass-panel {
  44. @apply rounded-2xl border border-white/20 bg-white/70 shadow-lg backdrop-blur-md transition-all duration-300 hover:shadow-xl dark:border-white/10 dark:bg-slate-900/60;
  45. }
  46. /* 卡片组件 */
  47. .metric-card {
  48. @apply rounded-xl border border-slate-200/80 bg-white/90 px-6 py-5 shadow-sm transition-all duration-300 hover:shadow-md hover:scale-[1.02] dark:border-slate-700/80 dark:bg-slate-900/50;
  49. }
  50. /* 渐变背景 */
  51. .gradient-bg {
  52. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  53. }
  54. .gradient-bg-light {
  55. background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  56. }
  57. /* 现代化按钮 */
  58. .btn-modern {
  59. @apply relative inline-flex items-center justify-center px-6 py-3 text-sm font-medium text-white bg-primary-600 rounded-lg shadow-md transition-all duration-300 hover:bg-primary-700 hover:shadow-lg hover:scale-105 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 active:scale-95;
  60. }
  61. .btn-modern-outline {
  62. @apply relative inline-flex items-center justify-center px-6 py-3 text-sm font-medium text-primary-600 bg-transparent border border-primary-600 rounded-lg shadow-sm transition-all duration-300 hover:bg-primary-50 hover:shadow-md hover:scale-105 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 active:scale-95;
  63. }
  64. /* 输入框样式 */
  65. .input-modern {
  66. @apply w-full px-4 py-3 text-sm border border-slate-300 rounded-lg transition-all duration-200 focus:border-primary-500 focus:ring-2 focus:ring-primary-200 focus:outline-none hover:border-slate-400 dark:bg-slate-800 dark:border-slate-600 dark:text-slate-100 dark:hover:border-slate-500;
  67. }
  68. /* 表格样式增强 */
  69. .table-modern {
  70. @apply w-full border-collapse overflow-hidden rounded-lg shadow-sm border border-slate-200 dark:border-slate-700;
  71. }
  72. .table-modern thead th {
  73. @apply px-6 py-4 text-left text-xs font-semibold text-slate-600 uppercase tracking-wider bg-slate-50/50 dark:bg-slate-800/50 dark:text-slate-300;
  74. }
  75. .table-modern tbody tr {
  76. @apply transition-colors duration-200 hover:bg-slate-50/70 dark:hover:bg-slate-800/50;
  77. }
  78. .table-modern tbody td {
  79. @apply px-6 py-4 text-sm text-slate-900 border-t border-slate-200 dark:border-slate-700 dark:text-slate-100;
  80. }
  81. /* 导航栏样式 */
  82. .navbar-modern {
  83. @apply backdrop-blur-md bg-white/80 shadow-sm border-b border-slate-200/50 dark:bg-slate-900/80 dark:border-slate-700/50;
  84. }
  85. /* 侧边栏样式 */
  86. .sidebar-modern {
  87. @apply bg-white border-r border-slate-200 dark:bg-slate-900 dark:border-slate-700;
  88. }
  89. /* 页面标题 */
  90. .page-title {
  91. @apply text-3xl font-bold text-slate-900 mb-2 dark:text-white;
  92. }
  93. .page-subtitle {
  94. @apply text-sm text-slate-600 dark:text-slate-400;
  95. }
  96. /* 状态指示器 */
  97. .status-online {
  98. @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800 dark:bg-green-900/50 dark:text-green-400;
  99. }
  100. .status-offline {
  101. @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800 dark:bg-red-900/50 dark:text-red-400;
  102. }
  103. .status-pending {
  104. @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-900/50 dark:text-yellow-400;
  105. }
  106. /* 加载动画 */
  107. .loading-spinner {
  108. @apply inline-block w-4 h-4 border-2 border-slate-300 border-t-primary-600 rounded-full animate-spin;
  109. }
  110. /* 动画效果 */
  111. .animate-fade-in {
  112. @apply animate-fadeIn;
  113. }
  114. .animate-slide-up {
  115. @apply animate-slideUp;
  116. }
  117. /* 毛玻璃效果 */
  118. .frosted-glass {
  119. @apply bg-white/10 backdrop-blur-lg border border-white/20 shadow-xl;
  120. }
  121. .frosted-glass-dark {
  122. @apply bg-slate-900/10 backdrop-blur-lg border border-slate-700/20 shadow-xl;
  123. }
  124. /* 悬停效果 */
  125. .hover-lift {
  126. @apply transition-transform duration-300 hover:-translate-y-1 hover:shadow-lg;
  127. }
  128. /* 统计卡片特殊样式 */
  129. .stat-card {
  130. @apply relative overflow-hidden rounded-xl border border-slate-200 bg-gradient-to-br from-white to-slate-50 p-6 shadow-sm transition-all duration-300 hover:shadow-md hover:border-primary-200 dark:border-slate-700 dark:from-slate-800 dark:to-slate-900 dark:hover:border-primary-800;
  131. }
  132. .stat-card::before {
  133. content: '';
  134. @apply absolute inset-0 bg-gradient-to-br from-primary-500/10 to-transparent opacity-0 transition-opacity duration-300;
  135. }
  136. .stat-card:hover::before {
  137. @apply opacity-100;
  138. }
  139. /* 徽章样式 */
  140. .badge-modern {
  141. @apply inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium transition-colors duration-200;
  142. }
  143. .badge-primary {
  144. @apply bg-primary-100 text-primary-800 dark:bg-primary-900/50 dark:text-primary-300;
  145. }
  146. .badge-secondary {
  147. @apply bg-secondary-100 text-secondary-800 dark:bg-secondary-900/50 dark:text-secondary-300;
  148. }
  149. .badge-success {
  150. @apply bg-green-100 text-green-800 dark:bg-green-900/50 dark:text-green-400;
  151. }
  152. .badge-warning {
  153. @apply bg-yellow-100 text-yellow-800 dark:bg-yellow-900/50 dark:text-yellow-400;
  154. }
  155. .badge-error {
  156. @apply bg-red-100 text-red-800 dark:bg-red-900/50 dark:text-red-400;
  157. }
  158. /* 分割线 */
  159. .divider-modern {
  160. @apply my-6 border-0 border-t border-slate-200 dark:border-slate-700;
  161. }
  162. }
  163. @layer utilities {
  164. /* 文字渐变 */
  165. .text-gradient {
  166. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  167. -webkit-background-clip: text;
  168. -webkit-text-fill-color: transparent;
  169. background-clip: text;
  170. }
  171. /* 隐藏滚动条 */
  172. .no-scrollbar {
  173. -ms-overflow-style: none;
  174. scrollbar-width: none;
  175. }
  176. .no-scrollbar::-webkit-scrollbar {
  177. display: none;
  178. }
  179. /* 混合模式 */
  180. .mix-blend-multiply {
  181. mix-blend-mode: multiply;
  182. }
  183. .mix-blend-screen {
  184. mix-blend-mode: screen;
  185. }
  186. }