app.css 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119
  1. /* 使用系统字体栈,避免依赖外部CDN */
  2. @tailwind base;
  3. @tailwind components;
  4. @tailwind utilities;
  5. @layer base {
  6. :root {
  7. /* 使用系统字体:PingFang SC (macOS), 苹方-简 (iOS), 微软雅黑 (Windows), 文泉驿微米黑 (Linux) */
  8. --font-sans: 'PingFang SC', 'PingFang SC Regular', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  9. }
  10. body {
  11. @apply bg-slate-50 text-slate-900 font-sans antialiased;
  12. }
  13. /* 平滑滚动 */
  14. html {
  15. scroll-behavior: smooth;
  16. }
  17. /* 自定义滚动条 */
  18. ::-webkit-scrollbar {
  19. @apply w-2 h-2;
  20. }
  21. ::-webkit-scrollbar-track {
  22. @apply bg-slate-100 rounded-lg;
  23. }
  24. ::-webkit-scrollbar-thumb {
  25. @apply bg-slate-300 rounded-lg hover:bg-slate-400 transition-colors duration-200;
  26. }
  27. ::-webkit-scrollbar-thumb:hover {
  28. @apply bg-slate-400;
  29. }
  30. }
  31. @layer components {
  32. /* 教材管理页面美化 */
  33. .textbook-page {
  34. @apply bg-slate-50 min-h-screen;
  35. }
  36. .textbook-header {
  37. @apply mb-6 p-6 bg-gradient-to-r from-blue-50 to-purple-50 rounded-xl border border-blue-100 shadow-sm;
  38. }
  39. .textbook-header h1 {
  40. @apply text-3xl font-bold text-blue-600 mb-2;
  41. }
  42. .textbook-header p {
  43. @apply text-sm text-slate-600;
  44. }
  45. /* 卡片美化 */
  46. .textbook-card {
  47. @apply bg-white rounded-xl shadow-lg border border-slate-200 p-6 transition-all duration-300 hover:shadow-xl;
  48. }
  49. .textbook-card-header {
  50. @apply mb-4 p-4 bg-slate-50 rounded-lg border border-slate-200;
  51. }
  52. .textbook-card-header h2 {
  53. @apply text-lg font-semibold text-slate-900;
  54. }
  55. .textbook-card-header p {
  56. @apply text-sm text-slate-600 mt-1;
  57. }
  58. /* 表格美化 */
  59. .textbook-table {
  60. @apply w-full border-collapse overflow-hidden rounded-lg shadow-sm border border-slate-200 bg-white;
  61. }
  62. .textbook-table thead th {
  63. @apply px-6 py-4 text-left text-xs font-semibold text-slate-600 uppercase tracking-wider bg-slate-50;
  64. }
  65. .textbook-table tbody tr {
  66. @apply transition-colors duration-200 hover:bg-slate-50;
  67. }
  68. .textbook-table tbody td {
  69. @apply px-6 py-4 text-sm text-slate-900 border-t border-slate-200;
  70. }
  71. /* 按钮美化 */
  72. .textbook-btn {
  73. @apply px-4 py-2 rounded-lg font-medium transition-all duration-200;
  74. }
  75. .textbook-btn-primary {
  76. @apply bg-blue-600 text-white hover:bg-blue-700 shadow-sm hover:shadow-md;
  77. }
  78. .textbook-btn-secondary {
  79. @apply bg-white text-slate-700 border border-slate-300 hover:bg-slate-50;
  80. }
  81. .textbook-btn-danger {
  82. @apply bg-red-600 text-white hover:bg-red-700 shadow-sm hover:shadow-md;
  83. }
  84. /* 表单美化 */
  85. .textbook-form-field {
  86. @apply mb-4;
  87. }
  88. .textbook-form-label {
  89. @apply block text-sm font-medium text-slate-700 mb-2;
  90. }
  91. .textbook-form-input {
  92. @apply w-full px-4 py-3 text-sm border border-slate-300 rounded-lg transition-all duration-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 focus:outline-none hover:border-slate-400;
  93. }
  94. /* 徽章美化 */
  95. .textbook-badge {
  96. @apply inline-flex items-center px-3 py-1 rounded-full text-xs font-medium;
  97. }
  98. .textbook-badge-primary {
  99. @apply bg-blue-100 text-blue-800;
  100. }
  101. .textbook-badge-success {
  102. @apply bg-green-100 text-green-800;
  103. }
  104. .textbook-badge-warning {
  105. @apply bg-yellow-100 text-yellow-800;
  106. }
  107. .textbook-badge-danger {
  108. @apply bg-red-100 text-red-800;
  109. }
  110. /* 状态指示器 */
  111. .textbook-status {
  112. @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
  113. }
  114. .textbook-status-active {
  115. @apply bg-green-100 text-green-800;
  116. }
  117. .textbook-status-inactive {
  118. @apply bg-red-100 text-red-800;
  119. }
  120. .textbook-status-pending {
  121. @apply bg-yellow-100 text-yellow-800;
  122. }
  123. /* Filament 登录页面定制 */
  124. .fi-logo {
  125. display: none !important;
  126. }
  127. .fi-logo::after {
  128. content: '数学知识图谱管理系统' !important;
  129. display: inline-block !important;
  130. font-size: 1.25rem !important;
  131. font-weight: 600 !important;
  132. color: #0ea5e9 !important;
  133. }
  134. /* 玻璃态面板 */
  135. .glass-panel {
  136. @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;
  137. }
  138. /* 卡片组件 */
  139. .metric-card {
  140. @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;
  141. }
  142. /* 渐变背景 */
  143. .gradient-bg {
  144. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  145. }
  146. .gradient-bg-light {
  147. background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  148. }
  149. /* 现代化按钮 */
  150. .btn-modern {
  151. @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;
  152. }
  153. .btn-modern-outline {
  154. @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;
  155. }
  156. /* 输入框样式 */
  157. .input-modern {
  158. @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;
  159. }
  160. /* 表格样式增强 */
  161. .table-modern {
  162. @apply w-full border-collapse overflow-hidden rounded-lg shadow-sm border border-slate-200 dark:border-slate-700;
  163. }
  164. .table-modern thead th {
  165. @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;
  166. }
  167. .table-modern tbody tr {
  168. @apply transition-colors duration-200 hover:bg-slate-50/70 dark:hover:bg-slate-800/50;
  169. }
  170. .table-modern tbody td {
  171. @apply px-6 py-4 text-sm text-slate-900 border-t border-slate-200 dark:border-slate-700 dark:text-slate-100;
  172. }
  173. /* 导航栏样式 */
  174. .navbar-modern {
  175. @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;
  176. }
  177. /* 侧边栏样式 */
  178. .sidebar-modern {
  179. @apply bg-white border-r border-slate-200 dark:bg-slate-900 dark:border-slate-700;
  180. }
  181. /* 页面标题 */
  182. .page-title {
  183. @apply text-3xl font-bold text-slate-900 mb-2 dark:text-white;
  184. }
  185. .page-subtitle {
  186. @apply text-sm text-slate-600 dark:text-slate-400;
  187. }
  188. /* 状态指示器 */
  189. .status-online {
  190. @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;
  191. }
  192. .status-offline {
  193. @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;
  194. }
  195. .status-pending {
  196. @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;
  197. }
  198. /* 加载动画 */
  199. .loading-spinner {
  200. @apply inline-block w-4 h-4 border-2 border-slate-300 border-t-primary-600 rounded-full animate-spin;
  201. }
  202. /* 动画效果 */
  203. .animate-fade-in {
  204. @apply animate-fadeIn;
  205. }
  206. .animate-slide-up {
  207. @apply animate-slideUp;
  208. }
  209. /* OCR记录详情页面特有样式 */
  210. .ocr-record-table {
  211. @apply table-zebra table-compact;
  212. }
  213. .ocr-record-table thead th {
  214. @apply bg-base-200 text-sm font-semibold text-base-content/80;
  215. }
  216. .ocr-record-table tbody tr {
  217. @apply hover:bg-base-100;
  218. }
  219. .ocr-record-table tbody td {
  220. @apply border-t border-base-300;
  221. vertical-align: middle;
  222. }
  223. /* 时间轴样式增强 */
  224. .timeline.timeline-vertical .timeline-middle .timeline-box {
  225. @apply border-2 shadow-lg transition-all duration-300 hover:scale-110;
  226. }
  227. .timeline.timeline-vertical .timeline-middle .timeline-box:hover {
  228. @apply transform hover:scale-125 hover:shadow-xl;
  229. }
  230. /* 状态徽章增强 */
  231. .status-badge {
  232. @apply inline-flex items-center gap-1 px-3 py-1 rounded-full text-xs font-medium transition-all duration-200;
  233. }
  234. .status-badge:hover {
  235. @apply transform hover:scale-105;
  236. }
  237. /* Filament 页面头部统一样式 */
  238. .fi-header {
  239. @apply mb-6 flex flex-wrap items-start justify-between gap-3 rounded-xl bg-white/90 px-5 py-4 shadow-sm ring-1 ring-slate-200/80 backdrop-blur-sm;
  240. }
  241. .fi-header-heading {
  242. @apply text-2xl font-bold text-slate-900 leading-tight;
  243. }
  244. .fi-header-subheading {
  245. @apply mt-1 text-sm text-slate-600;
  246. }
  247. /* Filament 内置面包屑全局样式 */
  248. .fi-breadcrumbs {
  249. @apply mb-4 flex items-center rounded-lg bg-base-100 px-4 py-2 shadow-sm ring-1 ring-base-200;
  250. }
  251. .fi-breadcrumbs-list {
  252. @apply breadcrumbs text-sm text-base-content/70;
  253. }
  254. .fi-breadcrumbs-item-label {
  255. @apply inline-flex items-center gap-1 text-base-content/70 transition-colors duration-150 hover:text-primary-600;
  256. }
  257. .fi-breadcrumbs-item .fi-breadcrumbs-item-separator {
  258. @apply text-base-300;
  259. }
  260. /* 当前节点加粗,禁用 hover 色 */
  261. .fi-breadcrumbs-item:last-child .fi-breadcrumbs-item-label {
  262. @apply font-semibold text-base-content cursor-default hover:text-base-content;
  263. }
  264. /* 头部栏里的面包屑去掉额外下边距 */
  265. .fi-header nav.fi-breadcrumbs {
  266. @apply mb-0;
  267. }
  268. /* 面包屑样式增强(全局) */
  269. nav[aria-label="Breadcrumb"],
  270. .breadcrumb-modern {
  271. @apply mb-4 flex items-center rounded-xl bg-white/80 px-4 py-2 shadow-sm ring-1 ring-slate-200/80 backdrop-blur-sm;
  272. }
  273. nav[aria-label="Breadcrumb"] ol,
  274. .breadcrumb-modern ol {
  275. @apply flex items-center gap-3 text-sm text-slate-600;
  276. }
  277. nav[aria-label="Breadcrumb"] a,
  278. .breadcrumb-modern a {
  279. @apply inline-flex items-center gap-1 text-slate-600 transition-colors duration-150 hover:text-primary-600;
  280. }
  281. nav[aria-label="Breadcrumb"] .crumb-current,
  282. .breadcrumb-modern .crumb-current {
  283. @apply inline-flex items-center gap-1 font-semibold text-slate-900;
  284. }
  285. nav[aria-label="Breadcrumb"] .crumb-divider,
  286. .breadcrumb-modern .crumb-divider {
  287. @apply h-4 w-px bg-slate-200;
  288. }
  289. /* 图片预览框架 */
  290. .mockup-window {
  291. @apply border border-slate-300 rounded-t-lg overflow-hidden;
  292. }
  293. .mockup-browser-toolbar {
  294. @apply bg-slate-200 px-2 py-1 flex items-center gap-1 border-b border-slate-300;
  295. }
  296. .mockup-browser-content {
  297. @apply bg-white;
  298. min-height: 200px;
  299. }
  300. .mockup-browser-dot {
  301. @apply w-2 h-2 rounded-full bg-slate-300;
  302. }
  303. /* OCR置信度指示器 */
  304. .confidence-indicator {
  305. @apply w-2 h-2 rounded-full;
  306. transition: all 0.3s ease;
  307. }
  308. .confidence-high {
  309. @apply bg-green-500;
  310. }
  311. .confidence-medium {
  312. @apply bg-yellow-500;
  313. }
  314. .confidence-low {
  315. @apply bg-red-500;
  316. }
  317. /* AI分析结果卡片 */
  318. .ai-result-card {
  319. @apply bg-gradient-to-br from-success/10 to-success/5 border border-success/20 rounded-lg p-4;
  320. }
  321. .ai-result-card.high-score {
  322. @apply from-success/10 to-success/5;
  323. }
  324. .ai-result-card.medium-score {
  325. @apply from-yellow/10 to-yellow/5;
  326. }
  327. .ai-result-card.low-score {
  328. @apply from-error/10 to-error/5;
  329. }
  330. /* 提交按钮区域 */
  331. .submit-analysis-section {
  332. @apply bg-gradient-to-r from-primary/5 to-primary/10 border border-primary/20 rounded-xl p-6 transition-all duration-300;
  333. }
  334. .submit-analysis-section:hover {
  335. @apply bg-primary/10 border-primary/30;
  336. }
  337. .submit-analysis-section.completed {
  338. @apply bg-gradient-to-r from-success/5 to-success/10 border border-success/20;
  339. }
  340. /* 响应式优化 */
  341. @media (max-width: 768px) {
  342. .stats-vertical,
  343. .stats-horizontal {
  344. @apply grid grid-cols-2;
  345. }
  346. .ocr-record-table {
  347. @apply text-xs;
  348. }
  349. .ocr-record-table th,
  350. .ocr-record-table td {
  351. @apply px-2 py-1;
  352. }
  353. /* 移动端隐藏部分列 */
  354. .mobile-hidden {
  355. @apply hidden;
  356. }
  357. }
  358. @media (max-width: 480px) {
  359. .stats-vertical,
  360. .stats-horizontal {
  361. @apply grid grid-cols-1;
  362. }
  363. .ocr-record-table {
  364. @apply text-xs;
  365. }
  366. .mobile-sm-only {
  367. @apply block;
  368. }
  369. .mobile-hidden {
  370. @apply hidden;
  371. }
  372. }
  373. /* 深色模式适配 */
  374. @media (prefers-color-scheme: dark) {
  375. .mockup-window {
  376. @apply border-slate-700;
  377. }
  378. .mockup-browser-toolbar {
  379. @apply bg-slate-800 border-slate-700;
  380. }
  381. .mockup-browser-content {
  382. @apply bg-slate-800;
  383. }
  384. .mockup-browser-dot {
  385. @apply bg-slate-600;
  386. }
  387. }
  388. /* 毛玻璃效果 */
  389. .frosted-glass {
  390. @apply bg-white/10 backdrop-blur-lg border border-white/20 shadow-xl;
  391. }
  392. .frosted-glass-dark {
  393. @apply bg-slate-900/10 backdrop-blur-lg border border-slate-700/20 shadow-xl;
  394. }
  395. /* 悬停效果 */
  396. .hover-lift {
  397. @apply transition-transform duration-300 hover:-translate-y-1 hover:shadow-lg;
  398. }
  399. /* 统计卡片特殊样式 */
  400. .stat-card {
  401. @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;
  402. }
  403. .stat-card::before {
  404. content: '';
  405. @apply absolute inset-0 bg-gradient-to-br from-primary-500/10 to-transparent opacity-0 transition-opacity duration-300;
  406. }
  407. .stat-card:hover::before {
  408. @apply opacity-100;
  409. }
  410. /* 徽章样式 */
  411. .badge-modern {
  412. @apply inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium transition-colors duration-200;
  413. }
  414. .badge-primary {
  415. @apply bg-primary-100 text-primary-800 dark:bg-primary-900/50 dark:text-primary-300;
  416. }
  417. .badge-secondary {
  418. @apply bg-secondary-100 text-secondary-800 dark:bg-secondary-900/50 dark:text-secondary-300;
  419. }
  420. .badge-success {
  421. @apply bg-green-100 text-green-800 dark:bg-green-900/50 dark:text-green-400;
  422. }
  423. .badge-warning {
  424. @apply bg-yellow-100 text-yellow-800 dark:bg-yellow-900/50 dark:text-yellow-400;
  425. }
  426. .badge-error {
  427. @apply bg-red-100 text-red-800 dark:bg-red-900/50 dark:text-red-400;
  428. }
  429. /* 分割线 */
  430. .divider-modern {
  431. @apply my-6 border-0 border-t border-slate-200 dark:border-slate-700;
  432. }
  433. /* =========================================
  434. 全局输入框美化 (Global Input Polish)
  435. ========================================= */
  436. /*
  437. 策略:
  438. 1. 对于登录页 (.fi-simple-layout),我们禁用 Filament 的 wrapper 样式,直接对 input 应用 DaisyUI 组件样式。
  439. 2. 对于后台管理页,我们保留 Filament 的 wrapper 结构(为了兼容前缀/后缀图标),但用 CSS 模拟 DaisyUI 的外观。
  440. */
  441. /* --- 登录页面 (Simple Layout) --- */
  442. /* 移除 Filament wrapper 的默认样式 */
  443. .fi-simple-layout .fi-input-wrp {
  444. @apply ring-0 shadow-none bg-transparent !important;
  445. }
  446. /* 直接对 input 应用 DaisyUI 样式 */
  447. .fi-simple-layout input:not([type='checkbox']):not([type='radio']),
  448. .fi-simple-layout select {
  449. @apply input input-bordered input-primary w-full bg-white text-gray-900 !important;
  450. height: 2.75rem !important;
  451. /* 修复高度 */
  452. }
  453. .fi-simple-layout input:focus,
  454. .fi-simple-layout select:focus {
  455. @apply outline-none border-primary-500 ring-2 ring-primary-500/20 !important;
  456. }
  457. /* 登录按钮美化 */
  458. .fi-simple-layout .fi-btn {
  459. @apply btn btn-primary w-full text-white font-bold shadow-lg hover:shadow-xl transition-all duration-300 !important;
  460. border: none !important;
  461. }
  462. /* 复选框美化 */
  463. .fi-simple-layout input[type='checkbox'] {
  464. @apply checkbox checkbox-primary rounded border-gray-300 !important;
  465. }
  466. /* 链接美化 */
  467. .fi-simple-layout a {
  468. @apply link link-primary hover:link-hover transition-colors !important;
  469. }
  470. /* --- 后台管理页面 (Admin Panel) --- */
  471. /* 模拟 DaisyUI input-bordered 的外观 */
  472. .fi-input-wrp,
  473. .fi-select-input {
  474. @apply bg-white border border-base-300 shadow-sm rounded-lg transition-all duration-200 !important;
  475. /* 覆盖 Filament 的默认 ring */
  476. box-shadow: none !important;
  477. ring: 0 !important;
  478. }
  479. /* 聚焦状态 */
  480. .fi-input-wrp:focus-within,
  481. .fi-select-input:focus-within {
  482. @apply border-primary-500 ring-2 ring-primary-500/20 !important;
  483. }
  484. /* 内部 input 保持透明 */
  485. .fi-input-wrp input,
  486. .fi-select-input select {
  487. @apply bg-transparent border-none shadow-none ring-0 focus:ring-0 !important;
  488. }
  489. /* 暗色模式适配 */
  490. :is(.dark) .fi-simple-layout input:not([type='checkbox']):not([type='radio']),
  491. :is(.dark) .fi-simple-layout select {
  492. @apply bg-base-200 text-base-content border-base-content/20 !important;
  493. }
  494. :is(.dark) .fi-input-wrp,
  495. :is(.dark) .fi-select-input {
  496. @apply bg-base-200 border-base-content/20 !important;
  497. }
  498. :is(.dark) .fi-simple-layout .fi-btn {
  499. @apply btn-primary text-white !important;
  500. }
  501. /* =========================================
  502. 教材管理表单美化 (Textbook Form Polish)
  503. ========================================= */
  504. /* 表单容器美化 */
  505. .fi-fo-component-ctn {
  506. @apply space-y-6 !important;
  507. }
  508. /* 表单字段组美化 */
  509. .fi-fo-field-wrp {
  510. @apply mb-5 !important;
  511. }
  512. /* 标签美化 */
  513. .fi-fo-field-wrp-label {
  514. @apply text-sm font-semibold text-slate-700 mb-2 flex items-center gap-2 !important;
  515. }
  516. .fi-fo-field-wrp-label sup {
  517. @apply text-red-500 font-bold !important;
  518. }
  519. /* 输入框容器 - 玻璃态效果 */
  520. .fi-input-wrp {
  521. @apply bg-white/90 backdrop-blur-sm border-2 border-slate-200 rounded-xl shadow-sm transition-all duration-300 overflow-hidden !important;
  522. }
  523. .fi-input-wrp:hover {
  524. @apply border-slate-300 shadow-md !important;
  525. }
  526. .fi-input-wrp:focus-within {
  527. @apply border-blue-500 shadow-lg shadow-blue-500/10 ring-4 ring-blue-500/10 !important;
  528. }
  529. /* 输入框本体 */
  530. .fi-input-wrp input,
  531. .fi-input-wrp textarea {
  532. @apply bg-transparent px-4 py-3 text-slate-800 placeholder-slate-400 text-base !important;
  533. }
  534. .fi-input-wrp input::placeholder,
  535. .fi-input-wrp textarea::placeholder {
  536. @apply text-slate-400 !important;
  537. }
  538. /* 选择框美化 */
  539. .fi-select-wrp {
  540. @apply bg-white/90 backdrop-blur-sm border-2 border-slate-200 rounded-xl shadow-sm transition-all duration-300 !important;
  541. }
  542. .fi-select-wrp:hover {
  543. @apply border-slate-300 shadow-md !important;
  544. }
  545. .fi-select-wrp:focus-within {
  546. @apply border-blue-500 shadow-lg shadow-blue-500/10 ring-4 ring-blue-500/10 !important;
  547. }
  548. /* 原生选择框 */
  549. .fi-select-input {
  550. @apply bg-white/90 backdrop-blur-sm border-2 border-slate-200 rounded-xl shadow-sm px-4 py-3 text-slate-800 transition-all duration-300 !important;
  551. }
  552. .fi-select-input:hover {
  553. @apply border-slate-300 shadow-md !important;
  554. }
  555. .fi-select-input:focus {
  556. @apply border-blue-500 shadow-lg shadow-blue-500/10 ring-4 ring-blue-500/10 outline-none !important;
  557. }
  558. /* 多选框美化 */
  559. .fi-checkbox-input {
  560. @apply w-5 h-5 rounded-lg border-2 border-slate-300 text-blue-600 transition-all duration-200 cursor-pointer !important;
  561. }
  562. .fi-checkbox-input:hover {
  563. @apply border-blue-400 !important;
  564. }
  565. .fi-checkbox-input:checked {
  566. @apply bg-blue-600 border-blue-600 !important;
  567. }
  568. .fi-checkbox-input:focus {
  569. @apply ring-4 ring-blue-500/20 !important;
  570. }
  571. /* Radio 美化 */
  572. .fi-radio-input {
  573. @apply w-5 h-5 border-2 border-slate-300 text-blue-600 transition-all duration-200 cursor-pointer !important;
  574. }
  575. .fi-radio-input:hover {
  576. @apply border-blue-400 !important;
  577. }
  578. .fi-radio-input:checked {
  579. @apply border-blue-600 !important;
  580. }
  581. .fi-radio-input:focus {
  582. @apply ring-4 ring-blue-500/20 !important;
  583. }
  584. /* Toggle 开关美化 */
  585. .fi-toggle-input {
  586. @apply w-11 h-6 bg-slate-200 rounded-full transition-all duration-300 cursor-pointer !important;
  587. }
  588. .fi-toggle-input:checked {
  589. @apply bg-blue-600 !important;
  590. }
  591. /* 文本域美化 */
  592. .fi-textarea-wrp {
  593. @apply bg-white/90 backdrop-blur-sm border-2 border-slate-200 rounded-xl shadow-sm transition-all duration-300 !important;
  594. }
  595. .fi-textarea-wrp:hover {
  596. @apply border-slate-300 shadow-md !important;
  597. }
  598. .fi-textarea-wrp:focus-within {
  599. @apply border-blue-500 shadow-lg shadow-blue-500/10 ring-4 ring-blue-500/10 !important;
  600. }
  601. .fi-textarea-wrp textarea {
  602. @apply bg-transparent px-4 py-3 text-slate-800 placeholder-slate-400 text-base min-h-[120px] !important;
  603. }
  604. /* 帮助文本美化 */
  605. .fi-fo-field-wrp-hint {
  606. @apply mt-2 text-xs text-slate-500 flex items-center gap-1 !important;
  607. }
  608. .fi-fo-field-wrp-hint::before {
  609. content: '💡';
  610. @apply text-sm;
  611. }
  612. /* 错误提示美化 */
  613. .fi-fo-field-wrp-error-message {
  614. @apply mt-2 text-sm text-red-600 flex items-center gap-1 bg-red-50 px-3 py-2 rounded-lg !important;
  615. }
  616. .fi-fo-field-wrp-error-message::before {
  617. content: '⚠️';
  618. }
  619. /* 表单区块美化 */
  620. .fi-fo-section {
  621. @apply bg-white/60 backdrop-blur-sm rounded-2xl border border-slate-200/50 p-6 mb-6 shadow-sm !important;
  622. }
  623. .fi-fo-section-header {
  624. @apply pb-4 mb-4 border-b border-slate-200 !important;
  625. }
  626. .fi-fo-section-header-heading {
  627. @apply text-lg font-bold text-slate-800 !important;
  628. }
  629. .fi-fo-section-header-description {
  630. @apply text-sm text-slate-500 mt-1 !important;
  631. }
  632. /* =========================================
  633. 表单按钮美化 (Enhanced Form Actions)
  634. ========================================= */
  635. /* 按钮容器 */
  636. .fi-ac {
  637. @apply flex items-center justify-between gap-4 pt-8 mt-8 border-t border-slate-200 bg-gradient-to-r from-slate-50 to-white px-6 py-6 rounded-xl shadow-sm !important;
  638. }
  639. /* 基础按钮样式重写 - 扩展到所有按钮 */
  640. .fi-btn,
  641. button[wire*="click"],
  642. button[type="submit"],
  643. button[type="button"],
  644. .fi-icon-btn,
  645. .fi-dropdown-list-item-button {
  646. @apply transition-all duration-300 !important;
  647. }
  648. /* ===== 主要按钮 (保存/提交) ===== */
  649. button.fi-btn[class*="bg-primary"],
  650. a.fi-btn[class*="bg-primary"],
  651. .fi-btn-fi-color-primary,
  652. button[type="submit"] {
  653. @apply bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 text-white font-semibold px-8 py-3 rounded-xl shadow-lg shadow-blue-500/30 transition-all duration-300 hover:shadow-xl hover:shadow-blue-500/40 hover:-translate-y-0.5 focus:ring-4 focus:ring-blue-500/20 active:translate-y-0 active:shadow-md border-0 relative overflow-hidden !important;
  654. }
  655. button.fi-btn[class*="bg-primary"]::before,
  656. a.fi-btn[class*="bg-primary"]::before,
  657. .fi-btn-fi-color-primary::before,
  658. button[type="submit"]::before {
  659. content: '';
  660. @apply absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 transition-transform duration-700;
  661. transform: translateX(-100%);
  662. }
  663. button.fi-btn[class*="bg-primary"]:hover::before,
  664. a.fi-btn[class*="bg-primary"]:hover::before,
  665. .fi-btn-fi-color-primary:hover::before,
  666. button[type="submit"]:hover::before {
  667. transform: translateX(100%);
  668. }
  669. button.fi-btn[class*="bg-primary"]:hover,
  670. a.fi-btn[class*="bg-primary"]:hover,
  671. .fi-btn-fi-color-primary:hover,
  672. button[type="submit"]:hover {
  673. @apply shadow-blue-500/40 !important;
  674. }
  675. /* ===== 次要按钮 (取消/返回) ===== */
  676. button.fi-btn[class*="bg-gray"],
  677. a.fi-btn[class*="bg-gray"],
  678. .fi-btn-fi-color-gray {
  679. @apply bg-white hover:bg-slate-50 text-slate-700 font-semibold px-8 py-3 rounded-xl border-2 border-slate-200 shadow-md hover:shadow-lg transition-all duration-300 hover:-translate-y-0.5 focus:ring-4 focus:ring-slate-300/50 active:translate-y-0 active:shadow-sm !important;
  680. }
  681. button.fi-btn[class*="bg-gray"]:hover,
  682. a.fi-btn[class*="bg-gray"]:hover,
  683. .fi-btn-fi-color-gray:hover {
  684. @apply border-slate-300 text-slate-900 !important;
  685. }
  686. /* ===== 成功按钮 (保存并创建另一个) ===== */
  687. button.fi-btn[class*="bg-success"],
  688. a.fi-btn[class*="bg-success"],
  689. .fi-btn-fi-color-success {
  690. @apply bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-700 hover:to-teal-700 text-white font-semibold px-8 py-3 rounded-xl shadow-lg shadow-emerald-500/30 transition-all duration-300 hover:shadow-xl hover:shadow-emerald-500/40 hover:-translate-y-0.5 focus:ring-4 focus:ring-emerald-500/20 active:translate-y-0 active:shadow-md border-0 relative overflow-hidden !important;
  691. }
  692. button.fi-btn[class*="bg-success"]::before,
  693. a.fi-btn[class*="bg-success"]::before,
  694. .fi-btn-fi-color-success::before {
  695. content: '';
  696. @apply absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 transition-transform duration-700;
  697. transform: translateX(-100%);
  698. }
  699. button.fi-btn[class*="bg-success"]:hover::before,
  700. a.fi-btn[class*="bg-success"]:hover::before,
  701. .fi-btn-fi-color-success:hover::before {
  702. transform: translateX(100%);
  703. }
  704. button.fi-btn[class*="bg-success"]:hover,
  705. a.fi-btn[class*="bg-success"]:hover,
  706. .fi-btn-fi-color-success:hover {
  707. @apply shadow-emerald-500/40 !important;
  708. }
  709. /* ===== 危险按钮 (删除) ===== */
  710. button.fi-btn[class*="bg-danger"],
  711. a.fi-btn[class*="bg-danger"],
  712. .fi-btn-fi-color-danger {
  713. @apply bg-gradient-to-r from-red-500 to-rose-500 hover:from-red-600 hover:to-rose-600 text-white font-semibold px-8 py-3 rounded-xl shadow-lg shadow-red-500/30 transition-all duration-300 hover:shadow-xl hover:shadow-red-500/40 hover:-translate-y-0.5 focus:ring-4 focus:ring-red-500/20 active:translate-y-0 active:shadow-md border-0 relative overflow-hidden !important;
  714. }
  715. button.fi-btn[class*="bg-danger"]::before,
  716. a.fi-btn[class*="bg-danger"]::before,
  717. .fi-btn-fi-color-danger::before {
  718. content: '';
  719. @apply absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 transition-transform duration-700;
  720. transform: translateX(-100%);
  721. }
  722. button.fi-btn[class*="bg-danger"]:hover::before,
  723. a.fi-btn[class*="bg-danger"]:hover::before,
  724. .fi-btn-fi-color-danger:hover::before {
  725. transform: translateX(100%);
  726. }
  727. button.fi-btn[class*="bg-danger"]:hover,
  728. a.fi-btn[class*="bg-danger"]:hover,
  729. .fi-btn-fi-color-danger:hover {
  730. @apply shadow-red-500/40 !important;
  731. }
  732. /* ===== 警告按钮 ===== */
  733. button.fi-btn[class*="bg-warning"],
  734. a.fi-btn[class*="bg-warning"],
  735. .fi-btn-fi-color-warning {
  736. @apply bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 text-white font-semibold px-8 py-3 rounded-xl shadow-lg shadow-amber-500/30 transition-all duration-300 hover:shadow-xl hover:shadow-amber-500/40 hover:-translate-y-0.5 focus:ring-4 focus:ring-amber-500/20 active:translate-y-0 active:shadow-md border-0 relative overflow-hidden !important;
  737. }
  738. button.fi-btn[class*="bg-warning"]::before,
  739. a.fi-btn[class*="bg-warning"]::before,
  740. .fi-btn-fi-color-warning::before {
  741. content: '';
  742. @apply absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 transition-transform duration-700;
  743. transform: translateX(-100%);
  744. }
  745. button.fi-btn[class*="bg-warning"]:hover::before,
  746. a.fi-btn[class*="bg-warning"]:hover::before,
  747. .fi-btn-fi-color-warning:hover::before {
  748. transform: translateX(100%);
  749. }
  750. button.fi-btn[class*="bg-warning"]:hover,
  751. a.fi-btn[class*="bg-warning"]:hover,
  752. .fi-btn-fi-color-warning:hover {
  753. @apply shadow-amber-500/40 !important;
  754. }
  755. /* ===== 操作按钮 (编辑/查看) ===== */
  756. .fi-btn-fi-color-secondary {
  757. @apply bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 text-white font-semibold px-6 py-2.5 rounded-lg shadow-md transition-all duration-300 hover:shadow-lg hover:-translate-y-0.5 !important;
  758. }
  759. /* ===== 通用轮廓按钮 ===== */
  760. .fi-outlined.fi-btn,
  761. button.fi-btn.outline,
  762. a.fi-btn.outline {
  763. @apply bg-white hover:bg-slate-50 text-slate-700 border-2 border-slate-200 shadow-sm hover:shadow-md transition-all duration-300 hover:-translate-y-0.5 !important;
  764. }
  765. .fi-outlined.fi-btn:hover,
  766. button.fi-btn.outline:hover,
  767. a.fi-btn.outline:hover {
  768. @apply border-slate-300 text-slate-900 !important;
  769. }
  770. /* ===== 表格操作按钮 ===== */
  771. .fi-table .fi-btn,
  772. [data-fi-table] button,
  773. .fi-bulk-action,
  774. .fi-dropdown-list-item-button {
  775. @apply transition-all duration-300 !important;
  776. }
  777. .fi-table .fi-btn:hover,
  778. [data-fi-table] button:hover,
  779. .fi-bulk-action:hover,
  780. .fi-dropdown-list-item-button:hover {
  781. @apply -translate-y-0.5 shadow-lg !important;
  782. }
  783. /* ===== 批量操作按钮 ===== */
  784. .fi-bulk-action-group .fi-btn {
  785. @apply mx-1 !important;
  786. }
  787. /* ===== 响应式按钮 ===== */
  788. @media (max-width: 640px) {
  789. .fi-ac {
  790. @apply flex-col !important;
  791. }
  792. .fi-ac .fi-btn {
  793. @apply w-full justify-center !important;
  794. }
  795. .fi-btn,
  796. button[type="submit"],
  797. button[type="button"],
  798. a.fi-btn {
  799. @apply px-6 py-3 text-sm !important;
  800. }
  801. .fi-table .fi-btn {
  802. @apply px-3 py-2 text-xs !important;
  803. }
  804. }
  805. /* KeyValue 组件美化 */
  806. .fi-fo-key-value {
  807. @apply bg-white/80 backdrop-blur-sm rounded-xl border-2 border-slate-200 overflow-hidden !important;
  808. }
  809. .fi-fo-key-value-header {
  810. @apply bg-slate-50 px-4 py-3 border-b border-slate-200 !important;
  811. }
  812. .fi-fo-key-value-row {
  813. @apply flex items-center border-b border-slate-100 last:border-b-0 !important;
  814. }
  815. .fi-fo-key-value-row input {
  816. @apply px-4 py-3 text-slate-800 !important;
  817. }
  818. /* TagsInput 美化 */
  819. .fi-fo-tags-input {
  820. @apply bg-white/90 backdrop-blur-sm border-2 border-slate-200 rounded-xl p-2 transition-all duration-300 !important;
  821. }
  822. .fi-fo-tags-input:focus-within {
  823. @apply border-blue-500 shadow-lg shadow-blue-500/10 ring-4 ring-blue-500/10 !important;
  824. }
  825. .fi-fo-tags-input-tag {
  826. @apply bg-blue-100 text-blue-800 px-3 py-1 rounded-lg text-sm font-medium !important;
  827. }
  828. /* Repeater 美化 */
  829. .fi-fo-repeater-item {
  830. @apply bg-white/80 backdrop-blur-sm rounded-xl border-2 border-slate-200 p-4 mb-4 transition-all duration-300 !important;
  831. }
  832. .fi-fo-repeater-item:hover {
  833. @apply border-slate-300 shadow-md !important;
  834. }
  835. /* 文件上传美化 */
  836. .fi-fo-file-upload {
  837. @apply bg-white/90 backdrop-blur-sm border-2 border-dashed border-slate-300 rounded-xl p-8 text-center transition-all duration-300 !important;
  838. }
  839. .fi-fo-file-upload:hover {
  840. @apply border-blue-400 bg-blue-50/50 !important;
  841. }
  842. .fi-fo-file-upload-icon {
  843. @apply text-slate-400 mb-3 !important;
  844. }
  845. /* 日期选择器美化 */
  846. .fi-fo-date-time-picker {
  847. @apply bg-white/90 backdrop-blur-sm border-2 border-slate-200 rounded-xl shadow-sm transition-all duration-300 !important;
  848. }
  849. .fi-fo-date-time-picker:focus-within {
  850. @apply border-blue-500 shadow-lg shadow-blue-500/10 ring-4 ring-blue-500/10 !important;
  851. }
  852. /* 富文本编辑器美化 */
  853. .fi-fo-rich-editor {
  854. @apply bg-white/90 backdrop-blur-sm border-2 border-slate-200 rounded-xl overflow-hidden transition-all duration-300 !important;
  855. }
  856. .fi-fo-rich-editor:focus-within {
  857. @apply border-blue-500 shadow-lg shadow-blue-500/10 !important;
  858. }
  859. .fi-fo-rich-editor-toolbar {
  860. @apply bg-slate-50 border-b border-slate-200 px-3 py-2 !important;
  861. }
  862. .fi-fo-rich-editor-content {
  863. @apply px-4 py-3 min-h-[200px] !important;
  864. }
  865. }
  866. @layer utilities {
  867. /* 文字渐变 */
  868. .text-gradient {
  869. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  870. -webkit-background-clip: text;
  871. -webkit-text-fill-color: transparent;
  872. background-clip: text;
  873. }
  874. /* 隐藏滚动条 */
  875. .no-scrollbar {
  876. -ms-overflow-style: none;
  877. scrollbar-width: none;
  878. }
  879. .no-scrollbar::-webkit-scrollbar {
  880. display: none;
  881. }
  882. /* 混合模式 */
  883. .mix-blend-multiply {
  884. mix-blend-mode: multiply;
  885. }
  886. .mix-blend-screen {
  887. mix-blend-mode: screen;
  888. }
  889. }