| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803 |
- /**
- * 山峡化工 · 小程序移动端 Demo 基础样式
- * 视觉 Token 对齐 docs/miniprogram-ui-spec-sanqiang.md
- * 375px 基线,最大 420px 手机框
- */
- :root {
- --brand-green: #0a9f6d;
- --brand-green-dark: #087f57;
- --brand-green-light: #11b37a;
- --brand-green-soft: #e9f9f2;
- --barley-yellow: #d6a343;
- --barley-yellow-soft: #fff7e8;
- --bg-page: #f5f8f7;
- --surface: #ffffff;
- --text-primary: #1f2a26;
- --text-muted: #6b7b74;
- --text-placeholder: #9aa8a1;
- --border: #dcebe4;
- --border-light: #edf5f1;
- --shadow-sm: 0 4px 12px rgba(10, 159, 109, 0.06);
- --shadow-md: 0 8px 20px rgba(10, 159, 109, 0.12);
- --danger: #d14343;
- --danger-soft: #fef2f2;
- --warning: #cf8a19;
- --warning-soft: #fff4dd;
- --success: #189b65;
- --success-soft: #e9f9f2;
- --info: #3b82f6;
- --info-soft: #eff6ff;
- --radius-sm: 8px;
- --radius-md: 12px;
- --radius-lg: 16px;
- --radius-xl: 22px;
- --radius-pill: 999px;
- --space-xs: 8px;
- --space-sm: 10px;
- --space-md: 12px;
- --space-lg: 16px;
- --space-xl: 20px;
- --header-gradient: linear-gradient(145deg, var(--brand-green-dark) 0%, var(--brand-green) 72%, var(--barley-yellow) 165%);
- --tabbar-h: 56px;
- --safe-bottom: env(safe-area-inset-bottom, 0px);
- --module-crm: #0a9f6d;
- --module-bx: #d6a343;
- --module-db: #2b8a7e;
- --module-pl: #087f57;
- }
- * {
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- }
- html,
- body {
- background: #e8eeeb;
- color: var(--text-primary);
- font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
- font-size: 14px;
- line-height: 1.5;
- -webkit-font-smoothing: antialiased;
- }
- a {
- color: inherit;
- text-decoration: none;
- }
- button {
- font: inherit;
- border: none;
- background: none;
- cursor: pointer;
- }
- /* ── 手机框 ── */
- .phone {
- max-width: 420px;
- min-height: 100vh;
- margin: 0 auto;
- background: var(--bg-page);
- position: relative;
- padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
- }
- .phone.no-tabbar {
- padding-bottom: calc(var(--safe-bottom) + 16px);
- }
- /* ── 原型导航(右上角切换 Demo) ── */
- .proto-nav {
- position: fixed;
- top: 10px;
- right: 10px;
- z-index: 9999;
- background: rgba(31, 42, 38, 0.92);
- color: #fff;
- border-radius: var(--radius-md);
- padding: 8px 10px;
- font-size: 11px;
- max-width: 180px;
- backdrop-filter: blur(8px);
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
- }
- .proto-nav strong {
- display: block;
- font-size: 11px;
- margin-bottom: 6px;
- opacity: 0.85;
- }
- .proto-nav a {
- display: block;
- padding: 4px 0;
- color: #b8e6d0;
- font-size: 11px;
- }
- .proto-nav a.active {
- color: #fff;
- font-weight: 700;
- }
- /* ── Header ── */
- .mp-header {
- background: var(--header-gradient);
- color: #fff;
- padding: calc(14px + env(safe-area-inset-top, 0px)) var(--space-lg) var(--space-lg);
- border-bottom-left-radius: var(--radius-xl);
- border-bottom-right-radius: var(--radius-xl);
- box-shadow: var(--shadow-md);
- }
- .mp-header__row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: var(--space-md);
- margin-bottom: var(--space-md);
- }
- .mp-header__title {
- font-size: 18px;
- font-weight: 700;
- }
- .mp-header__action {
- min-height: 36px;
- padding: 0 12px;
- border-radius: var(--radius-pill);
- border: 1px solid rgba(255, 255, 255, 0.38);
- display: inline-flex;
- align-items: center;
- font-size: 12px;
- color: #fff;
- }
- .mp-header__user {
- display: flex;
- align-items: center;
- gap: var(--space-md);
- }
- .mp-header__avatar {
- width: 48px;
- height: 48px;
- border-radius: 50%;
- background: rgba(255, 255, 255, 0.22);
- border: 2px solid rgba(255, 255, 255, 0.35);
- flex-shrink: 0;
- }
- .mp-header__meta strong {
- display: block;
- font-size: 15px;
- }
- .mp-header__meta p {
- font-size: 12px;
- opacity: 0.88;
- margin-top: 2px;
- }
- .mp-header__search {
- min-height: 44px;
- background: #fff;
- border-radius: var(--radius-pill);
- display: flex;
- align-items: center;
- padding: 0 14px;
- color: var(--text-placeholder);
- font-size: 13px;
- gap: 8px;
- }
- .mp-header__search-dot {
- width: 16px;
- height: 16px;
- border-radius: 50%;
- border: 2px solid #c5d5cd;
- }
- /* ── 统计条(浮在 Header 下) ── */
- .mp-stats {
- margin: -12px var(--space-lg) var(--space-md);
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- padding: 14px 8px;
- box-shadow: var(--shadow-sm);
- position: relative;
- z-index: 2;
- }
- .mp-stats--4 {
- grid-template-columns: repeat(4, 1fr);
- }
- .mp-stat {
- text-align: center;
- padding: 0 4px;
- }
- .mp-stat strong {
- display: block;
- font-size: 20px;
- color: var(--brand-green-dark);
- line-height: 1.2;
- }
- .mp-stat span {
- display: block;
- font-size: 11px;
- color: var(--text-muted);
- margin-top: 4px;
- }
- /* ── Section ── */
- .mp-section {
- margin: var(--space-md) var(--space-lg);
- }
- .mp-section__head {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: var(--space-sm);
- }
- .mp-section__head h2 {
- font-size: 16px;
- font-weight: 700;
- }
- .mp-section__head a {
- font-size: 12px;
- color: var(--text-muted);
- }
- /* ── 四大模块入口宫格 ── */
- .mp-module-grid {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: var(--space-md);
- }
- .mp-module-card {
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- padding: var(--space-lg) var(--space-md);
- min-height: 108px;
- display: flex;
- flex-direction: column;
- gap: 8px;
- box-shadow: var(--shadow-sm);
- transition: transform 0.15s ease;
- }
- .mp-module-card:active {
- transform: scale(0.98);
- }
- .mp-module-card__icon {
- width: 40px;
- height: 40px;
- border-radius: var(--radius-md);
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 18px;
- font-weight: 700;
- color: #fff;
- }
- .mp-module-card--crm .mp-module-card__icon { background: linear-gradient(145deg, #0a9f6d, #11b37a); }
- .mp-module-card--bx .mp-module-card__icon { background: linear-gradient(145deg, #c9922f, #d6a343); }
- .mp-module-card--db .mp-module-card__icon { background: linear-gradient(145deg, #247a70, #2b8a7e); }
- .mp-module-card--pl .mp-module-card__icon { background: linear-gradient(145deg, #066b49, #087f57); }
- .mp-module-card strong {
- font-size: 15px;
- }
- .mp-module-card p {
- font-size: 11px;
- color: var(--text-muted);
- line-height: 1.4;
- }
- .mp-module-card__badge {
- align-self: flex-start;
- min-height: 22px;
- padding: 0 8px;
- border-radius: var(--radius-pill);
- background: var(--warning-soft);
- color: var(--warning);
- font-size: 10px;
- font-weight: 600;
- display: inline-flex;
- align-items: center;
- }
- /* ── 功能宫格(模块内二级入口) ── */
- .mp-tool-grid {
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- padding: var(--space-md);
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: var(--space-sm);
- }
- .mp-tool {
- min-height: 74px;
- border-radius: var(--radius-md);
- background: #f8fcfa;
- border: 1px solid var(--border-light);
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 6px;
- font-size: 11px;
- text-align: center;
- color: #4f5f58;
- padding: 6px 4px;
- }
- .mp-tool__icon {
- width: 28px;
- height: 28px;
- border-radius: var(--radius-sm);
- background: linear-gradient(145deg, #dff1e8, #cdebdc);
- }
- /* ── Tab 筛选条 ── */
- .mp-tabs {
- display: flex;
- gap: 8px;
- overflow-x: auto;
- padding-bottom: 2px;
- scrollbar-width: none;
- }
- .mp-tabs::-webkit-scrollbar {
- display: none;
- }
- .mp-tab {
- flex: 0 0 auto;
- min-height: 34px;
- padding: 0 14px;
- border-radius: var(--radius-pill);
- border: 1px solid var(--border);
- background: var(--surface);
- color: var(--text-muted);
- font-size: 12px;
- display: inline-flex;
- align-items: center;
- }
- .mp-tab.active {
- background: var(--brand-green-soft);
- border-color: #b7e6d0;
- color: var(--brand-green-dark);
- font-weight: 600;
- }
- /* ── 列表卡片 ── */
- .mp-list {
- display: flex;
- flex-direction: column;
- gap: var(--space-sm);
- }
- .mp-card {
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- padding: var(--space-md);
- box-shadow: var(--shadow-sm);
- }
- .mp-card__head {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: var(--space-sm);
- margin-bottom: 8px;
- }
- .mp-card__title {
- font-size: 14px;
- font-weight: 600;
- line-height: 1.35;
- }
- .mp-card__sub {
- font-size: 12px;
- color: var(--text-muted);
- margin-top: 2px;
- }
- .mp-card__row {
- display: flex;
- justify-content: space-between;
- gap: var(--space-md);
- font-size: 12px;
- color: var(--text-muted);
- margin-bottom: 6px;
- }
- .mp-card__foot {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: var(--space-sm);
- margin-top: 10px;
- padding-top: 10px;
- border-top: 1px solid var(--border-light);
- }
- .mp-card__amount {
- font-size: 16px;
- font-weight: 700;
- color: #be7a12;
- }
- /* ── 状态标签 ── */
- .mp-tag {
- flex-shrink: 0;
- min-height: 24px;
- padding: 0 10px;
- border-radius: var(--radius-pill);
- font-size: 11px;
- font-weight: 600;
- display: inline-flex;
- align-items: center;
- }
- .mp-tag--success { background: var(--success-soft); color: var(--success); }
- .mp-tag--warning { background: var(--warning-soft); color: var(--warning); }
- .mp-tag--danger { background: var(--danger-soft); color: var(--danger); }
- .mp-tag--info { background: var(--info-soft); color: var(--info); }
- .mp-tag--muted { background: #f1f5f3; color: var(--text-muted); }
- /* ── 按钮 ── */
- .mp-btn {
- min-height: 34px;
- padding: 0 14px;
- border-radius: var(--radius-pill);
- font-size: 12px;
- font-weight: 600;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- white-space: nowrap;
- }
- .mp-btn--primary {
- background: var(--brand-green);
- color: #fff;
- }
- .mp-btn--ghost {
- background: #fff;
- color: var(--brand-green-dark);
- border: 1px solid #b7e6d0;
- }
- .mp-btn--danger {
- background: var(--danger-soft);
- color: var(--danger);
- border: 1px solid #fecaca;
- }
- /* ── KPI 迷你块(详情页) ── */
- .mp-kpi-row {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: var(--space-sm);
- }
- .mp-kpi {
- background: #f8fcfa;
- border: 1px solid var(--border-light);
- border-radius: var(--radius-md);
- padding: 10px 12px;
- }
- .mp-kpi label {
- display: block;
- font-size: 11px;
- color: var(--text-muted);
- }
- .mp-kpi strong {
- display: block;
- margin-top: 4px;
- font-size: 15px;
- color: var(--text-primary);
- }
- /* ── 详情键值 ── */
- .mp-kv-list {
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- overflow: hidden;
- }
- .mp-kv {
- display: flex;
- justify-content: space-between;
- gap: var(--space-lg);
- padding: 12px var(--space-md);
- font-size: 13px;
- border-bottom: 1px solid var(--border-light);
- }
- .mp-kv:last-child {
- border-bottom: none;
- }
- .mp-kv span:first-child {
- color: var(--text-muted);
- flex-shrink: 0;
- }
- .mp-kv span:last-child {
- text-align: right;
- color: var(--text-primary);
- word-break: break-all;
- }
- /* ── 待办条 ── */
- .mp-todo {
- display: flex;
- align-items: center;
- gap: var(--space-md);
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-md);
- padding: 12px;
- }
- .mp-todo__dot {
- width: 8px;
- height: 8px;
- border-radius: 50%;
- background: var(--warning);
- flex-shrink: 0;
- }
- .mp-todo__body {
- flex: 1;
- min-width: 0;
- }
- .mp-todo__body strong {
- display: block;
- font-size: 13px;
- }
- .mp-todo__body span {
- font-size: 11px;
- color: var(--text-muted);
- }
- /* ── 底部 TabBar ── */
- .mp-tabbar {
- position: fixed;
- left: 50%;
- transform: translateX(-50%);
- bottom: 0;
- width: 100%;
- max-width: 420px;
- min-height: var(--tabbar-h);
- padding-bottom: var(--safe-bottom);
- background: var(--surface);
- border-top: 1px solid var(--border);
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- z-index: 100;
- }
- .mp-tabbar__item {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 2px;
- font-size: 10px;
- color: var(--text-muted);
- padding: 6px 0;
- }
- .mp-tabbar__item.active {
- color: var(--brand-green-dark);
- font-weight: 600;
- }
- .mp-tabbar__icon {
- width: 22px;
- height: 22px;
- border-radius: 6px;
- background: #e8f3ee;
- }
- .mp-tabbar__item.active .mp-tabbar__icon {
- background: linear-gradient(145deg, #0a9f6d, #11b37a);
- }
- /* ── 工作台:业务大模块区块 ── */
- .mp-module-block {
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- overflow: hidden;
- box-shadow: var(--shadow-sm);
- }
- .mp-module-block + .mp-module-block {
- margin-top: var(--space-md);
- }
- .mp-module-block__head {
- display: flex;
- align-items: center;
- gap: var(--space-sm);
- padding: 12px var(--space-md);
- border-bottom: 1px solid var(--border-light);
- background: #fafcfb;
- }
- .mp-module-block__icon {
- width: 32px;
- height: 32px;
- border-radius: var(--radius-sm);
- color: #fff;
- font-size: 11px;
- font-weight: 700;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- }
- .mp-module-block--crm .mp-module-block__icon { background: linear-gradient(145deg, #0a9f6d, #11b37a); }
- .mp-module-block--bx .mp-module-block__icon { background: linear-gradient(145deg, #c9922f, #d6a343); }
- .mp-module-block--db .mp-module-block__icon { background: linear-gradient(145deg, #247a70, #2b8a7e); }
- .mp-module-block--pl .mp-module-block__icon { background: linear-gradient(145deg, #066b49, #087f57); }
- .mp-module-block__head h2 {
- font-size: 15px;
- font-weight: 700;
- }
- .mp-module-block__head p {
- font-size: 11px;
- color: var(--text-muted);
- margin-top: 2px;
- }
- .mp-module-block__title-wrap {
- flex: 1;
- min-width: 0;
- }
- /* ── 工作台:业务菜单卡片(模块内) ── */
- .mp-menu-grid {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 1px;
- background: var(--border-light);
- }
- .mp-menu-card {
- min-height: 78px;
- background: var(--surface);
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 6px;
- padding: 10px 6px;
- text-align: center;
- transition: background 0.15s ease;
- }
- .mp-menu-card:active {
- background: #f4fbf8;
- }
- .mp-menu-card__icon {
- width: 30px;
- height: 30px;
- border-radius: var(--radius-sm);
- background: linear-gradient(145deg, #e8f5ef, #d9efe5);
- }
- .mp-module-block--bx .mp-menu-card__icon { background: linear-gradient(145deg, #faf0dc, #f3e4c4); }
- .mp-module-block--db .mp-menu-card__icon { background: linear-gradient(145deg, #dff0ee, #cce5e2); }
- .mp-module-block--pl .mp-menu-card__icon { background: linear-gradient(145deg, #dff1e8, #c8e8d8); }
- .mp-menu-card__name {
- font-size: 11px;
- color: #3f4f48;
- line-height: 1.35;
- }
- .mp-menu-card--disabled {
- opacity: 0.45;
- pointer-events: none;
- }
- /* ── 占位页(首页 / 待办 暂未开发) ── */
- .mp-placeholder {
- min-height: calc(100vh - var(--tabbar-h) - 120px);
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 40px 24px;
- text-align: center;
- }
- .mp-placeholder__icon {
- width: 88px;
- height: 88px;
- border-radius: 50%;
- background: linear-gradient(145deg, #edf5f1, #dcebe4);
- margin-bottom: 16px;
- }
- .mp-placeholder h2 {
- font-size: 17px;
- margin-bottom: 8px;
- }
- .mp-placeholder p {
- font-size: 13px;
- color: var(--text-muted);
- line-height: 1.6;
- }
- .mp-placeholder .mp-tag {
- margin-top: 14px;
- }
- /* ── 我的(个人中心) ── */
- .mp-profile-hero {
- background: var(--header-gradient);
- color: #fff;
- padding: calc(20px + env(safe-area-inset-top, 0px)) var(--space-lg) 28px;
- border-bottom-left-radius: var(--radius-xl);
- border-bottom-right-radius: var(--radius-xl);
- box-shadow: var(--shadow-md);
- }
- .mp-profile-hero__user {
- display: flex;
- align-items: center;
- gap: var(--space-md);
- }
- .mp-profile-hero__avatar {
- width: 64px;
- height: 64px;
- border-radius: 50%;
- background: rgba(255, 255, 255, 0.22);
- border: 2px solid rgba(255, 255, 255, 0.4);
- }
- .mp-profile-hero__name {
- font-size: 20px;
- font-weight: 700;
- }
- .mp-profile-hero__dept {
- font-size: 12px;
- opacity: 0.88;
- margin-top: 4px;
- }
- .mp-profile-form {
- margin: -16px var(--space-lg) 0;
- position: relative;
- z-index: 2;
- }
- .mp-profile-panel {
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- overflow: hidden;
- box-shadow: var(--shadow-sm);
- }
- .mp-form-item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: var(--space-lg);
- padding: 14px var(--space-md);
- border-bottom: 1px solid var(--border-light);
- font-size: 14px;
- }
- .mp-form-item:last-child {
- border-bottom: none;
- }
- .mp-form-item label {
- color: var(--text-muted);
- flex-shrink: 0;
- }
- .mp-form-item input {
- flex: 1;
- min-width: 0;
- border: none;
- text-align: right;
- font-size: 14px;
- color: var(--text-primary);
- background: transparent;
- outline: none;
- }
- .mp-form-item input::placeholder {
- color: var(--text-placeholder);
- }
- .mp-profile-actions {
- margin: var(--space-lg);
- display: flex;
- flex-direction: column;
- gap: var(--space-sm);
- }
- .mp-btn--block {
- width: 100%;
- min-height: 44px;
- border-radius: var(--radius-md);
- font-size: 15px;
- }
- /* ── 筛选条 ── */
- .mp-filter {
- display: flex;
- gap: 8px;
- margin-bottom: var(--space-sm);
- }
- .mp-filter__input {
- flex: 1;
- min-height: 40px;
- border-radius: var(--radius-pill);
- border: 1px solid var(--border);
- background: var(--surface);
- padding: 0 14px;
- font-size: 13px;
- color: var(--text-placeholder);
- display: flex;
- align-items: center;
- }
- .mp-filter__btn {
- min-width: 72px;
- min-height: 40px;
- border-radius: var(--radius-pill);
- background: var(--brand-green);
- color: #fff;
- font-size: 13px;
- font-weight: 600;
- }
- /* ── 空态(方案 B · 插画文件夹,对齐 miniprogram/components/mp-empty) ── */
- .mp-empty {
- text-align: center;
- padding: 40px 20px 32px;
- color: var(--text-muted);
- font-size: 13px;
- }
- .mp-empty__art {
- position: relative;
- width: 148px;
- height: 112px;
- margin: 0 auto 18px;
- }
- .mp-empty__shadow {
- position: absolute;
- left: 24px;
- right: 24px;
- bottom: 6px;
- height: 12px;
- border-radius: 50%;
- background: rgba(15, 30, 25, 0.08);
- }
- .mp-empty__folder {
- position: absolute;
- left: 50%;
- top: 10px;
- transform: translateX(-50%);
- width: 108px;
- height: 78px;
- }
- .mp-empty__folder-tab {
- position: absolute;
- left: 10px;
- top: -10px;
- width: 38px;
- height: 16px;
- border-radius: 8px 8px 0 0;
- background: #87d4b0;
- }
- .mp-empty__folder-back {
- position: absolute;
- inset: 0;
- border-radius: 12px 12px 14px 14px;
- background: linear-gradient(160deg, #b7e6d2, #7dcea0);
- }
- .mp-empty__folder-front {
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
- height: 58px;
- border-radius: 10px 14px 14px 14px;
- background: linear-gradient(180deg, #ecfdf5, #dff7ec);
- border: 1px solid rgba(8, 127, 87, 0.18);
- box-shadow: 0 8px 18px rgba(10, 159, 109, 0.12);
- }
- .mp-empty__lines {
- position: absolute;
- left: 18px;
- right: 18px;
- top: 18px;
- }
- .mp-empty__line {
- display: block;
- height: 6px;
- border-radius: 999px;
- background: #cfe9dc;
- margin-bottom: 8px;
- }
- .mp-empty__line--mid { width: 70%; }
- .mp-empty__line--short { width: 48%; margin-bottom: 0; }
- .mp-empty__title {
- display: block;
- font-size: 15px;
- font-weight: 650;
- color: var(--text-primary);
- }
- .mp-empty__desc {
- display: block;
- margin-top: 8px;
- font-size: 12px;
- color: var(--text-muted);
- line-height: 1.55;
- }
- .mp-empty__actions {
- margin-top: 18px;
- display: flex;
- justify-content: center;
- gap: 10px;
- flex-wrap: wrap;
- }
- .mp-empty__icon {
- width: 64px;
- height: 64px;
- margin: 0 auto 12px;
- border-radius: 14px;
- background: linear-gradient(160deg, #b7e6d2, #7dcea0);
- position: relative;
- }
- .mp-empty__icon::before {
- content: '';
- position: absolute;
- left: 10px;
- top: -6px;
- width: 22px;
- height: 10px;
- border-radius: 6px 6px 0 0;
- background: #87d4b0;
- }
- .mp-empty__icon::after {
- content: '';
- position: absolute;
- left: 6px;
- right: 6px;
- bottom: 8px;
- height: 34px;
- border-radius: 8px 10px 10px 10px;
- background: linear-gradient(180deg, #ecfdf5, #dff7ec);
- border: 1px solid rgba(8, 127, 87, 0.16);
- }
- /* ══════════════════════════════════════════
- UI Kit · 业务页通用组件(列表 / 查看 / 表单)
- ══════════════════════════════════════════ */
- /* ── 业务子页导航栏(无渐变 Header 的精简顶栏) ── */
- .mp-navbar {
- position: sticky;
- top: 0;
- z-index: 50;
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: var(--space-md);
- min-height: 48px;
- padding: calc(6px + env(safe-area-inset-top, 0px)) var(--space-lg) 6px;
- background: var(--surface);
- border-bottom: 1px solid var(--border-light);
- }
- .mp-navbar__back {
- min-width: 44px;
- min-height: 44px;
- display: inline-flex;
- align-items: center;
- font-size: 14px;
- color: var(--brand-green-dark);
- margin-left: -8px;
- }
- .mp-navbar__title {
- flex: 1;
- text-align: center;
- font-size: 16px;
- font-weight: 700;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .mp-navbar__action {
- min-width: 44px;
- min-height: 44px;
- display: inline-flex;
- align-items: center;
- justify-content: flex-end;
- font-size: 13px;
- color: var(--brand-green-dark);
- font-weight: 600;
- }
- /* ── 列表:可点击卡片(整卡跳转查看) ── */
- .mp-card--clickable {
- transition: transform 0.12s ease, box-shadow 0.12s ease;
- }
- .mp-card--clickable:active {
- transform: scale(0.985);
- box-shadow: 0 2px 8px rgba(10, 159, 109, 0.08);
- }
- .mp-card--accent {
- border-left: 3px solid var(--brand-green);
- }
- .mp-card__chevron {
- color: #c5d5cd;
- font-size: 16px;
- line-height: 1;
- flex-shrink: 0;
- }
- .mp-list-end {
- text-align: center;
- padding: 16px 0 8px;
- font-size: 12px;
- color: var(--text-placeholder);
- }
- /* ── 详情页 Hero ── */
- .mp-detail-hero {
- margin: var(--space-md) var(--space-lg) 0;
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- padding: var(--space-lg);
- box-shadow: var(--shadow-sm);
- }
- .mp-detail-hero__top {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: var(--space-sm);
- margin-bottom: 10px;
- }
- .mp-detail-hero__title {
- font-size: 17px;
- font-weight: 700;
- line-height: 1.35;
- }
- .mp-detail-hero__sub {
- font-size: 12px;
- color: var(--text-muted);
- margin-top: 4px;
- }
- .mp-detail-hero__amount {
- font-size: 22px;
- font-weight: 700;
- color: #be7a12;
- margin-top: 8px;
- }
- .mp-detail-hero__meta {
- display: flex;
- flex-wrap: wrap;
- gap: 8px;
- margin-top: 10px;
- }
- .mp-detail-hero__chip {
- font-size: 11px;
- color: var(--text-muted);
- background: #f4f9f7;
- border: 1px solid var(--border-light);
- border-radius: var(--radius-pill);
- padding: 4px 10px;
- }
- /* ── 详情分块 ── */
- .mp-block {
- margin: var(--space-md) var(--space-lg);
- }
- .mp-block__title {
- font-size: 14px;
- font-weight: 700;
- margin-bottom: var(--space-sm);
- padding-left: 10px;
- border-left: 3px solid var(--brand-green);
- }
- .mp-block__panel {
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- overflow: hidden;
- }
- /* ── 详情表格型子表 ── */
- .mp-mini-table {
- width: 100%;
- border-collapse: collapse;
- font-size: 12px;
- }
- .mp-mini-table th,
- .mp-mini-table td {
- padding: 10px 12px;
- border-bottom: 1px solid var(--border-light);
- text-align: left;
- }
- .mp-mini-table th {
- background: #f8fcfa;
- color: var(--text-muted);
- font-weight: 600;
- }
- .mp-mini-table tr:last-child td {
- border-bottom: none;
- }
- /* ── 审批时间线 ── */
- .mp-timeline {
- padding: 4px var(--space-md) 12px;
- }
- .mp-timeline__item {
- display: flex;
- gap: 12px;
- padding: 10px 0;
- position: relative;
- }
- .mp-timeline__item:not(:last-child)::before {
- content: '';
- position: absolute;
- left: 5px;
- top: 24px;
- bottom: -4px;
- width: 2px;
- background: var(--border-light);
- }
- .mp-timeline__dot {
- width: 12px;
- height: 12px;
- border-radius: 50%;
- background: var(--brand-green);
- border: 2px solid var(--brand-green-soft);
- flex-shrink: 0;
- margin-top: 4px;
- }
- .mp-timeline__dot--muted {
- background: #c5d5cd;
- border-color: #edf5f1;
- }
- .mp-timeline__body strong {
- display: block;
- font-size: 13px;
- }
- .mp-timeline__body span {
- display: block;
- font-size: 11px;
- color: var(--text-muted);
- margin-top: 2px;
- }
- .mp-timeline__body p {
- font-size: 12px;
- color: var(--text-primary);
- margin-top: 4px;
- }
- /* ── 附件卡片 ── */
- .mp-attach-row {
- display: flex;
- flex-wrap: wrap;
- gap: 10px;
- padding: 12px;
- }
- .mp-attach-card {
- width: 88px;
- display: flex;
- flex-direction: column;
- gap: 6px;
- align-items: center;
- text-align: center;
- }
- .mp-attach-card__thumb {
- width: 72px;
- height: 72px;
- border-radius: var(--radius-md);
- border: 1px solid var(--border);
- background: #f4f9f7;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 11px;
- color: var(--text-muted);
- }
- .mp-attach-card__name {
- font-size: 10px;
- color: var(--text-muted);
- line-height: 1.3;
- word-break: break-all;
- }
- .mp-attach-upload {
- width: 72px;
- height: 72px;
- border-radius: var(--radius-md);
- border: 1px dashed #a7d9c4;
- background: #f8fcfa;
- color: var(--brand-green-dark);
- font-size: 11px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 4px;
- }
- .mp-attach-upload__plus {
- font-size: 20px;
- line-height: 1;
- }
- /* ── 表单页:分组 + 字段 ── */
- .mp-form-page {
- padding-bottom: calc(72px + var(--safe-bottom));
- }
- .mp-form-group {
- margin: var(--space-md) var(--space-lg);
- }
- .mp-form-group__title {
- font-size: 13px;
- font-weight: 700;
- color: var(--text-muted);
- margin-bottom: var(--space-sm);
- }
- .mp-form-panel {
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- overflow: hidden;
- }
- /* 堆叠式:label 在上 */
- .mp-field {
- padding: 12px var(--space-md);
- border-bottom: 1px solid var(--border-light);
- }
- .mp-field:last-child {
- border-bottom: none;
- }
- .mp-field__label {
- display: flex;
- align-items: center;
- gap: 4px;
- font-size: 13px;
- color: var(--text-muted);
- margin-bottom: 8px;
- }
- .mp-field__label--required::before {
- content: '*';
- color: var(--danger);
- }
- .mp-field__tip {
- font-size: 11px;
- color: var(--text-placeholder);
- margin-left: 4px;
- }
- .mp-field__input,
- .mp-field__textarea {
- width: 100%;
- border: 1px solid var(--border);
- border-radius: var(--radius-sm);
- padding: 10px 12px;
- font-size: 14px;
- color: var(--text-primary);
- background: #fafcfb;
- outline: none;
- }
- .mp-field__input:focus,
- .mp-field__textarea:focus {
- border-color: #8fd4b8;
- box-shadow: 0 0 0 2px rgba(10, 159, 109, 0.12);
- }
- .mp-field__textarea {
- min-height: 88px;
- resize: vertical;
- line-height: 1.5;
- }
- .mp-field--error .mp-field__input,
- .mp-field--error .mp-field__textarea {
- border-color: #fca5a5;
- background: #fffafa;
- }
- .mp-field__error {
- font-size: 11px;
- color: var(--danger);
- margin-top: 6px;
- }
- /* 行式:label 左 value 右(选择器/只读) */
- .mp-field-row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: var(--space-lg);
- min-height: 50px;
- padding: 0 var(--space-md);
- border-bottom: 1px solid var(--border-light);
- font-size: 14px;
- }
- .mp-field-row:last-child {
- border-bottom: none;
- }
- .mp-field-row__label {
- color: var(--text-muted);
- flex-shrink: 0;
- }
- .mp-field-row__label--required::before {
- content: '* ';
- color: var(--danger);
- }
- .mp-field-row__value {
- flex: 1;
- text-align: right;
- color: var(--text-primary);
- display: flex;
- align-items: center;
- justify-content: flex-end;
- gap: 6px;
- }
- .mp-field-row__value.is-placeholder {
- color: var(--text-placeholder);
- }
- .mp-field-row__chevron {
- color: #c5d5cd;
- font-size: 14px;
- }
- .mp-field-row__switch {
- width: 44px;
- height: 26px;
- border-radius: var(--radius-pill);
- background: var(--brand-green);
- position: relative;
- flex-shrink: 0;
- }
- .mp-field-row__switch::after {
- content: '';
- position: absolute;
- top: 3px;
- right: 3px;
- width: 20px;
- height: 20px;
- border-radius: 50%;
- background: #fff;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
- }
- .mp-field-row__switch--off {
- background: #d1ddd7;
- }
- .mp-field-row__switch--off::after {
- right: auto;
- left: 3px;
- }
- /* ── 底部固定操作栏 ── */
- .mp-footer-bar {
- position: fixed;
- left: 50%;
- transform: translateX(-50%);
- bottom: 0;
- width: 100%;
- max-width: 420px;
- padding: 10px var(--space-lg) calc(10px + var(--safe-bottom));
- background: var(--surface);
- border-top: 1px solid var(--border);
- display: flex;
- gap: 10px;
- z-index: 90;
- }
- .mp-footer-bar .mp-btn {
- flex: 1;
- min-height: 44px;
- border-radius: var(--radius-md);
- font-size: 15px;
- }
- .mp-footer-bar .mp-btn--ghost {
- flex: 0 0 96px;
- }
- /* ── 遮罩层 ── */
- .mp-overlay {
- position: fixed;
- inset: 0;
- background: rgba(15, 23, 20, 0.45);
- z-index: 200;
- opacity: 0;
- visibility: hidden;
- transition: opacity 0.2s ease, visibility 0.2s ease;
- }
- .mp-overlay.is-open {
- opacity: 1;
- visibility: visible;
- }
- /* ── 底部抽屉(查看 / 选择) ── */
- .mp-sheet {
- position: fixed;
- left: 50%;
- transform: translateX(-50%) translateY(100%);
- bottom: 0;
- width: 100%;
- max-width: 420px;
- max-height: 88vh;
- background: var(--bg-page);
- border-top-left-radius: var(--radius-xl);
- border-top-right-radius: var(--radius-xl);
- z-index: 210;
- transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
- display: flex;
- flex-direction: column;
- overflow: hidden;
- }
- .mp-sheet.is-open {
- transform: translateX(-50%) translateY(0);
- }
- .mp-sheet__handle {
- width: 36px;
- height: 4px;
- border-radius: var(--radius-pill);
- background: #d1ddd7;
- margin: 10px auto 6px;
- flex-shrink: 0;
- }
- .mp-sheet__head {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 4px var(--space-lg) 12px;
- background: var(--surface);
- border-bottom: 1px solid var(--border-light);
- flex-shrink: 0;
- }
- .mp-sheet__title {
- font-size: 16px;
- font-weight: 700;
- }
- .mp-sheet__close {
- min-width: 44px;
- min-height: 44px;
- display: inline-flex;
- align-items: center;
- justify-content: flex-end;
- font-size: 13px;
- color: var(--text-muted);
- }
- .mp-sheet__body {
- flex: 1;
- overflow-y: auto;
- padding-bottom: calc(12px + var(--safe-bottom));
- }
- .mp-sheet__foot {
- flex-shrink: 0;
- padding: 10px var(--space-lg) calc(10px + var(--safe-bottom));
- background: var(--surface);
- border-top: 1px solid var(--border);
- display: flex;
- gap: 10px;
- }
- .mp-sheet__foot .mp-btn {
- flex: 1;
- min-height: 44px;
- border-radius: var(--radius-md);
- font-size: 15px;
- }
- /* ── 居中确认弹窗 ── */
- .mp-dialog {
- position: fixed;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%) scale(0.92);
- width: calc(100% - 48px);
- max-width: 320px;
- background: var(--surface);
- border-radius: var(--radius-lg);
- z-index: 220;
- opacity: 0;
- visibility: hidden;
- transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
- overflow: hidden;
- }
- .mp-dialog.is-open {
- opacity: 1;
- visibility: visible;
- transform: translate(-50%, -50%) scale(1);
- }
- .mp-dialog__body {
- padding: 24px 20px 16px;
- text-align: center;
- }
- .mp-dialog__title {
- font-size: 16px;
- font-weight: 700;
- margin-bottom: 8px;
- }
- .mp-dialog__text {
- font-size: 13px;
- color: var(--text-muted);
- line-height: 1.6;
- }
- .mp-dialog__foot {
- display: grid;
- grid-template-columns: 1fr 1fr;
- border-top: 1px solid var(--border-light);
- }
- .mp-dialog__btn {
- min-height: 48px;
- font-size: 15px;
- color: var(--text-muted);
- }
- .mp-dialog__btn--primary {
- color: var(--brand-green-dark);
- font-weight: 700;
- border-left: 1px solid var(--border-light);
- }
- .mp-dialog__btn--danger {
- color: var(--danger);
- font-weight: 700;
- border-left: 1px solid var(--border-light);
- }
- /* ── 操作菜单(Action Sheet) ── */
- .mp-action-sheet {
- position: fixed;
- left: 50%;
- transform: translateX(-50%) translateY(100%);
- bottom: 0;
- width: 100%;
- max-width: 420px;
- z-index: 210;
- padding: 0 var(--space-md) calc(12px + var(--safe-bottom));
- transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
- }
- .mp-action-sheet.is-open {
- transform: translateX(-50%) translateY(0);
- }
- .mp-action-sheet__group {
- background: var(--surface);
- border-radius: var(--radius-lg);
- overflow: hidden;
- margin-bottom: 8px;
- }
- .mp-action-sheet__item {
- width: 100%;
- min-height: 52px;
- font-size: 15px;
- color: var(--text-primary);
- border-bottom: 1px solid var(--border-light);
- }
- .mp-action-sheet__item:last-child {
- border-bottom: none;
- }
- .mp-action-sheet__item--danger {
- color: var(--danger);
- }
- .mp-action-sheet__cancel {
- width: 100%;
- min-height: 52px;
- background: var(--surface);
- border-radius: var(--radius-lg);
- font-size: 15px;
- font-weight: 600;
- color: var(--text-muted);
- }
- /* ── Toast 提示 ── */
- .mp-toast {
- position: fixed;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- max-width: 260px;
- padding: 14px 20px;
- background: rgba(31, 42, 38, 0.88);
- color: #fff;
- border-radius: var(--radius-md);
- font-size: 14px;
- text-align: center;
- z-index: 300;
- opacity: 0;
- visibility: hidden;
- transition: opacity 0.2s ease, visibility 0.2s ease;
- }
- .mp-toast.is-open {
- opacity: 1;
- visibility: visible;
- }
- /* ── 骨架屏 ── */
- .mp-skeleton {
- background: linear-gradient(90deg, #edf5f1 25%, #f6faf8 50%, #edf5f1 75%);
- background-size: 200% 100%;
- animation: mp-skeleton-shine 1.2s ease-in-out infinite;
- border-radius: var(--radius-sm);
- }
- @keyframes mp-skeleton-shine {
- 0% { background-position: 200% 0; }
- 100% { background-position: -200% 0; }
- }
- .mp-skeleton-card {
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-lg);
- padding: var(--space-md);
- }
- .mp-skeleton-line {
- height: 14px;
- margin-bottom: 8px;
- }
- .mp-skeleton-line--short {
- width: 60%;
- }
- .mp-skeleton-line--title {
- height: 16px;
- width: 75%;
- margin-bottom: 12px;
- }
- /* ── Pattern 索引卡片 ── */
- .mp-pattern-note {
- margin: var(--space-md) var(--space-lg);
- padding: 12px 14px;
- background: var(--brand-green-soft);
- border: 1px solid #b7e6d0;
- border-radius: var(--radius-md);
- font-size: 12px;
- color: var(--brand-green-dark);
- line-height: 1.6;
- }
- .mp-pattern-note strong {
- display: block;
- margin-bottom: 4px;
- font-size: 13px;
- }
|