index.css 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139
  1. /* ============================================================
  2. BX-Mobile Global Styles — V1 Fresh Mint 清新薄荷
  3. Directly from v1-fresh-mint.html design spec
  4. ============================================================ */
  5. /* ----------------------------------------------------------
  6. 1. CSS VARIABLES (Design Tokens)
  7. ---------------------------------------------------------- */
  8. :root {
  9. --primary: #00c98d;
  10. --primary-dark: #00a874;
  11. --primary-darker: #008f62;
  12. --primary-bg: #eafff6;
  13. --primary-light: #f0fdf9;
  14. --success: #10b981;
  15. --success-bright: #34d399;
  16. --success-bg: #ecfdf5;
  17. --success-border: #a7f3d0;
  18. --warning: #f59e0b;
  19. --warning-bright: #fbbf24;
  20. --warning-bg: #fffbeb;
  21. --warning-border: #fcd34d;
  22. --danger: #ef4444;
  23. --danger-bright: #f87171;
  24. --danger-bg: #fef2f2;
  25. --danger-border: #fecaca;
  26. --info: #3b82f6;
  27. --info-bright: #60a5fa;
  28. --info-bg: #eff6ff;
  29. --info-border: #93c5fd;
  30. --processing: #6366f1;
  31. --processing-bright: #818cf8;
  32. --processing-bg: #eef2ff;
  33. --processing-border: #a5b4fc;
  34. --text: #1a1a2e;
  35. --text-sec: #64748b;
  36. --text-muted: #94a3b8;
  37. --bg: #f8fafc;
  38. --surface: #fff;
  39. --border: #e2e8f0;
  40. --shadow: 0 2px 12px rgba(0, 0, 0, .06);
  41. --shadow-md: 0 4px 16px rgba(0, 0, 0, .08);
  42. --shadow-lg: 0 8px 24px rgba(0, 0, 0, .1);
  43. --r: 12px;
  44. --rs: 8px;
  45. --rl: 16px;
  46. --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  47. /* Vant 组件默认 --van-primary-color 指向蓝色;对齐薄荷主色,避免 Tab/指示条/开关等发蓝 */
  48. --van-primary-color: var(--primary);
  49. --van-tab-active-text-color: var(--primary);
  50. }
  51. /* ----------------------------------------------------------
  52. 2. GLOBAL RESET
  53. ---------------------------------------------------------- */
  54. * { box-sizing: border-box; margin: 0; padding: 0 }
  55. body {
  56. font-family: var(--font);
  57. font-size: 14px;
  58. color: var(--text);
  59. background: var(--bg);
  60. line-height: 1.5;
  61. -webkit-tap-highlight-color: transparent;
  62. -webkit-font-smoothing: antialiased;
  63. }
  64. a { color: inherit; text-decoration: none }
  65. #app { min-height: 100vh }
  66. /* ----------------------------------------------------------
  67. 3. PAGE STRUCTURE
  68. ---------------------------------------------------------- */
  69. .page {
  70. max-width: 430px;
  71. margin: 0 auto;
  72. min-height: 100vh;
  73. padding-bottom: 80px;
  74. /* 列表空态占位:顶栏 + Tab 等;长筛选页用 .page--empty-chrome-tall 等覆盖 */
  75. --empty-fill-chrome: 100px;
  76. }
  77. .page.page--empty-chrome-medium {
  78. --empty-fill-chrome: 150px;
  79. }
  80. .page.page--empty-chrome-tall {
  81. --empty-fill-chrome: 230px;
  82. }
  83. .page.page--empty-chrome-wf {
  84. --empty-fill-chrome: 280px;
  85. }
  86. .page-padded {
  87. padding: 0 16px;
  88. }
  89. /* 顶栏(sticky topbar)与紧随的主内容区间距 5px:新建/表单/详情等统一 */
  90. .page > .topbar + .page-padded {
  91. padding-top: 5px;
  92. }
  93. /* 首屏/整页内容区加载:顶栏下方水平垂直居中(详情、工作流配置等复用) */
  94. .page-body-loading {
  95. display: flex;
  96. align-items: center;
  97. justify-content: center;
  98. width: 100%;
  99. min-height: calc(100vh - 140px);
  100. min-height: calc(100dvh - 140px);
  101. box-sizing: border-box;
  102. padding: 24px 16px 80px;
  103. }
  104. /* 弹窗、分区列表等内嵌区域加载:固定占位高度内居中 */
  105. .page-body-loading--embed {
  106. display: flex;
  107. align-items: center;
  108. justify-content: center;
  109. width: 100%;
  110. min-height: 200px;
  111. box-sizing: border-box;
  112. padding: 24px 16px;
  113. }
  114. .page-body-loading .van-loading,
  115. .page-body-loading--embed .van-loading {
  116. color: var(--primary);
  117. }
  118. /* 底部弹窗:标题区距弹窗顶 16px,与下方表单卡间距 5px */
  119. .popup-sheet-title-wrap {
  120. padding: 16px 16px 0;
  121. }
  122. .popup-sheet-title-wrap + .form-card {
  123. margin-top: 5px;
  124. }
  125. .popup-sheet-title-wrap + div:not(.form-card) {
  126. margin-top: 5px;
  127. }
  128. /* van-dialog:标题栏与插槽内容区顶部留白 16px */
  129. .dialog-form-body {
  130. padding: 16px 16px 16px;
  131. }
  132. .section-title {
  133. font-size: 13px;
  134. font-weight: 700;
  135. color: var(--text-sec);
  136. letter-spacing: .04em;
  137. padding: 20px 16px 10px;
  138. display: flex;
  139. align-items: center;
  140. gap: 6px;
  141. }
  142. .section-title::before {
  143. content: '';
  144. width: 3px;
  145. height: 14px;
  146. background: var(--primary);
  147. border-radius: 2px;
  148. }
  149. /* 外层已含左右 padding 的弹窗滚动区:区块标题与 KV/附件/流程正文左缘对齐 */
  150. .popup-sheet-body .section-title {
  151. padding-left: 0;
  152. padding-right: 0;
  153. }
  154. /* .popup-sheet-title-wrap 已含左右 padding:标题与下方 form-card(margin 0 16px)左缘对齐 */
  155. .popup-sheet-title-wrap .section-title {
  156. padding-left: 0;
  157. padding-right: 0;
  158. }
  159. /* ----------------------------------------------------------
  160. 4. TOPBAR (replaces van-nav-bar)
  161. ---------------------------------------------------------- */
  162. .topbar {
  163. position: sticky;
  164. top: 0;
  165. z-index: 50;
  166. display: grid;
  167. grid-template-columns: 1fr auto 1fr;
  168. align-items: center;
  169. height: calc(58px + env(safe-area-inset-top));
  170. padding: env(safe-area-inset-top) 12px 0;
  171. background: rgba(255, 255, 255, .84);
  172. backdrop-filter: saturate(180%) blur(14px);
  173. -webkit-backdrop-filter: saturate(180%) blur(14px);
  174. box-shadow: 0 1px 0 rgba(217, 232, 226, .85), 0 8px 20px rgba(15, 23, 42, .06);
  175. }
  176. .topbar::before {
  177. content: '';
  178. position: absolute;
  179. left: 0; right: 0; top: 0;
  180. height: calc(58px + env(safe-area-inset-top));
  181. background: linear-gradient(135deg, rgba(16, 185, 129, .10), rgba(236, 253, 245, .55) 45%, rgba(255, 255, 255, 0) 100%);
  182. pointer-events: none;
  183. }
  184. .topbar > * { position: relative }
  185. .topbar-left {
  186. display: flex;
  187. align-items: center;
  188. justify-content: flex-start;
  189. gap: 8px;
  190. min-width: 0;
  191. }
  192. .topbar-back {
  193. width: 40px; height: 40px;
  194. display: flex; align-items: center; justify-content: center;
  195. border: none;
  196. background: transparent;
  197. color: var(--text);
  198. border-radius: 10px;
  199. cursor: pointer;
  200. transition: .15s;
  201. }
  202. .topbar-back svg { width: 22px; height: 22px; stroke-linecap: round; stroke-linejoin: round }
  203. .topbar-back:active {
  204. transform: scale(.96);
  205. opacity: .75;
  206. }
  207. .topbar-title {
  208. justify-self: center;
  209. text-align: center;
  210. font-size: 17px;
  211. font-weight: 800;
  212. letter-spacing: .01em;
  213. max-width: min(52vw, 220px);
  214. overflow: hidden;
  215. text-overflow: ellipsis;
  216. white-space: nowrap;
  217. }
  218. .topbar-right {
  219. display: flex;
  220. justify-content: flex-end;
  221. gap: 4px;
  222. min-width: 0;
  223. }
  224. .topbar-btn {
  225. width: 34px; height: 34px;
  226. display: flex; align-items: center; justify-content: center;
  227. border: 1px solid rgba(217, 232, 226, .9);
  228. background: rgba(255, 255, 255, .75);
  229. color: var(--text-sec);
  230. border-radius: 10px;
  231. cursor: pointer;
  232. transition: .15s;
  233. }
  234. .topbar-btn svg { width: 19px; height: 19px; stroke-linecap: round; stroke-linejoin: round }
  235. .topbar-btn:active {
  236. transform: scale(.96);
  237. background: var(--primary-bg);
  238. color: var(--primary-dark);
  239. border-color: rgba(16, 185, 129, .35);
  240. }
  241. /* ----------------------------------------------------------
  242. 5. SEARCH BOX (replaces van-search)
  243. ---------------------------------------------------------- */
  244. .search-wrap {
  245. padding: 12px 16px;
  246. background: var(--surface);
  247. }
  248. /* 搜索条与白卡片列表之间的留白(与首条卡片间距约 5px) */
  249. .search-wrap + .page-padded {
  250. padding-top: 5px;
  251. }
  252. .search-box {
  253. display: flex;
  254. align-items: center;
  255. gap: 8px;
  256. background: var(--bg);
  257. border: 1.5px solid var(--border);
  258. border-radius: 20px;
  259. padding: 0 14px;
  260. height: 40px;
  261. transition: .2s;
  262. }
  263. .search-box:focus-within {
  264. border-color: var(--primary);
  265. background: #fff;
  266. box-shadow: 0 0 0 3px rgba(0, 201, 141, .12);
  267. }
  268. .search-box svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0 }
  269. .search-box input {
  270. flex: 1;
  271. border: none;
  272. outline: none;
  273. background: none;
  274. font-size: 14px;
  275. color: var(--text);
  276. font-family: var(--font);
  277. }
  278. .search-box input::placeholder { color: var(--text-muted) }
  279. .search-box__clear {
  280. flex-shrink: 0;
  281. display: flex;
  282. align-items: center;
  283. justify-content: center;
  284. width: 28px;
  285. height: 28px;
  286. margin: 0 -2px 0 0;
  287. padding: 0;
  288. border: none;
  289. background: transparent;
  290. border-radius: 8px;
  291. color: var(--text-muted);
  292. cursor: pointer;
  293. -webkit-tap-highlight-color: transparent;
  294. }
  295. .search-box__clear:active {
  296. background: var(--primary-bg);
  297. color: var(--text-sec);
  298. }
  299. .search-box__clear svg {
  300. width: 16px;
  301. height: 16px;
  302. }
  303. .search-filter {
  304. display: flex;
  305. align-items: center;
  306. gap: 8px;
  307. padding: 8px 0 0;
  308. }
  309. /* 状态 chip 较多时横向滑动(列表页与「我的申请」共用) */
  310. .search-filter--scroll {
  311. flex-wrap: nowrap;
  312. overflow-x: auto;
  313. -webkit-overflow-scrolling: touch;
  314. scrollbar-width: none;
  315. padding-bottom: 4px;
  316. }
  317. .search-filter--scroll::-webkit-scrollbar {
  318. display: none;
  319. }
  320. .filter-tag {
  321. padding: 4px 12px;
  322. border-radius: 14px;
  323. font-size: 12px;
  324. font-weight: 500;
  325. border: 1px solid var(--border);
  326. color: var(--text-sec);
  327. background: var(--surface);
  328. cursor: pointer;
  329. transition: .15s;
  330. white-space: nowrap;
  331. }
  332. .filter-tag.active {
  333. background: var(--primary-bg);
  334. border-color: var(--primary);
  335. color: var(--primary-dark);
  336. }
  337. .filter-tag:active { transform: scale(.95) }
  338. /* ----------------------------------------------------------
  339. 6. STAT CARDS (horizontal scroll)
  340. ---------------------------------------------------------- */
  341. .stat-scroll {
  342. display: flex;
  343. gap: 10px;
  344. padding: 0 16px 4px;
  345. overflow-x: auto;
  346. -webkit-overflow-scrolling: touch;
  347. scrollbar-width: none;
  348. }
  349. .stat-scroll::-webkit-scrollbar { display: none }
  350. .stat-card {
  351. flex-shrink: 0;
  352. width: 100px;
  353. padding: 14px 12px;
  354. border-radius: var(--r);
  355. background: var(--surface);
  356. border: 1px solid var(--border);
  357. display: flex;
  358. flex-direction: column;
  359. align-items: center;
  360. gap: 6px;
  361. box-shadow: var(--shadow);
  362. cursor: pointer;
  363. transition: .2s;
  364. }
  365. .stat-card:active { transform: scale(.96) }
  366. .stat-card.active {
  367. background: var(--primary-bg);
  368. border-color: var(--primary);
  369. }
  370. .stat-card .num {
  371. font-size: 22px;
  372. font-weight: 800;
  373. color: var(--primary);
  374. font-variant-numeric: tabular-nums;
  375. }
  376. .stat-card .label {
  377. font-size: 11px;
  378. color: var(--text-sec);
  379. font-weight: 500;
  380. }
  381. .stat-card.warn .num { color: var(--danger) }
  382. .stat-card.warn.active {
  383. background: #fef2f2;
  384. border-color: var(--danger);
  385. }
  386. /* ----------------------------------------------------------
  387. 7. EXPENSE LIST CARD
  388. ---------------------------------------------------------- */
  389. .expense-card {
  390. background: var(--surface);
  391. border-radius: var(--r);
  392. padding: 16px;
  393. margin-bottom: 10px;
  394. border: 1px solid var(--border);
  395. box-shadow: var(--shadow);
  396. cursor: pointer;
  397. transition: .15s;
  398. }
  399. .expense-card:active {
  400. transform: scale(.985);
  401. box-shadow: 0 1px 6px rgba(0, 0, 0, .04);
  402. }
  403. .ec-top {
  404. display: flex;
  405. justify-content: space-between;
  406. align-items: center;
  407. gap: 10px;
  408. margin-bottom: 8px;
  409. }
  410. .ec-type {
  411. display: inline-flex;
  412. align-items: center;
  413. flex-wrap: wrap;
  414. gap: 6px;
  415. min-width: 0;
  416. font-size: 15px;
  417. font-weight: 600;
  418. line-height: 1.3;
  419. }
  420. .ec-top .status-tag {
  421. flex-shrink: 0;
  422. }
  423. /* 列表/详情状态徽标(与 StatusTag 组件统一为 tag pill) */
  424. .status-tag {
  425. display: inline-flex;
  426. align-items: center;
  427. justify-content: center;
  428. padding: 2px 10px;
  429. border-radius: 10px;
  430. font-size: 11px;
  431. font-weight: 600;
  432. border: 1px solid var(--border);
  433. white-space: nowrap;
  434. line-height: 1.25;
  435. background: var(--bg);
  436. color: var(--text-sec);
  437. }
  438. .status-tag.success {
  439. background: var(--success-bg);
  440. color: var(--success);
  441. border-color: var(--success-border);
  442. }
  443. .status-tag.danger {
  444. background: var(--danger-bg);
  445. color: var(--danger);
  446. border-color: var(--danger-border);
  447. }
  448. .status-tag.warning {
  449. background: var(--warning-bg);
  450. color: var(--warning);
  451. border-color: var(--warning-border);
  452. }
  453. .status-tag.info {
  454. background: var(--info-bg);
  455. color: var(--info);
  456. border-color: var(--info-border);
  457. }
  458. .status-tag.muted {
  459. background: #f1f5f9;
  460. color: #64748b;
  461. border-color: rgba(100, 116, 139, .15);
  462. }
  463. .status-tag.processing {
  464. background: var(--processing-bg);
  465. color: var(--processing);
  466. border-color: var(--processing-border);
  467. }
  468. .status-tag.s-draft { background: #f1f5f9; color: #64748b; border-color: rgba(100, 116, 139, .15) }
  469. .status-tag.s-pending {
  470. background: var(--warning-bg);
  471. color: var(--warning);
  472. border-color: var(--warning-border);
  473. }
  474. .status-tag.s-approved { background: var(--primary-bg); color: var(--primary-dark); border-color: rgba(0, 201, 141, .2) }
  475. .status-tag.s-rejected { background: #fef2f2; color: #ef4444; border-color: rgba(239, 68, 68, .2) }
  476. .status-tag.s-withdrawn { background: #fffbeb; color: #d97706; border-color: rgba(245, 158, 11, .25) }
  477. .status-tag.s-issued { background: #eef2ff; color: #6366f1; border-color: rgba(99, 102, 241, .25) }
  478. .status-tag.s-paid { background: var(--primary-bg); color: var(--primary-dark); border-color: rgba(0, 201, 141, .2) }
  479. .status-tag.s-processed { background: var(--primary-bg); color: var(--primary-dark); border-color: rgba(0, 201, 141, .2) }
  480. .status-tag.s-offset { background: #fffbeb; color: #d97706; border-color: rgba(245, 158, 11, .25) }
  481. .ec-amount {
  482. font-size: 24px;
  483. font-weight: 800;
  484. color: var(--primary-dark);
  485. margin-bottom: 6px;
  486. font-variant-numeric: tabular-nums;
  487. }
  488. .ec-amount::before {
  489. content: '¥';
  490. font-size: 14px;
  491. margin-right: 2px;
  492. }
  493. .ec-meta {
  494. display: flex;
  495. gap: 12px;
  496. font-size: 12px;
  497. color: var(--text-muted);
  498. }
  499. .ec-bottom {
  500. display: flex;
  501. justify-content: space-between;
  502. align-items: center;
  503. gap: 10px;
  504. margin-top: 10px;
  505. padding-top: 10px;
  506. border-top: 1px dashed var(--border);
  507. }
  508. .ec-desc {
  509. font-size: 13px;
  510. color: var(--text-sec);
  511. flex: 1;
  512. min-width: 0;
  513. overflow: hidden;
  514. text-overflow: ellipsis;
  515. white-space: nowrap;
  516. }
  517. .ec-arrow { color: var(--text-muted); flex-shrink: 0 }
  518. /* ----------------------------------------------------------
  519. 8. BUTTONS (replaces van-button in custom layouts)
  520. ---------------------------------------------------------- */
  521. /*
  522. * 语义归类(全项目统一,全部为实心,无描边型主按钮):
  523. * - btn-primary 薄荷绿实心:保存、提交、通过、登录、发放、查看、编辑、去处理、
  524. * + 新增明细行、新增子项/子菜单 等(同语义跨页必须同类名)
  525. * - btn-secondary 取消、上移/下移、分配用户/分配菜单(中性灰实心)
  526. * - btn-danger 删除、驳回、退出登录(红实心)
  527. * - btn-warning 冲抵、禁用(橙实心)
  528. * 尺寸:默认 40px 高;列表/卡片内配合 .btn-sm(与 .op-actions 内 32px 对齐)
  529. */
  530. .btn-row {
  531. display: flex;
  532. flex-wrap: wrap;
  533. gap: 8px;
  534. align-items: center;
  535. }
  536. .btn {
  537. display: inline-flex;
  538. align-items: center;
  539. justify-content: center;
  540. gap: 6px;
  541. height: 40px;
  542. padding: 0 20px;
  543. border-radius: var(--rs);
  544. font-size: 14px;
  545. font-weight: 600;
  546. font-family: var(--font);
  547. cursor: pointer;
  548. border: 1px solid transparent;
  549. transition: .15s;
  550. -webkit-user-select: none;
  551. }
  552. .btn:disabled {
  553. opacity: 0.55;
  554. cursor: not-allowed;
  555. }
  556. .btn:disabled:active {
  557. transform: none;
  558. }
  559. .btn:active:not(:disabled) { transform: scale(.96) }
  560. /* 全局按钮:实心填充 */
  561. .btn-primary {
  562. background: var(--primary);
  563. color: #fff;
  564. border-color: var(--primary);
  565. }
  566. .btn-primary:active:not(:disabled) {
  567. background: var(--primary-dark);
  568. border-color: var(--primary-dark);
  569. }
  570. .btn-secondary {
  571. background: var(--text-sec);
  572. color: #fff;
  573. border-color: var(--text-sec);
  574. }
  575. .btn-secondary:active:not(:disabled) {
  576. background: #475569;
  577. border-color: #475569;
  578. }
  579. .btn-danger {
  580. background: var(--danger);
  581. color: #fff;
  582. border-color: var(--danger);
  583. }
  584. .btn-danger:active:not(:disabled) {
  585. background: #dc2626;
  586. border-color: #dc2626;
  587. }
  588. .btn-warning,
  589. .btn-warning-outline {
  590. background: var(--warning);
  591. color: #fff;
  592. border-color: var(--warning);
  593. }
  594. .btn-warning:active:not(:disabled),
  595. .btn-warning-outline:active:not(:disabled) {
  596. background: #d97706;
  597. border-color: #d97706;
  598. }
  599. .btn-disabled {
  600. background: #e2e8f0;
  601. color: #94a3b8;
  602. cursor: not-allowed;
  603. border-color: #e2e8f0;
  604. }
  605. .btn-disabled:active { transform: none }
  606. .btn-loading {
  607. position: relative;
  608. color: transparent !important;
  609. }
  610. .btn-loading::after {
  611. content: '';
  612. position: absolute;
  613. width: 18px; height: 18px;
  614. border: 2px solid rgba(255, 255, 255, .35);
  615. border-top-color: #fff;
  616. border-radius: 50%;
  617. animation: spin .6s linear infinite;
  618. }
  619. .btn-danger.btn-loading::after {
  620. border-color: rgba(255, 255, 255, .35);
  621. border-top-color: #fff;
  622. }
  623. .btn-secondary.btn-loading::after {
  624. border-color: rgba(255, 255, 255, .35);
  625. border-top-color: #fff;
  626. }
  627. .btn-warning.btn-loading::after,
  628. .btn-warning-outline.btn-loading::after {
  629. border-color: rgba(255, 255, 255, .35);
  630. border-top-color: #fff;
  631. }
  632. .btn-block { width: 100% }
  633. .btn-sm {
  634. height: 32px;
  635. padding: 0 12px;
  636. font-size: 12px;
  637. border-radius: 8px;
  638. }
  639. .btn-link {
  640. background: transparent;
  641. border-color: transparent;
  642. color: var(--primary-dark);
  643. padding: 0 6px;
  644. }
  645. .btn-link:active:not(:disabled) {
  646. background: var(--primary-bg);
  647. border-color: rgba(16, 185, 129, .25);
  648. }
  649. @keyframes spin { to { transform: rotate(360deg) } }
  650. /* ----------------------------------------------------------
  651. 9. FORM SYSTEM (replaces van-field)
  652. ---------------------------------------------------------- */
  653. .form-card {
  654. background: var(--surface);
  655. border-radius: var(--r);
  656. padding: 16px;
  657. border: 1px solid var(--border);
  658. }
  659. .form-header {
  660. display: flex;
  661. align-items: center;
  662. gap: 8px;
  663. margin-bottom: 16px;
  664. }
  665. .form-header h3 {
  666. font-size: 16px;
  667. font-weight: 700;
  668. }
  669. .form-badge {
  670. font-size: 11px;
  671. font-weight: 600;
  672. padding: 2px 8px;
  673. border-radius: 4px;
  674. background: var(--primary-bg);
  675. color: var(--primary-dark);
  676. }
  677. .field { margin-bottom: 14px }
  678. .field-label {
  679. display: block;
  680. font-size: 13px;
  681. font-weight: 600;
  682. color: var(--text);
  683. margin-bottom: 6px;
  684. }
  685. .field-label .req { color: var(--danger); margin-left: 2px }
  686. .form-input {
  687. width: 100%;
  688. height: 42px;
  689. padding: 0 12px;
  690. border: 1.5px solid var(--border);
  691. border-radius: var(--rs);
  692. font-size: 14px;
  693. font-family: var(--font);
  694. color: var(--text);
  695. background: var(--surface);
  696. transition: .2s;
  697. outline: none;
  698. }
  699. .form-input:focus {
  700. border-color: var(--primary);
  701. box-shadow: 0 0 0 3px rgba(0, 201, 141, .1);
  702. }
  703. .form-input:disabled {
  704. background: var(--bg);
  705. color: var(--text-muted);
  706. }
  707. .form-input.error {
  708. border-color: var(--danger);
  709. box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
  710. }
  711. .form-input-icon { position: relative }
  712. .form-input-icon .form-input { padding-right: 36px }
  713. .form-input-icon svg {
  714. position: absolute;
  715. right: 10px;
  716. top: 50%;
  717. transform: translateY(-50%);
  718. width: 18px;
  719. height: 18px;
  720. color: var(--text-muted);
  721. }
  722. .form-input-icon .form-input-pwd-toggle {
  723. position: absolute;
  724. right: 4px;
  725. top: 50%;
  726. transform: translateY(-50%);
  727. display: flex;
  728. align-items: center;
  729. justify-content: center;
  730. width: 32px;
  731. height: 32px;
  732. margin: 0;
  733. padding: 0;
  734. border: none;
  735. background: transparent;
  736. color: var(--text-muted);
  737. cursor: pointer;
  738. border-radius: 8px;
  739. -webkit-tap-highlight-color: transparent;
  740. }
  741. .form-input-icon .form-input-pwd-toggle:active {
  742. background: rgba(15, 23, 42, 0.06);
  743. }
  744. .form-input-icon .form-input-pwd-toggle svg {
  745. position: static;
  746. transform: none;
  747. right: auto;
  748. top: auto;
  749. width: 16px;
  750. height: 16px;
  751. flex-shrink: 0;
  752. }
  753. .form-textarea {
  754. width: 100%;
  755. min-height: 80px;
  756. padding: 10px 12px;
  757. border: 1.5px solid var(--border);
  758. border-radius: var(--rs);
  759. font-size: 14px;
  760. font-family: var(--font);
  761. color: var(--text);
  762. resize: vertical;
  763. outline: none;
  764. transition: .2s;
  765. }
  766. .form-textarea:focus {
  767. border-color: var(--primary);
  768. box-shadow: 0 0 0 3px rgba(0, 201, 141, .1);
  769. }
  770. .form-textarea.error {
  771. border-color: var(--danger);
  772. box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
  773. }
  774. .form-textarea-counter {
  775. text-align: right;
  776. font-size: 11px;
  777. color: var(--text-muted);
  778. margin-top: 4px;
  779. }
  780. .field-error {
  781. font-size: 12px;
  782. color: var(--danger);
  783. margin-top: 4px;
  784. }
  785. .form-input-prefix { position: relative }
  786. .form-input-prefix .form-input { padding-left: 28px }
  787. .form-input-prefix::before {
  788. content: '¥';
  789. position: absolute;
  790. left: 12px;
  791. top: 50%;
  792. transform: translateY(-50%);
  793. font-size: 14px;
  794. font-weight: 700;
  795. color: var(--primary);
  796. }
  797. .edit-highlight .form-input {
  798. background: var(--primary-light);
  799. }
  800. /* ----------------------------------------------------------
  801. 10. DETAIL PAGE
  802. ---------------------------------------------------------- */
  803. .detail-hero {
  804. background: linear-gradient(135deg, var(--primary-bg), var(--primary-light));
  805. border-radius: var(--r);
  806. padding: 20px;
  807. text-align: center;
  808. margin-bottom: 12px;
  809. }
  810. .detail-amount {
  811. font-size: 32px;
  812. font-weight: 800;
  813. color: var(--primary-dark);
  814. font-variant-numeric: tabular-nums;
  815. }
  816. .detail-amount::before {
  817. content: '¥';
  818. font-size: 16px;
  819. margin-right: 4px;
  820. }
  821. .detail-status {
  822. display: inline-block;
  823. margin-top: 8px;
  824. font-size: 12px;
  825. font-weight: 600;
  826. padding: 3px 12px;
  827. border-radius: 10px;
  828. background: var(--primary);
  829. color: #fff;
  830. }
  831. .detail-grid {
  832. display: grid;
  833. grid-template-columns: 1fr 1fr;
  834. gap: 12px;
  835. margin-bottom: 12px;
  836. }
  837. .detail-item {
  838. background: var(--surface);
  839. border: 1px solid var(--border);
  840. border-radius: var(--rs);
  841. padding: 10px 12px;
  842. }
  843. .detail-item .di-label {
  844. font-size: 11px;
  845. color: var(--text-muted);
  846. margin-bottom: 2px;
  847. }
  848. .detail-item .di-value {
  849. font-size: 14px;
  850. font-weight: 500;
  851. color: var(--text);
  852. word-break: break-all;
  853. }
  854. .detail-item.full { grid-column: 1 / -1 }
  855. /* ----------------------------------------------------------
  856. 11. TIMELINE (approval flow)
  857. ---------------------------------------------------------- */
  858. .timeline {
  859. padding-left: 20px;
  860. border-left: 2px solid var(--border);
  861. margin: 12px 0;
  862. }
  863. .tl-step {
  864. position: relative;
  865. padding: 0 0 20px 16px;
  866. }
  867. .tl-step:last-child { padding-bottom: 0 }
  868. .tl-step::before {
  869. content: '';
  870. position: absolute;
  871. left: -25px;
  872. top: 4px;
  873. width: 12px;
  874. height: 12px;
  875. border-radius: 50%;
  876. background: var(--border);
  877. border: 2px solid var(--surface);
  878. }
  879. .tl-step.done::before {
  880. background: var(--primary);
  881. box-shadow: 0 0 0 2px var(--primary-bg);
  882. }
  883. .tl-step.current::before {
  884. background: var(--info);
  885. box-shadow: 0 0 0 3px rgba(59, 130, 246, .2);
  886. animation: pulse-dot 1.5s infinite;
  887. }
  888. .tl-step.rejected::before {
  889. background: var(--danger);
  890. box-shadow: 0 0 0 2px rgba(239, 68, 68, .15);
  891. }
  892. @keyframes pulse-dot {
  893. 0%, 100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, .2) }
  894. 50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, .08) }
  895. }
  896. .tl-title { font-size: 13px; font-weight: 600 }
  897. .tl-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px }
  898. /* ----------------------------------------------------------
  899. 12. UPLOAD ZONE
  900. ---------------------------------------------------------- */
  901. .upload-zone {
  902. border: 2px dashed var(--border);
  903. border-radius: var(--r);
  904. padding: 24px;
  905. text-align: center;
  906. background: var(--bg);
  907. cursor: pointer;
  908. transition: .2s;
  909. }
  910. .upload-zone:active {
  911. border-color: var(--primary);
  912. background: var(--primary-bg);
  913. }
  914. .upload-zone svg { width: 36px; height: 36px; color: var(--text-muted); margin-bottom: 6px }
  915. .upload-zone p { font-size: 13px; color: var(--text-sec) }
  916. .upload-zone .hint { font-size: 11px; color: var(--text-muted); margin-top: 4px }
  917. /* van-uploader 插槽:仅「上传附件」实心按钮,不占大块区域 */
  918. .uploader-slot-btn .van-uploader {
  919. display: inline-block;
  920. }
  921. .uploader-slot-btn .van-uploader__wrapper {
  922. display: inline-flex;
  923. }
  924. /* ----------------------------------------------------------
  925. 13. ATTACHMENT GRID
  926. ---------------------------------------------------------- */
  927. .att-grid {
  928. display: grid;
  929. grid-template-columns: repeat(3, 1fr);
  930. gap: 8px;
  931. }
  932. .att-img {
  933. position: relative;
  934. aspect-ratio: 1;
  935. border-radius: var(--rs);
  936. overflow: hidden;
  937. border: 1px solid var(--border);
  938. background: var(--bg);
  939. }
  940. .att-img img { width: 100%; height: 100%; object-fit: cover }
  941. .att-img .del {
  942. position: absolute;
  943. top: 4px;
  944. right: 4px;
  945. width: 20px;
  946. height: 20px;
  947. border-radius: 50%;
  948. background: rgba(0, 0, 0, .5);
  949. color: #fff;
  950. display: flex;
  951. align-items: center;
  952. justify-content: center;
  953. font-size: 12px;
  954. border: none;
  955. cursor: pointer;
  956. line-height: 1;
  957. }
  958. .att-file {
  959. display: flex;
  960. align-items: center;
  961. gap: 10px;
  962. padding: 10px 12px;
  963. background: var(--surface);
  964. border: 1px solid var(--border);
  965. border-radius: var(--rs);
  966. }
  967. .att-file-icon {
  968. width: 36px;
  969. height: 36px;
  970. border-radius: 6px;
  971. background: var(--primary-bg);
  972. display: flex;
  973. align-items: center;
  974. justify-content: center;
  975. flex-shrink: 0;
  976. }
  977. .att-file-icon svg { width: 20px; height: 20px; color: var(--primary-dark) }
  978. .att-file-info { flex: 1; min-width: 0 }
  979. .att-file-name {
  980. font-size: 13px;
  981. font-weight: 500;
  982. overflow: hidden;
  983. text-overflow: ellipsis;
  984. white-space: nowrap;
  985. }
  986. .att-file-size { font-size: 11px; color: var(--text-muted) }
  987. /* ----------------------------------------------------------
  988. 14. FORM CONTROLS
  989. ---------------------------------------------------------- */
  990. .ctrl-group { margin-bottom: 16px }
  991. .ctrl-label { font-size: 13px; font-weight: 600; margin-bottom: 8px }
  992. .radio-group, .check-group {
  993. display: flex;
  994. flex-wrap: wrap;
  995. gap: 8px;
  996. }
  997. .radio-item, .check-item {
  998. display: flex;
  999. align-items: center;
  1000. gap: 6px;
  1001. font-size: 13px;
  1002. cursor: pointer;
  1003. padding: 6px 12px;
  1004. border: 1px solid var(--border);
  1005. border-radius: var(--rs);
  1006. transition: .15s;
  1007. }
  1008. .radio-item:active, .check-item:active { background: var(--primary-bg) }
  1009. .radio-item.selected, .check-item.selected {
  1010. border-color: var(--primary);
  1011. background: var(--primary-bg);
  1012. color: var(--primary-dark);
  1013. font-weight: 600;
  1014. }
  1015. /* ----------------------------------------------------------
  1016. 15. EMPTY STATE
  1017. ---------------------------------------------------------- */
  1018. .empty-state {
  1019. text-align: center;
  1020. padding: 40px 20px;
  1021. }
  1022. .empty-state svg {
  1023. width: 80px;
  1024. height: 80px;
  1025. color: var(--text-muted);
  1026. margin-bottom: 12px;
  1027. opacity: .5;
  1028. }
  1029. .empty-state p {
  1030. font-size: 15px;
  1031. color: var(--text-muted);
  1032. margin-bottom: 16px;
  1033. }
  1034. /* 列表无数据:视口剩余区域水平垂直居中(--empty-fill-chrome 由 .page 修饰符控制) */
  1035. .empty-state.empty-state--fill {
  1036. display: flex;
  1037. flex-direction: column;
  1038. align-items: center;
  1039. justify-content: center;
  1040. box-sizing: border-box;
  1041. min-height: calc(100dvh - var(--empty-fill-chrome, 100px) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  1042. min-height: calc(100vh - var(--empty-fill-chrome, 100px) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  1043. padding: 24px 20px 80px;
  1044. margin: 0 auto;
  1045. max-width: 100%;
  1046. }
  1047. /* 弹窗/卡片分区内的无数据 */
  1048. .empty-state.empty-state--embed {
  1049. display: flex;
  1050. flex-direction: column;
  1051. align-items: center;
  1052. justify-content: center;
  1053. box-sizing: border-box;
  1054. min-height: 160px;
  1055. padding: 24px 16px;
  1056. margin: 0 auto;
  1057. }
  1058. .empty-state.empty-state--fill > .van-icon:first-child,
  1059. .empty-state.empty-state--embed > .van-icon:first-child {
  1060. opacity: 0.55;
  1061. margin-bottom: 14px;
  1062. }
  1063. .empty-state.empty-state--fill p:last-child,
  1064. .empty-state.empty-state--embed p:last-child {
  1065. margin-bottom: 0;
  1066. line-height: 1.5;
  1067. }
  1068. /* ----------------------------------------------------------
  1069. 16. TAGS & BADGES
  1070. ---------------------------------------------------------- */
  1071. .tag {
  1072. display: inline-flex;
  1073. align-items: center;
  1074. padding: 2px 10px;
  1075. border-radius: 10px;
  1076. font-size: 11px;
  1077. font-weight: 600;
  1078. border: 1px solid transparent;
  1079. }
  1080. .tag-green { background: var(--primary-bg); color: var(--primary-dark); border-color: rgba(0, 201, 141, .2) }
  1081. .tag-blue { background: #eff6ff; color: #3b82f6; border-color: rgba(59, 130, 246, .2) }
  1082. /** 报销等业务类型徽标(非状态):避免与「审批中」等蓝色混淆 */
  1083. .tag-amber { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border) }
  1084. .tag-neutral { background: #f1f5f9; color: #64748b; border-color: rgba(100, 116, 139, .15) }
  1085. .tag-red { background: #fef2f2; color: #ef4444; border-color: rgba(239, 68, 68, .2) }
  1086. .tag-orange { background: #fffbeb; color: #d97706; border-color: rgba(245, 158, 11, .2) }
  1087. .tag-gray { background: #f1f5f9; color: #64748b; border-color: rgba(100, 116, 139, .15) }
  1088. /* detail / approve 等区域可与 .tag 混用;列表优先 .status-tag */
  1089. .badge {
  1090. display: inline-flex;
  1091. align-items: center;
  1092. justify-content: center;
  1093. min-width: 18px;
  1094. height: 18px;
  1095. padding: 0 5px;
  1096. border-radius: 9px;
  1097. background: var(--danger);
  1098. color: #fff;
  1099. font-size: 10px;
  1100. font-weight: 700;
  1101. line-height: 1;
  1102. }
  1103. .badge-dot {
  1104. width: 8px;
  1105. height: 8px;
  1106. padding: 0;
  1107. min-width: 8px;
  1108. border-radius: 50%;
  1109. }
  1110. /* ----------------------------------------------------------
  1111. 17. FLOW CARD (approval)
  1112. ---------------------------------------------------------- */
  1113. .flow-card {
  1114. background: var(--surface);
  1115. border: 1px solid var(--border);
  1116. border-radius: var(--r);
  1117. padding: 16px;
  1118. }
  1119. .flow-step {
  1120. display: flex;
  1121. align-items: flex-start;
  1122. gap: 12px;
  1123. padding-bottom: 16px;
  1124. position: relative;
  1125. }
  1126. .flow-step:last-child { padding-bottom: 0 }
  1127. .flow-step:not(:last-child)::after {
  1128. content: '';
  1129. position: absolute;
  1130. left: 15px;
  1131. top: 32px;
  1132. bottom: 0;
  1133. width: 2px;
  1134. background: var(--border);
  1135. }
  1136. .flow-avatar {
  1137. width: 32px;
  1138. height: 32px;
  1139. border-radius: 50%;
  1140. display: flex;
  1141. align-items: center;
  1142. justify-content: center;
  1143. font-size: 12px;
  1144. font-weight: 700;
  1145. color: #fff;
  1146. flex-shrink: 0;
  1147. }
  1148. .flow-avatar.av-done { background: var(--primary) }
  1149. .flow-avatar.av-current { background: var(--warning); animation: pulse-dot 1.5s infinite }
  1150. .flow-avatar.av-reject { background: var(--danger) }
  1151. .flow-avatar.av-pending { background: var(--border); color: var(--text-muted) }
  1152. .flow-info { flex: 1 }
  1153. .flow-name { font-size: 13px; font-weight: 600 }
  1154. .flow-role { font-size: 11px; color: var(--text-muted) }
  1155. .flow-time { font-size: 11px; color: var(--text-muted); margin-top: 2px }
  1156. .flow-status { font-size: 11px; font-weight: 600; margin-left: auto; flex-shrink: 0 }
  1157. /* ----------------------------------------------------------
  1158. 18. OP-CARD (card with action buttons)
  1159. ---------------------------------------------------------- */
  1160. .card-list {
  1161. display: flex;
  1162. flex-direction: column;
  1163. gap: 10px;
  1164. }
  1165. .op-card {
  1166. background: var(--surface);
  1167. border: 1px solid var(--border);
  1168. border-radius: var(--r);
  1169. box-shadow: var(--shadow);
  1170. padding: 14px;
  1171. cursor: pointer;
  1172. transition: .15s;
  1173. }
  1174. .op-card:active {
  1175. transform: scale(.988);
  1176. box-shadow: 0 1px 8px rgba(0, 0, 0, .04);
  1177. }
  1178. .op-card-head {
  1179. display: flex;
  1180. align-items: flex-start;
  1181. justify-content: space-between;
  1182. gap: 10px;
  1183. }
  1184. .op-card-title {
  1185. font-size: 15px;
  1186. font-weight: 900;
  1187. line-height: 1.2;
  1188. }
  1189. .op-card-sub {
  1190. margin-top: 4px;
  1191. font-size: 12px;
  1192. color: var(--text-muted);
  1193. display: flex;
  1194. gap: 10px;
  1195. flex-wrap: wrap;
  1196. }
  1197. .op-card-amount {
  1198. font-size: 20px;
  1199. font-weight: 900;
  1200. color: var(--primary-dark);
  1201. font-variant-numeric: tabular-nums;
  1202. white-space: nowrap;
  1203. }
  1204. .op-card-amount::before {
  1205. content: '¥';
  1206. font-size: 12px;
  1207. margin-right: 2px;
  1208. }
  1209. .op-card-body {
  1210. margin-top: 10px;
  1211. padding-top: 10px;
  1212. border-top: 1px dashed var(--border);
  1213. display: flex;
  1214. justify-content: space-between;
  1215. align-items: center;
  1216. gap: 10px;
  1217. }
  1218. .op-card-body > .op-actions:only-child {
  1219. margin-left: auto;
  1220. }
  1221. .op-card-desc {
  1222. font-size: 13px;
  1223. color: var(--text-sec);
  1224. flex: 1;
  1225. min-width: 0;
  1226. overflow: hidden;
  1227. text-overflow: ellipsis;
  1228. white-space: nowrap;
  1229. }
  1230. .op-card-desc--wrap {
  1231. white-space: normal;
  1232. display: -webkit-box;
  1233. -webkit-line-clamp: 2;
  1234. -webkit-box-orient: vertical;
  1235. word-break: break-word;
  1236. }
  1237. /* 列表卡片内多字段对照(op-card / expense-card 通用) */
  1238. .list-card-kv {
  1239. margin-top: 10px;
  1240. padding: 10px 12px;
  1241. border-radius: var(--rs);
  1242. background: var(--bg);
  1243. border: 1px solid var(--border);
  1244. display: flex;
  1245. flex-direction: column;
  1246. gap: 6px;
  1247. font-size: 12px;
  1248. }
  1249. .list-card-kv__row {
  1250. display: flex;
  1251. justify-content: space-between;
  1252. align-items: flex-start;
  1253. gap: 10px;
  1254. line-height: 1.45;
  1255. }
  1256. .list-card-kv__k {
  1257. flex-shrink: 0;
  1258. color: var(--text-muted);
  1259. font-size: 11px;
  1260. max-width: 42%;
  1261. }
  1262. .list-card-kv__v {
  1263. flex: 1;
  1264. min-width: 0;
  1265. text-align: right;
  1266. color: var(--text);
  1267. font-weight: 500;
  1268. word-break: break-word;
  1269. }
  1270. /* 详情/弹窗内无数据提示 */
  1271. .detail-section-empty {
  1272. margin: 0;
  1273. padding: 12px;
  1274. font-size: 13px;
  1275. color: var(--text-muted);
  1276. text-align: center;
  1277. background: var(--bg);
  1278. border-radius: var(--rs);
  1279. border: 1px dashed var(--border);
  1280. }
  1281. .op-card-amount-label {
  1282. margin-top: 8px;
  1283. font-size: 11px;
  1284. color: var(--text-muted);
  1285. font-weight: 600;
  1286. }
  1287. .op-card-reason {
  1288. margin-top: 8px;
  1289. font-size: 13px;
  1290. color: var(--text-sec);
  1291. line-height: 1.45;
  1292. display: -webkit-box;
  1293. -webkit-line-clamp: 3;
  1294. -webkit-box-orient: vertical;
  1295. overflow: hidden;
  1296. word-break: break-word;
  1297. }
  1298. .op-actions {
  1299. display: flex;
  1300. gap: 8px;
  1301. flex-wrap: wrap;
  1302. justify-content: flex-end;
  1303. }
  1304. .op-actions .btn {
  1305. height: 32px;
  1306. padding: 0 12px;
  1307. font-size: 12px;
  1308. border-radius: 8px;
  1309. }
  1310. .op-actions .btn svg { width: 14px; height: 14px }
  1311. /* ----------------------------------------------------------
  1312. 19. HOME HERO (首页顶部)
  1313. ---------------------------------------------------------- */
  1314. .home-hero {
  1315. background: linear-gradient(135deg, #10b981 0%, #34d399 55%, #6ee7b7 100%);
  1316. color: #fff;
  1317. border-radius: 14px;
  1318. padding: 16px;
  1319. box-shadow: 0 10px 24px rgba(16, 185, 129, .25);
  1320. }
  1321. .home-hero-main { min-width: 0 }
  1322. .home-hero .hello { font-size: 12px; opacity: .9 }
  1323. .home-hero .name { font-size: 20px; font-weight: 900; margin-top: 4px }
  1324. .home-hero-stats-row {
  1325. display: flex;
  1326. align-items: center;
  1327. justify-content: space-between;
  1328. gap: 10px;
  1329. margin-top: 10px;
  1330. }
  1331. .home-hero-stats-row .meta {
  1332. display: flex;
  1333. flex-wrap: wrap;
  1334. gap: 8px;
  1335. align-items: center;
  1336. flex: 1;
  1337. min-width: 0;
  1338. }
  1339. .home-hero .chip {
  1340. font-size: 11px;
  1341. font-weight: 700;
  1342. padding: 4px 10px;
  1343. border-radius: 999px;
  1344. background: rgba(255, 255, 255, .2);
  1345. border: 1px solid rgba(255, 255, 255, .35);
  1346. }
  1347. .home-hero-logout {
  1348. flex-shrink: 0;
  1349. align-self: center;
  1350. margin: 0;
  1351. padding: 0;
  1352. border: none;
  1353. background: transparent;
  1354. font: inherit;
  1355. font-size: 11px;
  1356. font-weight: 700;
  1357. color: inherit;
  1358. opacity: .9;
  1359. cursor: pointer;
  1360. line-height: 1.2;
  1361. white-space: nowrap;
  1362. }
  1363. .home-hero-logout:active {
  1364. opacity: .75;
  1365. }
  1366. /* 首页:分组标题与菜单卡片文案使用主色文字(深色),与正文一致 */
  1367. .home-page .section-title {
  1368. color: var(--text);
  1369. }
  1370. /* ----------------------------------------------------------
  1371. 20. MENU GRID
  1372. ---------------------------------------------------------- */
  1373. .menu-grid {
  1374. margin-top: 12px;
  1375. display: grid;
  1376. grid-template-columns: repeat(4, 1fr);
  1377. gap: 10px;
  1378. }
  1379. .menu-item {
  1380. position: relative;
  1381. border: none;
  1382. background: var(--surface);
  1383. border-radius: var(--r);
  1384. padding: 10px 8px 9px;
  1385. display: flex;
  1386. flex-direction: column;
  1387. align-items: center;
  1388. gap: 5px;
  1389. cursor: pointer;
  1390. box-shadow: var(--shadow);
  1391. transition: background .15s, box-shadow .15s, transform .15s;
  1392. }
  1393. .menu-item:active {
  1394. transform: scale(.96);
  1395. background: var(--primary-light);
  1396. box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
  1397. }
  1398. .menu-item .icon {
  1399. width: 40px;
  1400. height: 40px;
  1401. border-radius: 11px;
  1402. display: flex;
  1403. align-items: center;
  1404. justify-content: center;
  1405. background: var(--primary-bg);
  1406. color: var(--primary-dark);
  1407. border: none;
  1408. }
  1409. .menu-item .txt {
  1410. font-size: 13px;
  1411. font-weight: 700;
  1412. color: var(--text);
  1413. align-self: stretch;
  1414. text-align: center;
  1415. line-height: 1.35;
  1416. white-space: pre-line;
  1417. }
  1418. .menu-item.hot .icon {
  1419. background: #eff6ff;
  1420. color: var(--info);
  1421. }
  1422. .menu-item.warn .icon {
  1423. background: #fffbeb;
  1424. color: #d97706;
  1425. }
  1426. .menu-item .msg-dot {
  1427. position: absolute;
  1428. top: 8px;
  1429. right: 10px;
  1430. width: 8px;
  1431. height: 8px;
  1432. border-radius: 50%;
  1433. background: var(--danger);
  1434. box-shadow: 0 0 0 2px var(--surface);
  1435. }
  1436. /* ----------------------------------------------------------
  1437. 21. TODO CARD
  1438. ---------------------------------------------------------- */
  1439. .todo-card {
  1440. background: transparent;
  1441. border: none;
  1442. border-radius: 12px;
  1443. padding: 12px 0;
  1444. box-shadow: none;
  1445. }
  1446. .todo-head {
  1447. display: flex;
  1448. align-items: center;
  1449. justify-content: space-between;
  1450. margin-bottom: 8px;
  1451. }
  1452. .todo-head--badge-only {
  1453. justify-content: flex-end;
  1454. }
  1455. .todo-head .title {
  1456. font-size: 11px;
  1457. font-weight: 800;
  1458. color: var(--text);
  1459. }
  1460. .todo-item {
  1461. display: flex;
  1462. align-items: center;
  1463. justify-content: space-between;
  1464. gap: 8px;
  1465. padding: 9px 0;
  1466. border-top: 1px dashed rgba(226, 232, 240, .9);
  1467. }
  1468. .todo-item:first-of-type { border-top: none; padding-top: 0 }
  1469. .todo-item .left { min-width: 0 }
  1470. .todo-item .name {
  1471. font-size: 11px;
  1472. font-weight: 700;
  1473. white-space: nowrap;
  1474. overflow: hidden;
  1475. text-overflow: ellipsis;
  1476. }
  1477. .todo-item .meta { font-size: 11px; color: var(--text-muted); margin-top: 2px }
  1478. /* 待办「去处理」与列表卡片内按钮同高同圆角 */
  1479. .todo-item .btn.btn-sm {
  1480. height: 32px;
  1481. border-radius: 8px;
  1482. }
  1483. /* ----------------------------------------------------------
  1484. 22. LOGIN PAGE
  1485. ---------------------------------------------------------- */
  1486. .login-page {
  1487. min-height: 100vh;
  1488. min-height: 100dvh;
  1489. background: linear-gradient(180deg, #ecfdf5 0%, #f8fafc 42%, #f8fafc 100%);
  1490. padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  1491. display: flex;
  1492. flex-direction: column;
  1493. align-items: center;
  1494. justify-content: center;
  1495. box-sizing: border-box;
  1496. }
  1497. .login-page-inner {
  1498. width: 100%;
  1499. max-width: 400px;
  1500. display: flex;
  1501. flex-direction: column;
  1502. align-items: stretch;
  1503. }
  1504. .login-brand-block {
  1505. text-align: center;
  1506. margin-bottom: 22px;
  1507. }
  1508. .brand-logo-img {
  1509. display: block;
  1510. width: 100%;
  1511. max-width: min(180px, 48vw);
  1512. height: auto;
  1513. margin: 0 auto 12px;
  1514. object-fit: contain;
  1515. }
  1516. .login-brand-block .brand-sub {
  1517. font-size: 22px;
  1518. font-weight: 700;
  1519. letter-spacing: 0.02em;
  1520. color: var(--text);
  1521. margin-top: 2px;
  1522. }
  1523. .login-card {
  1524. margin: 0;
  1525. width: 100%;
  1526. box-sizing: border-box;
  1527. background: #fff;
  1528. border: 1px solid var(--border);
  1529. border-radius: 12px;
  1530. padding: 14px;
  1531. box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
  1532. }
  1533. .login-title { font-size: 16px; font-weight: 900; margin-bottom: 12px }
  1534. .login-input {
  1535. display: flex;
  1536. align-items: center;
  1537. gap: 8px;
  1538. height: 42px;
  1539. padding: 0 12px;
  1540. border: 1.5px solid var(--border);
  1541. border-radius: 10px;
  1542. background: var(--surface);
  1543. margin-bottom: 10px;
  1544. }
  1545. .login-input:focus-within {
  1546. border-color: var(--primary);
  1547. box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
  1548. }
  1549. .login-input.error {
  1550. border-color: var(--danger);
  1551. box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
  1552. }
  1553. .login-input svg { width: 17px; height: 17px; color: var(--text-muted); flex-shrink: 0 }
  1554. .login-input input {
  1555. border: none;
  1556. outline: none;
  1557. background: none;
  1558. flex: 1;
  1559. font-size: 14px;
  1560. color: var(--text);
  1561. min-width: 0;
  1562. }
  1563. /* 密码行:右侧眼睛图标叠在输入区内,避免单独一列的割裂感 */
  1564. .login-input--password {
  1565. position: relative;
  1566. }
  1567. .login-input--password input {
  1568. padding-right: 38px;
  1569. }
  1570. .login-eye {
  1571. position: absolute;
  1572. right: 8px;
  1573. top: 50%;
  1574. transform: translateY(-50%);
  1575. width: 32px;
  1576. height: 32px;
  1577. margin: 0;
  1578. padding: 0;
  1579. border: none;
  1580. background: transparent;
  1581. border-radius: 6px;
  1582. color: var(--text-muted);
  1583. display: flex;
  1584. align-items: center;
  1585. justify-content: center;
  1586. cursor: pointer;
  1587. -webkit-tap-highlight-color: transparent;
  1588. }
  1589. .login-eye svg { width: 16px; height: 16px }
  1590. .login-eye:active {
  1591. color: var(--primary-dark);
  1592. }
  1593. .login-card .btn-primary.btn-block {
  1594. margin-top: 12px;
  1595. }
  1596. .login-error-msg {
  1597. margin-top: -4px;
  1598. margin-bottom: 8px;
  1599. font-size: 12px;
  1600. color: var(--danger);
  1601. display: none;
  1602. }
  1603. .login-error-msg.show { display: block }
  1604. /* ----------------------------------------------------------
  1605. 23. BOTTOM ACTION BAR
  1606. ---------------------------------------------------------- */
  1607. .bottom-action-bar {
  1608. position: fixed;
  1609. bottom: 0;
  1610. left: 0;
  1611. right: 0;
  1612. padding: 12px 16px;
  1613. padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  1614. background: var(--surface);
  1615. box-shadow: 0 -2px 12px rgba(0, 0, 0, .06);
  1616. z-index: 100;
  1617. display: flex;
  1618. gap: 10px;
  1619. }
  1620. /* 列表/管理页:右下角新增(圆形主色 + 白加号) */
  1621. .fab-add {
  1622. position: fixed;
  1623. right: 16px;
  1624. bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  1625. z-index: 120;
  1626. width: 48px;
  1627. height: 48px;
  1628. padding: 0;
  1629. border: none;
  1630. border-radius: 50%;
  1631. background: var(--primary);
  1632. color: #fff;
  1633. box-shadow: 0 3px 12px rgba(0, 201, 141, .38);
  1634. display: flex;
  1635. align-items: center;
  1636. justify-content: center;
  1637. cursor: pointer;
  1638. -webkit-tap-highlight-color: transparent;
  1639. transition: transform .15s, opacity .15s;
  1640. }
  1641. .fab-add svg {
  1642. width: 22px;
  1643. height: 22px;
  1644. stroke: currentColor;
  1645. stroke-width: 2.25;
  1646. flex-shrink: 0;
  1647. }
  1648. .fab-add:active {
  1649. transform: scale(.94);
  1650. opacity: .92;
  1651. }
  1652. /* ----------------------------------------------------------
  1653. 24. PICKER TRIGGER (expense item)
  1654. ---------------------------------------------------------- */
  1655. .picker-trigger {
  1656. display: flex;
  1657. align-items: center;
  1658. gap: 10px;
  1659. padding: 12px;
  1660. border: 1.5px solid var(--border);
  1661. border-radius: var(--r);
  1662. background: var(--surface);
  1663. box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  1664. cursor: pointer;
  1665. }
  1666. .picker-trigger:active {
  1667. background: var(--primary-bg);
  1668. border-color: rgba(16, 185, 129, .35);
  1669. }
  1670. .picker-trigger .left { flex: 1; min-width: 0 }
  1671. .picker-trigger .label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px }
  1672. .picker-trigger .value {
  1673. font-size: 14px;
  1674. font-weight: 700;
  1675. white-space: nowrap;
  1676. overflow: hidden;
  1677. text-overflow: ellipsis;
  1678. }
  1679. .picker-trigger .ph { color: var(--text-muted); font-weight: 600 }
  1680. .picker-trigger .arrow { color: var(--text-muted); flex-shrink: 0 }
  1681. /* ----------------------------------------------------------
  1682. 25. TREE (menu/expense item tree)
  1683. ---------------------------------------------------------- */
  1684. .tree-card {
  1685. background: var(--surface);
  1686. border: 1px solid var(--border);
  1687. border-radius: var(--r);
  1688. box-shadow: var(--shadow);
  1689. overflow: hidden;
  1690. }
  1691. .tree-head {
  1692. display: flex;
  1693. align-items: center;
  1694. justify-content: space-between;
  1695. padding: 12px 14px;
  1696. background: linear-gradient(135deg, var(--primary-bg), #fff);
  1697. }
  1698. .tree-head .title { font-size: 14px; font-weight: 800; color: var(--text) }
  1699. .tree-head .meta { font-size: 12px; color: var(--text-sec) }
  1700. .tree { padding: 6px 0 }
  1701. .tree-node {
  1702. position: relative;
  1703. display: flex;
  1704. align-items: center;
  1705. gap: 10px;
  1706. padding: 10px 14px;
  1707. cursor: pointer;
  1708. -webkit-user-select: none;
  1709. }
  1710. .tree-node:active { background: var(--primary-bg) }
  1711. .tree-node + .tree-node { border-top: 1px solid rgba(226, 232, 240, .7) }
  1712. .tree-node .twisty {
  1713. width: 22px; height: 22px; border-radius: 7px;
  1714. display: flex; align-items: center; justify-content: center;
  1715. background: rgba(16, 185, 129, .10);
  1716. color: var(--primary-dark);
  1717. flex-shrink: 0;
  1718. transition: .15s;
  1719. }
  1720. .tree-node.leaf .twisty { opacity: .35; background: transparent }
  1721. .tree-node .twisty svg { width: 14px; height: 14px; transition: .15s }
  1722. .tree-node.expanded > .twisty svg { transform: rotate(90deg) }
  1723. .tree-node .icon {
  1724. width: 30px; height: 30px; border-radius: 10px;
  1725. display: flex; align-items: center; justify-content: center;
  1726. background: var(--bg);
  1727. border: 1px solid rgba(226, 232, 240, .9);
  1728. color: var(--text-sec);
  1729. flex-shrink: 0;
  1730. }
  1731. .tree-node .main { flex: 1; min-width: 0 }
  1732. .tree-node .name {
  1733. font-size: 14px;
  1734. font-weight: 700;
  1735. white-space: nowrap;
  1736. overflow: hidden;
  1737. text-overflow: ellipsis;
  1738. }
  1739. .tree-node .sub {
  1740. margin-top: 2px;
  1741. font-size: 11px;
  1742. color: var(--text-muted);
  1743. white-space: nowrap;
  1744. overflow: hidden;
  1745. text-overflow: ellipsis;
  1746. }
  1747. .tree-node .right { display: flex; align-items: center; gap: 8px; flex-shrink: 0 }
  1748. .tree-count {
  1749. font-size: 11px;
  1750. font-weight: 800;
  1751. color: var(--primary-dark);
  1752. background: var(--primary-bg);
  1753. border: 1px solid rgba(16, 185, 129, .22);
  1754. padding: 2px 8px;
  1755. border-radius: 999px;
  1756. }
  1757. .tree-selected {
  1758. outline: 2px solid rgba(16, 185, 129, .22);
  1759. outline-offset: -2px;
  1760. background: rgba(236, 253, 245, .55);
  1761. }
  1762. /* ----------------------------------------------------------
  1763. 26. VANT MINIMAL OVERRIDES (functional only)
  1764. ---------------------------------------------------------- */
  1765. /* Vant Toast 的根节点同时是 .van-popup + .van-toast;vant 中 .van-popup 白底若后加载/同特异度会盖住 toast 深色底 → 白底白字。
  1766. * 全项目凡 showToast / showSuccessToast 等均走此组件;用 !important + 字面 fallback 保证任意页面可读。
  1767. * (依赖 main.ts 中在 vant.css 之后引入本文件。) */
  1768. .van-popup.van-toast {
  1769. background: var(--van-toast-background, rgba(0, 0, 0, 0.78)) !important;
  1770. color: var(--van-toast-text-color, #fff) !important;
  1771. }
  1772. .van-popup.van-toast .van-toast__text {
  1773. color: inherit !important;
  1774. }
  1775. .van-popup.van-toast .van-toast__icon,
  1776. .van-popup.van-toast .van-icon {
  1777. color: inherit !important;
  1778. }
  1779. .van-popup.van-toast .van-toast__loading {
  1780. color: var(--van-toast-loading-icon-color, #fff) !important;
  1781. }
  1782. .van-popup.van-toast .van-loading__spinner .van-loading__dot {
  1783. background: currentColor !important;
  1784. }
  1785. .van-popup--bottom {
  1786. border-radius: 14px 14px 0 0 !important;
  1787. }
  1788. .van-overlay {
  1789. background: rgba(0, 0, 0, .42) !important;
  1790. }
  1791. .van-tabs__line {
  1792. background: var(--primary) !important;
  1793. background-color: var(--primary) !important;
  1794. border-radius: 2px !important;
  1795. height: 3px !important;
  1796. }
  1797. .van-tab--active {
  1798. color: var(--primary) !important;
  1799. font-weight: 600 !important;
  1800. }
  1801. /* 与变量链一致,防止个别主题下 Tab 文字仍回落到蓝 */
  1802. .van-tabs__nav .van-tab--active {
  1803. color: var(--primary) !important;
  1804. }
  1805. .van-loading__spinner .van-loading__dot {
  1806. background: var(--primary) !important;
  1807. }
  1808. .van-pull-refresh__head {
  1809. color: var(--primary) !important;
  1810. }
  1811. .van-switch--on {
  1812. background: var(--primary) !important;
  1813. }
  1814. .van-dialog {
  1815. border-radius: 14px !important;
  1816. overflow: hidden;
  1817. }
  1818. /* 勿对 .van-dialog__confirm 使用 color !important,否则会盖住 Vant 的 confirmButtonColor(删除确认需红色) */
  1819. .van-dialog__confirm {
  1820. font-weight: 600;
  1821. }
  1822. .van-notice-bar {
  1823. background: var(--primary-bg) !important;
  1824. color: var(--primary-dark) !important;
  1825. }