styles.css 18 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022
  1. :root {
  2. color-scheme: light dark;
  3. --bg-main: #f5f6f8;
  4. --bg-sidebar: #ffffff;
  5. --bg-panel: #ffffff;
  6. --border-color: #d8dce4;
  7. --primary: #1f77ff;
  8. --primary-text: #ffffff;
  9. --accent: #0d6efd;
  10. --text-color: #1a1a1a;
  11. --secondary-text: #6c757d;
  12. --user-message: #e9f2ff;
  13. --assistant-message: #f1f3f5;
  14. --shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
  15. .hidden {
  16. display: none !important;
  17. }
  18. .auth-view {
  19. position: fixed;
  20. inset: 0;
  21. background: linear-gradient(120deg, #4f46e5, #9333ea);
  22. display: flex;
  23. align-items: center;
  24. justify-content: center;
  25. padding: 20px;
  26. z-index: 20;
  27. }
  28. .auth-card {
  29. width: min(420px, 100%);
  30. background: #fff;
  31. border-radius: 16px;
  32. padding: 32px;
  33. box-shadow: var(--shadow);
  34. display: flex;
  35. flex-direction: column;
  36. gap: 16px;
  37. }
  38. .auth-card h1 {
  39. margin: 0;
  40. font-size: 24px;
  41. text-align: center;
  42. color: #111;
  43. }
  44. .auth-hint {
  45. margin: 0;
  46. font-size: 14px;
  47. color: var(--secondary-text);
  48. text-align: center;
  49. }
  50. .auth-form {
  51. display: flex;
  52. flex-direction: column;
  53. gap: 12px;
  54. }
  55. .auth-form label {
  56. font-size: 14px;
  57. color: var(--secondary-text);
  58. display: flex;
  59. flex-direction: column;
  60. gap: 4px;
  61. }
  62. .auth-form input {
  63. border-radius: 8px;
  64. border: 1px solid var(--border-color);
  65. padding: 10px;
  66. font-size: 14px;
  67. }
  68. .auth-switch {
  69. display: flex;
  70. justify-content: space-between;
  71. gap: 12px;
  72. }
  73. .header-actions {
  74. display: flex;
  75. align-items: center;
  76. gap: 8px;
  77. float: right;
  78. }
  79. .user-badge {
  80. font-size: 14px;
  81. color: var(--secondary-text);
  82. }
  83. .header-title {
  84. display: flex;
  85. flex-direction: column;
  86. gap: 2px;
  87. width:300px;
  88. float:left;
  89. }
  90. .session-indicator {
  91. font-size: 14px;
  92. color: var(--secondary-text);
  93. }
  94. .admin-role-indicator {
  95. width: 36px;
  96. height: 36px;
  97. border-radius: 50%;
  98. border: 1px solid var(--border-color);
  99. background: #fff;
  100. display: inline-flex;
  101. align-items: center;
  102. justify-content: center;
  103. color: var(--primary);
  104. box-shadow: var(--shadow);
  105. }
  106. .admin-role-indicator svg {
  107. width: 18px;
  108. height: 18px;
  109. }
  110. .user-menu {
  111. position: relative;
  112. }
  113. .avatar-button {
  114. display: flex;
  115. align-items: center;
  116. gap: 6px;
  117. border: 1px solid var(--border-color);
  118. border-radius: 999px;
  119. padding: 6px 10px;
  120. background: #fff;
  121. cursor: pointer;
  122. min-width: 0;
  123. }
  124. .avatar-initials {
  125. width: 28px;
  126. height: 28px;
  127. border-radius: 50%;
  128. background: var(--primary);
  129. color: var(--primary-text);
  130. display: inline-flex;
  131. align-items: center;
  132. justify-content: center;
  133. font-weight: 600;
  134. }
  135. .avatar-caret {
  136. width: 18px;
  137. height: 18px;
  138. color: var(--secondary-text);
  139. }
  140. .user-menu-dropdown {
  141. position: absolute;
  142. top: calc(100% + 8px);
  143. right: 0;
  144. min-width: 180px;
  145. border-radius: 12px;
  146. border: 1px solid var(--border-color);
  147. background: #fff;
  148. box-shadow: var(--shadow);
  149. padding: 8px;
  150. display: flex;
  151. flex-direction: column;
  152. gap: 4px;
  153. opacity: 0;
  154. transform: translateY(-6px);
  155. pointer-events: none;
  156. transition: opacity 0.2s ease, transform 0.2s ease;
  157. z-index: 5;
  158. }
  159. .user-menu.open .user-menu-dropdown {
  160. opacity: 1;
  161. transform: translateY(0);
  162. pointer-events: auto;
  163. }
  164. .menu-item {
  165. border: none;
  166. background: none;
  167. padding: 8px 10px;
  168. text-align: left;
  169. border-radius: 8px;
  170. font-size: 14px;
  171. color:black;
  172. cursor: pointer;
  173. }
  174. .menu-item:hover:not(:disabled) {
  175. background: #f1f3f5;
  176. }
  177. .menu-item:disabled {
  178. opacity: 0.5;
  179. cursor: not-allowed;
  180. }
  181. .overlay {
  182. position: fixed;
  183. inset: 0;
  184. background: rgba(15, 23, 42, 0.45);
  185. display: flex;
  186. align-items: center;
  187. justify-content: center;
  188. padding: 20px;
  189. z-index: 30;
  190. }
  191. .overlay-content {
  192. width: min(720px, 100%);
  193. max-height: 90vh;
  194. overflow-y: auto;
  195. background: #fff;
  196. border-radius: 16px;
  197. padding: 24px;
  198. box-shadow: var(--shadow);
  199. display: flex;
  200. flex-direction: column;
  201. gap: 16px;
  202. }
  203. .overlay-header {
  204. display: flex;
  205. align-items: center;
  206. justify-content: space-between;
  207. }
  208. .icon-button {
  209. border: none;
  210. background: transparent;
  211. font-size: 20px;
  212. cursor: pointer;
  213. padding: 4px 8px;
  214. }
  215. .overlay-close {
  216. border-radius: 50%;
  217. border: 1px solid var(--border-color);
  218. background: #f1f3f5;
  219. width: 32px;
  220. height: 32px;
  221. display: inline-flex;
  222. align-items: center;
  223. justify-content: center;
  224. font-size: 18px;
  225. }
  226. .overlay-close:hover {
  227. background: #e6e9ef;
  228. }
  229. .overlay-close .icon-close {
  230. width: 16px;
  231. height: 16px;
  232. }
  233. .admin-form {
  234. border: 1px solid var(--border-color);
  235. border-radius: 12px;
  236. padding: 16px;
  237. background: #f8fafc;
  238. }
  239. .admin-form h3 {
  240. margin: 0 0 12px;
  241. font-size: 16px;
  242. }
  243. .admin-form-grid {
  244. display: grid;
  245. grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  246. gap: 12px;
  247. }
  248. .admin-form input {
  249. width: 100%;
  250. border-radius: 8px;
  251. border: 1px solid var(--border-color);
  252. padding: 8px 10px;
  253. }
  254. .admin-section {
  255. border: 1px solid var(--border-color);
  256. border-radius: 12px;
  257. padding: 16px;
  258. background: #fff;
  259. display: flex;
  260. flex-direction: column;
  261. gap: 12px;
  262. }
  263. .admin-section-header {
  264. display: flex;
  265. align-items: center;
  266. justify-content: space-between;
  267. gap: 12px;
  268. }
  269. .admin-search {
  270. display: flex;
  271. gap: 8px;
  272. }
  273. .admin-search input {
  274. border: 1px solid var(--border-color);
  275. border-radius: 8px;
  276. padding: 8px 10px;
  277. }
  278. .admin-list {
  279. display: flex;
  280. flex-direction: column;
  281. gap: 8px;
  282. }
  283. .admin-row {
  284. border: 1px solid var(--border-color);
  285. border-radius: 10px;
  286. padding: 12px;
  287. display: flex;
  288. justify-content: space-between;
  289. gap: 12px;
  290. background: #fdfdfd;
  291. }
  292. .admin-row-info {
  293. display: flex;
  294. flex-direction: column;
  295. gap: 4px;
  296. }
  297. .admin-row-info strong {
  298. font-size: 15px;
  299. color: #111;
  300. }
  301. .admin-row-meta {
  302. font-size: 13px;
  303. color: var(--secondary-text);
  304. }
  305. .admin-row-preview {
  306. font-size: 13px;
  307. color: var(--secondary-text);
  308. max-height: 60px;
  309. overflow: hidden;
  310. }
  311. .admin-row-actions {
  312. display: flex;
  313. flex-direction: column;
  314. gap: 6px;
  315. align-items: flex-end;
  316. }
  317. .empty-note {
  318. margin: 0;
  319. font-size: 14px;
  320. color: var(--secondary-text);
  321. text-align: center;
  322. }
  323. * {
  324. box-sizing: border-box;
  325. }
  326. body {
  327. margin: 0;
  328. font-family: "PingFang SC", "Microsoft YaHei", "Helvetica", "Arial", sans-serif;
  329. background: var(--bg-main);
  330. color: var(--text-color);
  331. height: 100vh;
  332. display: flex;
  333. }
  334. .app-shell {
  335. display: flex;
  336. flex: 1;
  337. max-height: 100vh;
  338. width: 100%;
  339. }
  340. .sidebar {
  341. width: 320px;
  342. background: var(--bg-sidebar);
  343. border-right: 1px solid var(--border-color);
  344. display: flex;
  345. flex-direction: column;
  346. overflow: hidden;
  347. }
  348. .sidebar-scroll {
  349. flex: 1;
  350. padding: 10px 16px 2px;
  351. overflow-y: auto;
  352. display: flex;
  353. flex-direction: column;
  354. gap: 18px;
  355. }
  356. .sidebar-history {
  357. border-top: 1px solid var(--border-color);
  358. padding: 3px ;
  359. background: #fff;
  360. display: flex;
  361. flex-direction: column;
  362. gap: 10px;
  363. overflow: auto; /* 允许滚动 */
  364. scrollbar-width: none; /* Firefox */
  365. }
  366. .sidebar-history::-webkit-scrollbar {
  367. display: none; /* Chrome 和 Safari */
  368. }
  369. .sidebar-history-header {
  370. display: flex;
  371. align-items: center;
  372. justify-content: space-between;
  373. gap: 8px;
  374. }
  375. .history-count {
  376. font-size: 12px;
  377. color: var(--secondary-text);
  378. }
  379. .sidebar-section {
  380. margin: 0;
  381. display: flex;
  382. flex-direction: column;
  383. gap: 6px;
  384. }
  385. .sidebar-actions {
  386. flex-direction: row;
  387. align-items: center;
  388. }
  389. .sidebar-actions .primary-button,
  390. .sidebar-actions .secondary-button {
  391. flex: 1;
  392. }
  393. .sidebar-label {
  394. font-size: 14px;
  395. font-weight: 600;
  396. color: var(--secondary-text);
  397. }
  398. .sidebar-input,
  399. .sidebar-range {
  400. width: 100%;
  401. padding: 8px 10px;
  402. border: 1px solid var(--border-color);
  403. border-radius: 8px;
  404. font-size: 14px;
  405. background: #fff;
  406. color: inherit;
  407. }
  408. .sidebar-range {
  409. height: 4px;
  410. padding: 0;
  411. }
  412. .sidebar-help {
  413. font-size: 13px;
  414. color: var(--secondary-text);
  415. }
  416. .sidebar-heading {
  417. margin: 0;
  418. font-size: 16px;
  419. font-weight: 600;
  420. }
  421. .primary-button,
  422. .secondary-button {
  423. border: none;
  424. border-radius: 8px;
  425. padding: 10px 14px;
  426. font-size: 14px;
  427. cursor: pointer;
  428. transition: all 0.2s ease;
  429. }
  430. .primary-button {
  431. background: var(--primary);
  432. color: var(--primary-text);
  433. }
  434. .primary-button:disabled {
  435. opacity: 0.6;
  436. cursor: not-allowed;
  437. }
  438. .primary-button:hover:not(:disabled) {
  439. background: var(--accent);
  440. }
  441. .secondary-button {
  442. background: #f1f3f5;
  443. color: var(--text-color);
  444. border: 1px solid var(--border-color);
  445. }
  446. .secondary-button:hover:not(:disabled) {
  447. background: #e6e9ef;
  448. }
  449. .secondary-button.small {
  450. font-size: 13px;
  451. padding: 6px 10px;
  452. }
  453. .secondary-button.danger {
  454. background: #dc3545;
  455. border-color: #dc3545;
  456. color: #fff;
  457. }
  458. .secondary-button.danger:hover:not(:disabled) {
  459. background: #c82333;
  460. }
  461. .history-list {
  462. display: flex;
  463. flex-direction: column;
  464. gap: 6px;
  465. max-height: 240px;
  466. overflow-y: auto;
  467. }
  468. .history-row {
  469. display: grid;
  470. grid-template-columns: 1fr auto auto;
  471. gap: 4px;
  472. align-items: center;
  473. padding: 4px 10px;
  474. border: 1px solid var(--border-color);
  475. border-radius: 8px;
  476. background: #fff;
  477. }
  478. .history-row.active {
  479. border-color: var(--accent);
  480. box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.12);
  481. }
  482. .history-title-link {
  483. border: none;
  484. background: none;
  485. padding: 0;
  486. margin: 0;
  487. font-size: 14px;
  488. font-weight: 500;
  489. text-align: left;
  490. color: var(--accent);
  491. cursor: pointer;
  492. display: flex;
  493. flex-direction: column;
  494. align-items: flex-start;
  495. gap: 2px;
  496. width: 100%;
  497. text-decoration: none;
  498. }
  499. .history-title-link:hover,
  500. .history-title-link:focus-visible {
  501. text-decoration: underline;
  502. }
  503. .history-row.active .history-title-link {
  504. color: var(--text-color);
  505. font-weight: 600;
  506. }
  507. .history-title-text,
  508. .history-subtitle {
  509. white-space: nowrap;
  510. overflow: hidden;
  511. text-overflow: ellipsis;
  512. max-width: 100%;
  513. }
  514. .history-subtitle {
  515. font-size: 11px;
  516. color: var(--secondary-text);
  517. }
  518. .history-icon-button {
  519. border: none;
  520. background: #f8f9fb;
  521. border-radius: 6px;
  522. padding: 6px 8px;
  523. cursor: pointer;
  524. font-size: 16px;
  525. line-height: 1;
  526. }
  527. .history-icon-button:hover {
  528. background: #e6e9ef;
  529. }
  530. .history-pagination {
  531. display: flex;
  532. justify-content: space-between;
  533. gap: 2px;
  534. margin-bottom: 5px;
  535. margin-left: 10px;
  536. margin-right: 10px;
  537. }
  538. .history-pagination .secondary-button {
  539. padding: 3px 3px;
  540. font-size: 11px;
  541. border-radius: 6px;
  542. }
  543. .main-panel {
  544. flex: 1;
  545. display: flex;
  546. flex-direction: column;
  547. background: var(--bg-panel);
  548. box-shadow: var(--shadow);
  549. }
  550. .app-header {
  551. padding: 20px 24px;
  552. border-bottom: 1px solid var(--border-color);
  553. }
  554. .app-header h1 {
  555. margin: 0;
  556. font-size: 22px;
  557. font-weight: 600;
  558. }
  559. .chat-messages {
  560. flex: 1;
  561. padding: 24px;
  562. overflow-y: auto;
  563. display: flex;
  564. flex-direction: column;
  565. gap: 16px;
  566. background: linear-gradient(180deg, rgba(243, 247, 255, 0.8), rgba(255, 255, 255, 0.9));
  567. }
  568. .message {
  569. padding: 16px;
  570. border-radius: 12px;
  571. border: 1px solid var(--border-color);
  572. max-width: 860px;
  573. display: flex;
  574. flex-direction: column;
  575. gap: 10px;
  576. }
  577. .message.notice {
  578. background: #fff8e1;
  579. border-style: dashed;
  580. color: #8c6b00;
  581. align-self: center;
  582. }
  583. .message.user {
  584. background: var(--user-message);
  585. align-self: flex-end;
  586. }
  587. .message.assistant {
  588. background: var(--assistant-message);
  589. align-self: flex-start;
  590. }
  591. .message-header {
  592. font-size: 13px;
  593. font-weight: 600;
  594. color: var(--secondary-text);
  595. }
  596. .message-content {
  597. font-size: 14px;
  598. line-height: 1.6;
  599. color: var(--text-color);
  600. white-space: normal;
  601. word-break: break-word;
  602. }
  603. .message-content ul {
  604. margin: 8px 0 8px 18px;
  605. padding-left: 16px;
  606. }
  607. .message-content li {
  608. margin-bottom: 4px;
  609. }
  610. .message-content blockquote {
  611. margin: 10px 0;
  612. padding-left: 14px;
  613. border-left: 3px solid var(--border-color);
  614. color: var(--secondary-text);
  615. }
  616. .message-content table.md-table {
  617. width: 100%;
  618. border-collapse: collapse;
  619. margin: 12px 0;
  620. font-size: 14px;
  621. background: #fff;
  622. }
  623. .message-content table.md-table th,
  624. .message-content table.md-table td {
  625. border: 1px solid var(--border-color);
  626. padding: 8px 10px;
  627. text-align: left;
  628. vertical-align: top;
  629. }
  630. .message-content table.md-table thead {
  631. background: #f5f6f8;
  632. font-weight: 600;
  633. }
  634. .message-content h1,
  635. .message-content h2,
  636. .message-content h3,
  637. .message-content h4,
  638. .message-content h5,
  639. .message-content h6 {
  640. margin: 12px 0 6px;
  641. font-weight: 600;
  642. }
  643. .message-content h1 { font-size: 20px; }
  644. .message-content h2 { font-size: 18px; }
  645. .message-content h3 { font-size: 16px; }
  646. .message-content h4 { font-size: 15px; }
  647. .message-content h5,
  648. .message-content h6 { font-size: 14px; }
  649. .message-content pre {
  650. background: #0d1117;
  651. color: #e6edf3;
  652. padding: 12px;
  653. border-radius: 10px;
  654. overflow-x: auto;
  655. font-family: "JetBrains Mono", "Fira Code", "Menlo", "Consolas", monospace;
  656. font-size: 13px;
  657. line-height: 1.5;
  658. margin: 10px 0;
  659. }
  660. .code-block {
  661. position: relative;
  662. margin: 10px 0;
  663. }
  664. .code-block pre {
  665. margin: 0;
  666. padding-right: 48px;
  667. }
  668. .code-copy-btn {
  669. position: absolute;
  670. top: 10px;
  671. right: 12px;
  672. border: 1px solid rgba(255, 255, 255, 0.25);
  673. background: rgba(255, 255, 255, 0.12);
  674. color: #fff;
  675. border-radius: 6px;
  676. padding: 2px 10px;
  677. font-size: 12px;
  678. cursor: pointer;
  679. transition: background 0.2s ease, color 0.2s ease;
  680. }
  681. .code-copy-btn:disabled {
  682. opacity: 0.6;
  683. cursor: not-allowed;
  684. }
  685. .code-copy-btn:not(:disabled):hover {
  686. background: rgba(255, 255, 255, 0.2);
  687. }
  688. .message-content code {
  689. font-family: "JetBrains Mono", "Fira Code", "Menlo", "Consolas", monospace;
  690. background: rgba(13, 110, 253, 0.12);
  691. color: #0d47a1;
  692. padding: 2px 6px;
  693. border-radius: 6px;
  694. font-size: 13px;
  695. }
  696. .message-content pre code {
  697. display: block;
  698. background: transparent;
  699. color: inherit;
  700. padding: 0;
  701. }
  702. .message-content img {
  703. max-width: 100%;
  704. border-radius: 8px;
  705. margin: 6px 0;
  706. }
  707. .message-actions {
  708. display: flex;
  709. justify-content: flex-end;
  710. gap: 6px;
  711. }
  712. .message-button {
  713. border: none;
  714. background: var(--primary);
  715. color: var(--primary-text);
  716. border-radius: 6px;
  717. padding: 3px 8px;
  718. font-size: 11px;
  719. font-weight: 500;
  720. cursor: pointer;
  721. white-space: nowrap;
  722. transition: background 0.2s ease;
  723. }
  724. .message-button:hover {
  725. background: var(--accent);
  726. }
  727. .chat-form {
  728. padding: 16px 20px;
  729. border-top: 1px solid var(--border-color);
  730. display: flex;
  731. flex-direction: column;
  732. gap: 10px;
  733. background: #fff;
  734. }
  735. .chat-textarea {
  736. width: 100%;
  737. border-radius: 12px;
  738. border: 1px solid var(--border-color);
  739. padding: 10px;
  740. font-size: 14px;
  741. resize: vertical;
  742. min-height: 70px;
  743. }
  744. .chat-form-footer {
  745. display: flex;
  746. align-items: center;
  747. gap: 10px;
  748. }
  749. #send-btn {
  750. margin-left: auto;
  751. }
  752. #end-chat-btn {
  753. min-width: 110px;
  754. }
  755. .file-input-label {
  756. display: inline-flex;
  757. align-items: center;
  758. padding: 6px 12px;
  759. border-radius: 8px;
  760. border: 1px dashed var(--border-color);
  761. color: var(--secondary-text);
  762. cursor: pointer;
  763. background: #fafbfc;
  764. }
  765. .file-input {
  766. display: none;
  767. }
  768. .chat-status {
  769. min-height: 20px;
  770. font-size: 13px;
  771. color: var(--secondary-text);
  772. display: flex;
  773. align-items: center;
  774. gap: 8px;
  775. }
  776. .chat-status.running {
  777. color: var(--accent);
  778. }
  779. .chat-status-spinner {
  780. width: 14px;
  781. height: 14px;
  782. border-radius: 50%;
  783. border: 2px solid currentColor;
  784. border-top-color: transparent;
  785. animation: chat-spin 0.8s linear infinite;
  786. }
  787. .chat-status-text {
  788. display: inline-flex;
  789. align-items: center;
  790. }
  791. .chat-status.error {
  792. color: #dc3545;
  793. }
  794. .toast {
  795. position: fixed;
  796. bottom: 24px;
  797. left: 50%;
  798. transform: translateX(-50%);
  799. background: rgba(33, 37, 41, 0.9);
  800. color: #fff;
  801. padding: 12px 18px;
  802. border-radius: 12px;
  803. font-size: 14px;
  804. box-shadow: var(--shadow);
  805. opacity: 0;
  806. transition: opacity 0.3s ease, transform 0.3s ease;
  807. pointer-events: none;
  808. z-index: 999;
  809. }
  810. .toast.show {
  811. opacity: 1;
  812. transform: translate(-50%, 0);
  813. }
  814. .toast.success {
  815. background: #28a745;
  816. }
  817. .toast.error {
  818. background: #dc3545;
  819. }
  820. .hidden {
  821. display: none;
  822. }
  823. .clamped {
  824. display: -webkit-box;
  825. -webkit-line-clamp: 3;
  826. -webkit-box-orient: vertical;
  827. overflow: hidden;
  828. }
  829. mark.hl {
  830. background: #fff3a3;
  831. color: inherit;
  832. padding: 0 2px;
  833. border-radius: 3px;
  834. }
  835. @keyframes chat-spin {
  836. from {
  837. transform: rotate(0deg);
  838. }
  839. to {
  840. transform: rotate(360deg);
  841. }
  842. }
  843. @media (max-width: 960px) {
  844. .app-shell {
  845. flex-direction: column;
  846. }
  847. .sidebar {
  848. width: 100%;
  849. border-right: none;
  850. border-bottom: 1px solid var(--border-color);
  851. }
  852. .sidebar-scroll {
  853. display: grid;
  854. grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  855. gap: 16px;
  856. }
  857. .main-panel {
  858. box-shadow: none;
  859. }
  860. .history-list {
  861. max-height: 180px;
  862. }
  863. .sidebar-actions {
  864. flex-direction: column;
  865. }
  866. }
  867. @media (max-width: 600px) {
  868. .chat-form-footer {
  869. flex-direction: column;
  870. align-items: stretch;
  871. }
  872. .chat-form-footer .primary-button {
  873. width: 100%;
  874. }
  875. .file-input-label {
  876. width: 100%;
  877. justify-content: center;
  878. }
  879. }
  880. :root {