m.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. /* ============================================================
  2. m.css — 手机版(AI 设计 / 订单 / 物流)
  3. ============================================================ */
  4. .m-body {
  5. margin: 0; background: #f4f1ea; color: #17140f;
  6. font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
  7. min-height: 100vh; min-height: 100dvh;
  8. padding-bottom: 62px; /* tabbar */
  9. }
  10. .m-body button { font-family: inherit; }
  11. /* 头部 */
  12. .m-head {
  13. position: sticky; top: 0; z-index: 30;
  14. display: flex; align-items: center; gap: 10px;
  15. background: #17140f; color: #fffdf8;
  16. padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  17. }
  18. .m-logo { display: flex; align-items: center; gap: 7px; text-decoration: none; color: inherit; }
  19. .m-logo svg { width: 22px; height: 22px; }
  20. .m-logo b { font-size: 15px; }
  21. .m-quota { margin-left: auto; font-size: 10.5px; color: rgba(255,253,248,.72); }
  22. .m-login {
  23. border: 1px solid rgba(255,253,248,.4); background: none; color: #fffdf8;
  24. border-radius: 999px; padding: 5px 13px; font-size: 12.5px; cursor: pointer;
  25. }
  26. /* 视图 */
  27. .m-view {
  28. display: flex; flex-direction: column;
  29. min-height: calc(100dvh - 62px - 54px);
  30. }
  31. .m-view[hidden] { display: none; }
  32. /* ---------------- AI 聊天 ---------------- */
  33. .m-chat {
  34. flex: 1; overflow-y: auto; padding: 14px 12px 6px;
  35. display: flex; flex-direction: column; gap: 10px;
  36. }
  37. .m-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.65; white-space: normal; }
  38. .m-msg.ai { background: #fff; border: 1px solid #e8e2d5; border-top-left-radius: 4px; align-self: flex-start; }
  39. .m-msg.user { background: #ff5c2b; color: #fff; border-top-right-radius: 4px; align-self: flex-end; }
  40. .m-msg.step { background: none; border: none; color: #6b665e; font-size: 12px; padding: 2px 6px; }
  41. .m-msg.step.pending { opacity: .65; }
  42. .m-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff5c2b; margin-right: 5px; animation: mblink 1.1s infinite; }
  43. @keyframes mblink { 50% { opacity: .25; } }
  44. /* 方案状态卡 */
  45. .m-agentcard { margin: 4px 12px 0; background: #fff; border: 1px solid #e8e2d5; border-radius: 13px; padding: 11px 12px; }
  46. .m-agentcard[hidden] { display: none; }
  47. .m-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  48. .m-chips span { background: #f4f1e9; border-radius: 6px; padding: 3px 8px; font-size: 11px; color: #4c473f; }
  49. .m-agentcard .m-actions { display: flex; gap: 8px; margin-top: 10px; }
  50. .m-actions button {
  51. flex: 1; border-radius: 9px; padding: 9px 0; font-size: 13px; font-weight: 700; cursor: pointer;
  52. }
  53. .m-btn-ghost { border: 1px solid #ddd5c6; background: #fff; color: #4c473f; }
  54. .m-btn-primary { border: 0; background: #ff5c2b; color: #fff; }
  55. .m-btn-primary:active { background: #e64d1f; }
  56. /* 预览图 */
  57. .m-agentpreview { margin: 10px 12px 0; }
  58. .m-agentpreview[hidden] { display: none; }
  59. .m-faces { display: flex; gap: 8px; }
  60. .m-face { flex: 1; background: #fff; border: 1px solid #e8e2d5; border-radius: 12px; padding: 8px; position: relative; }
  61. .m-face svg { width: 100%; height: auto; display: block; }
  62. .m-face i { position: absolute; right: 8px; top: 8px; font-style: normal; font-size: 9px; color: #a79d8d; }
  63. /* 快捷提问 */
  64. .m-quick { display: flex; gap: 7px; padding: 10px 12px 4px; overflow-x: auto; }
  65. .m-quick button {
  66. flex: none; border: 1px solid #ddd5c6; background: #fff; color: #4c473f;
  67. border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
  68. }
  69. .m-quick button:active { border-color: #ff5c2b; color: #ff5c2b; }
  70. /* 输入栏 */
  71. .m-inputbar {
  72. position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px;
  73. padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  74. background: linear-gradient(180deg, rgba(244,241,234,0), #f4f1ea 28%);
  75. }
  76. .m-inputbar textarea {
  77. flex: 1; resize: none; border: 1px solid #ddd5c6; border-radius: 12px;
  78. background: #fff; padding: 10px 12px; font-size: 14px; line-height: 1.4;
  79. max-height: 96px; outline: none; font-family: inherit;
  80. }
  81. .m-inputbar textarea:focus { border-color: #ff5c2b; }
  82. .m-inputbar button {
  83. width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%;
  84. background: #ff5c2b; color: #fff; cursor: pointer; display: grid; place-items: center;
  85. }
  86. .m-inputbar button svg { width: 20px; height: 20px; }
  87. .m-inputbar button:disabled { opacity: .5; }
  88. /* ---------------- 订单列表 ---------------- */
  89. .m-orders { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
  90. .m-order-card { background: #fff; border: 1px solid #e8e2d5; border-radius: 13px; padding: 13px 14px; cursor: pointer; }
  91. .m-order-top { display: flex; align-items: center; gap: 8px; }
  92. .m-order-top b { font-size: 13.5px; }
  93. .m-order-top .st { margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
  94. .st.producing { background: #fff4ec; color: #ff5c2b; }
  95. .st.pending_payment { background: #fdf6ea; color: #d98a1f; }
  96. .st.shipped { background: #eef6f0; color: #3a8a5c; }
  97. .st.done, .st.completed { background: #f1f0ec; color: #6b665e; }
  98. .st.cancelled { background: #f7f0ef; color: #a05a52; }
  99. .m-order-sum { font-size: 12px; color: #6b665e; margin-top: 6px; }
  100. .m-order-foot { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
  101. .m-order-foot .price { margin-left: auto; color: #ff5c2b; font-weight: 800; font-size: 15px; }
  102. .m-order-foot small { color: #a79d8d; font-size: 10.5px; }
  103. .m-orders-empty { text-align: center; padding: 60px 20px; color: #a79d8d; font-size: 13px; }
  104. .m-orders-empty b { display: block; color: #17140f; margin-bottom: 6px; }
  105. /* ---------------- 订单详情 ---------------- */
  106. .m-order-detail { flex: 1; padding: 12px; }
  107. .m-detail-card { background: #fff; border: 1px solid #e8e2d5; border-radius: 13px; padding: 14px; margin-bottom: 10px; }
  108. .m-detail-card h4 { margin: 0 0 10px; font-size: 13px; }
  109. .m-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 4px 0; }
  110. .m-kv span { color: #8a8478; flex: none; }
  111. .m-kv b { font-weight: 600; text-align: right; word-break: break-all; }
  112. .m-track { border-left: 2px solid #eee7da; margin: 4px 0 0 6px; padding-left: 14px; }
  113. .m-track-item { position: relative; padding: 7px 0; font-size: 12.5px; }
  114. .m-track-item::before {
  115. content: ''; position: absolute; left: -19.5px; top: 13px;
  116. width: 7px; height: 7px; border-radius: 50%; background: #ff5c2b;
  117. }
  118. .m-track-item small { display: block; color: #a79d8d; font-size: 10.5px; margin-top: 2px; }
  119. .m-paybar { position: sticky; bottom: 62px; padding: 10px 12px; background: #f4f1ea; }
  120. .m-paybar button {
  121. width: 100%; border: 0; border-radius: 11px; padding: 13px 0;
  122. background: #ff5c2b; color: #fff; font-size: 15px; font-weight: 800; cursor: pointer;
  123. }
  124. .m-back { border: 0; background: none; color: #4c473f; font-size: 13px; padding: 4px 2px; cursor: pointer; }
  125. /* ---------------- 下单面板 ---------------- */
  126. .m-sheet-mask { position: fixed; inset: 0; background: rgba(23,20,15,.45); z-index: 80; }
  127. .m-sheet {
  128. position: fixed; left: 0; right: 0; bottom: 0; z-index: 81;
  129. background: #fffdf8; border-radius: 18px 18px 0 0; max-height: 88dvh;
  130. display: flex; flex-direction: column;
  131. animation: msheet .22s ease-out;
  132. }
  133. .m-sheet[hidden] { display: none; }
  134. @keyframes msheet { from { transform: translateY(40px); opacity: .4; } }
  135. .m-sheet-head {
  136. display: flex; align-items: center; justify-content: space-between;
  137. padding: 14px 16px 10px; border-bottom: 1px solid #f0ece2;
  138. }
  139. .m-sheet-head b { font-size: 15px; }
  140. .m-sheet-head button { border: 0; background: none; font-size: 15px; color: #8a8478; cursor: pointer; }
  141. .m-sheet-body { padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; }
  142. .m-sheet.m-tip .m-sheet-body { text-align: center; padding-top: 20px; }
  143. .m-tip-ic { margin-bottom: 6px; }
  144. .m-tip b { font-size: 15.5px; }
  145. .m-tip p { font-size: 12.5px; color: #6b665e; line-height: 1.7; margin: 8px 0 14px; }
  146. .m-tip-actions { display: flex; gap: 9px; }
  147. .m-tip-actions button { flex: 1; border-radius: 10px; padding: 11px 0; font-size: 13.5px; font-weight: 700; cursor: pointer; }
  148. #mTipCopy { border: 1px solid #ddd5c6; background: #fff; color: #4c473f; }
  149. #mTipOk { border: 0; background: #ff5c2b; color: #fff; }
  150. /* 表单 */
  151. .m-form-row { margin-bottom: 11px; }
  152. .m-form-row label { display: block; font-size: 11px; color: #8a8478; margin-bottom: 5px; font-weight: 600; }
  153. .m-form-row input, .m-form-row select {
  154. width: 100%; box-sizing: border-box; height: 40px; border: 1px solid #ddd5c6;
  155. border-radius: 9px; background: #faf8f2; padding: 0 11px; font-size: 14px;
  156. outline: none; font-family: inherit; color: #17140f;
  157. }
  158. .m-form-row input:focus, .m-form-row select:focus { border-color: #ff5c2b; background: #fff; }
  159. .m-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  160. .m-quote {
  161. display: flex; align-items: baseline; justify-content: space-between;
  162. background: #fff4ec; border-radius: 10px; padding: 11px 13px; margin: 4px 0 12px;
  163. }
  164. .m-quote span { font-size: 12px; color: #8a6a4a; }
  165. .m-quote b { color: #ff5c2b; font-size: 19px; }
  166. .m-quote b small { font-size: 11px; color: #b39277; font-weight: 600; }
  167. .m-submit {
  168. width: 100%; border: 0; border-radius: 11px; padding: 13px 0;
  169. background: #ff5c2b; color: #fff; font-size: 15px; font-weight: 800; cursor: pointer;
  170. }
  171. .m-submit:disabled { opacity: .55; }
  172. /* ---------------- Tabbar ---------------- */
  173. .m-tabbar {
  174. position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  175. display: flex; background: #fff; border-top: 1px solid #e8e2d5;
  176. padding-bottom: env(safe-area-inset-bottom);
  177. }
  178. .m-tabbar button {
  179. flex: 1; border: 0; background: none; cursor: pointer;
  180. display: flex; flex-direction: column; align-items: center; gap: 2px;
  181. padding: 7px 0 6px; color: #a79d8d; font-size: 10px;
  182. }
  183. .m-tabbar button svg { width: 21px; height: 21px; }
  184. .m-tabbar button.on { color: #ff5c2b; font-weight: 700; }
  185. /* Toast */
  186. .m-toast {
  187. position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  188. background: rgba(23,20,15,.92); color: #fff; font-size: 13px;
  189. border-radius: 9px; padding: 9px 16px; z-index: 99; max-width: 84vw; text-align: center;
  190. }
  191. .m-toast[hidden] { display: none; }
  192. /* 桌面访问提示条 */
  193. .m-desktop-tip {
  194. background: #fff4ec; color: #b35a1f; font-size: 12px;
  195. padding: 8px 14px; text-align: center;
  196. }