styles.css 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068
  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. .attachment-preview {
  769. display: flex;
  770. flex-wrap: wrap;
  771. gap: 8px;
  772. padding-top: 4px;
  773. }
  774. .attachment-preview-item {
  775. display: inline-flex;
  776. align-items: center;
  777. gap: 8px;
  778. padding: 6px 10px;
  779. border: 1px solid var(--border-color);
  780. border-radius: 10px;
  781. background: #f8fafc;
  782. }
  783. .attachment-thumb {
  784. width: 48px;
  785. height: 48px;
  786. object-fit: cover;
  787. border-radius: 8px;
  788. border: 1px solid var(--border-color);
  789. background: #fff;
  790. }
  791. .attachment-file-icon {
  792. width: 48px;
  793. height: 48px;
  794. border-radius: 8px;
  795. background: #e9ecf2;
  796. display: inline-flex;
  797. align-items: center;
  798. justify-content: center;
  799. font-size: 22px;
  800. }
  801. .attachment-filename {
  802. font-size: 13px;
  803. color: var(--secondary-text);
  804. max-width: 260px;
  805. white-space: nowrap;
  806. overflow: hidden;
  807. text-overflow: ellipsis;
  808. }
  809. .chat-status {
  810. min-height: 20px;
  811. font-size: 13px;
  812. color: var(--secondary-text);
  813. display: flex;
  814. align-items: center;
  815. gap: 8px;
  816. }
  817. .chat-status.running {
  818. color: var(--accent);
  819. }
  820. .chat-status-spinner {
  821. width: 14px;
  822. height: 14px;
  823. border-radius: 50%;
  824. border: 2px solid currentColor;
  825. border-top-color: transparent;
  826. animation: chat-spin 0.8s linear infinite;
  827. }
  828. .chat-status-text {
  829. display: inline-flex;
  830. align-items: center;
  831. }
  832. .chat-status.error {
  833. color: #dc3545;
  834. }
  835. .toast {
  836. position: fixed;
  837. bottom: 24px;
  838. left: 50%;
  839. transform: translateX(-50%);
  840. background: rgba(33, 37, 41, 0.9);
  841. color: #fff;
  842. padding: 12px 18px;
  843. border-radius: 12px;
  844. font-size: 14px;
  845. box-shadow: var(--shadow);
  846. opacity: 0;
  847. transition: opacity 0.3s ease, transform 0.3s ease;
  848. pointer-events: none;
  849. z-index: 999;
  850. }
  851. .toast.show {
  852. opacity: 1;
  853. transform: translate(-50%, 0);
  854. }
  855. .toast.success {
  856. background: #28a745;
  857. }
  858. .toast.error {
  859. background: #dc3545;
  860. }
  861. .hidden {
  862. display: none;
  863. }
  864. .clamped {
  865. display: -webkit-box;
  866. -webkit-line-clamp: 3;
  867. -webkit-box-orient: vertical;
  868. overflow: hidden;
  869. }
  870. mark.hl {
  871. background: #fff3a3;
  872. color: inherit;
  873. padding: 0 2px;
  874. border-radius: 3px;
  875. }
  876. @keyframes chat-spin {
  877. from {
  878. transform: rotate(0deg);
  879. }
  880. to {
  881. transform: rotate(360deg);
  882. }
  883. }
  884. @media (max-width: 960px) {
  885. .app-shell {
  886. flex-direction: column;
  887. }
  888. .sidebar {
  889. width: 100%;
  890. border-right: none;
  891. border-bottom: 1px solid var(--border-color);
  892. }
  893. .sidebar-scroll {
  894. display: grid;
  895. grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  896. gap: 16px;
  897. }
  898. .main-panel {
  899. box-shadow: none;
  900. }
  901. .history-list {
  902. max-height: 180px;
  903. }
  904. .sidebar-actions {
  905. flex-direction: column;
  906. }
  907. }
  908. @media (max-width: 600px) {
  909. .chat-form-footer {
  910. flex-direction: column;
  911. align-items: stretch;
  912. }
  913. .chat-form-footer .primary-button {
  914. width: 100%;
  915. }
  916. .file-input-label {
  917. width: 100%;
  918. justify-content: center;
  919. }
  920. }
  921. :root {