design.css
17.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
:root {
--uj-primary: #2b5ce6;
--uj-primary-hover: #4b75ea;
--uj-brand-1: #0b1437;
--uj-brand-2: #16245a;
--uj-bg: #f4f6fa;
--uj-surface: #ffffff;
--uj-border: #e8ecf3;
--uj-divider: #eef1f6;
--uj-text-1: #1d2533;
--uj-text-2: #4a5568;
--uj-text-3: #8a94a6;
--uj-success: #16a34a;
--uj-warning: #d97706;
--uj-error: #e5484d;
--uj-shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -10px rgba(16, 24, 40, 0.12);
--uj-shadow-pop: 0 12px 40px -12px rgba(16, 24, 40, 0.2);
--uj-radius: 10px;
}
* {
box-sizing: border-box;
}
/* 纤细克制的滚动条 */
* {
scrollbar-width: thin;
scrollbar-color: #c9d2e0 transparent;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-thumb {
background: #c9d2e0;
border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
background: #aeb9cc;
}
::-webkit-scrollbar-track {
background: transparent;
}
/* 品牌渐变 */
.uj-brand-gradient {
background: linear-gradient(160deg, #0b1437 0%, #16245a 100%);
}
/* Sider 菜单:胶囊态选中 + 隐藏默认右侧指示条 */
.uj-sider .ant-menu-inline .ant-menu-item {
border-radius: 8px;
margin-top: 4px;
}
.uj-sider .ant-menu-inline .ant-menu-item-selected::after {
display: none;
}
.uj-sider .ant-menu-inline .ant-menu-item-selected {
font-weight: 600;
}
/* ============ 登录页 ============ */
.uj-login-wrap {
min-height: 100vh;
display: flex;
}
.uj-login-aside {
position: relative;
overflow: hidden;
width: 38%;
max-width: 520px;
min-width: 360px;
background: linear-gradient(160deg, #0b1437 0%, #16245a 100%);
color: #fff;
padding: 48px 44px;
display: flex;
flex-direction: column;
}
.uj-login-brand {
display: flex;
align-items: center;
gap: 14px;
font-size: 20px;
font-weight: 700;
letter-spacing: 1px;
}
.uj-login-hero {
margin-top: auto;
}
.uj-login-hero h1 {
font-size: 34px;
line-height: 1.3;
font-weight: 800;
margin: 0 0 16px;
letter-spacing: 0.5px;
}
.uj-login-hero p {
color: rgba(255, 255, 255, 0.7);
font-size: 15px;
line-height: 1.8;
max-width: 420px;
}
.uj-login-feats {
list-style: none;
padding: 0;
margin: 28px 0 0;
display: flex;
flex-direction: column;
gap: 14px;
}
.uj-login-feats li {
display: flex;
align-items: center;
gap: 10px;
color: rgba(255, 255, 255, 0.85);
font-size: 14px;
}
.uj-login-main {
position: relative;
overflow: hidden;
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: #f4f6fa;
padding: 40px;
}
/* 右侧背景点缀:两枚低透明度柔光圆斑 + 极淡点阵,克制不抢眼 */
.uj-login-main::before,
.uj-login-main::after {
content: '';
position: absolute;
border-radius: 50%;
filter: blur(80px);
z-index: 0;
pointer-events: none;
}
.uj-login-main::before {
width: 360px;
height: 360px;
right: -80px;
top: -100px;
background: rgba(91, 141, 239, 0.16);
}
.uj-login-main::after {
width: 320px;
height: 320px;
left: -90px;
bottom: -120px;
background: rgba(43, 92, 230, 0.12);
}
.uj-login-main {
background-image: radial-gradient(rgba(20, 36, 90, 0.05) 1px, transparent 1px);
background-size: 22px 22px;
}
.uj-login-card {
position: relative;
z-index: 1;
width: 440px;
max-width: 100%;
background: #fff;
border-radius: 18px;
padding: 48px 44px;
box-shadow: var(--uj-shadow-pop);
border: 1px solid #eef1f6;
}
@media (max-width: 880px) {
.uj-login-aside {
display: none;
}
}
/* ============ 应用骨架:Sider ============ */
.uj-sider {
position: relative;
display: flex;
flex-direction: column;
/* 垂直、低饱和、matte 深蓝:比原 160° 对角渐变更稳重、更有层次但不「动」。 */
background: linear-gradient(180deg, #0e1736 0%, #111b3d 55%, #0e1631 100%);
box-shadow: 4px 0 24px -12px rgba(6, 12, 38, 0.55);
/* 侧边菜单不再有 CSS 旋钮:高度 / 左右留白 / 圆角 / 图标尺寸 / 折叠宽度
全部写在 themeConfig.ts 的 components.Menu token 里,由组件自身参与计算。 */
}
.uj-sider > .ant-layout-sider-children {
display: flex;
flex-direction: column;
height: 100%;
}
/* 品牌区 */
.uj-sider-brand {
height: 64px;
flex: none;
display: flex;
align-items: center;
gap: 12px;
padding: 0 18px;
border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.uj-sider-brand.is-collapsed {
justify-content: center;
padding: 0;
}
.uj-sider-brand-text {
display: flex;
flex-direction: column;
line-height: 1.25;
white-space: nowrap;
overflow: hidden;
}
.uj-sider-brand-text .t {
color: #fff;
font-size: 15px;
font-weight: 700;
letter-spacing: 1px;
}
.uj-sider-brand-text .s {
color: rgba(255, 255, 255, 0.38);
font-size: 10px;
letter-spacing: 0.6px;
text-transform: uppercase;
}
/* 菜单滚动区:只负责接管滚动与隐藏滚动条。
横向留白不再由这里承担 —— 由 Menu 的 itemMarginInline token 承担(见 themeConfig.ts)。
加 scrollbar-gutter: stable both-edges:即使滚动条真的占了宽度,
浏览器也会在**两侧同时**预留相同空间,左右不会因此失对称。 */
.uj-sider-menu {
flex: 1;
min-height: 0;
overflow-y: auto;
padding-block: 12px 8px;
padding-inline: 0;
scrollbar-gutter: stable both-edges;
scrollbar-width: none;
}
.uj-sider-menu::-webkit-scrollbar {
width: 0;
height: 0;
}
/* 菜单:本文件**只做主题着色**。
所有几何量(高度、左右留白、内间距、圆角、图标尺寸、折叠宽度)都不在此覆盖,
改由 ConfigProvider 的 Menu token 下发(见 src/theme/themeConfig.ts 的 components.Menu)——
那是 antd 官方认可的定制入口,组件内部的宽度/居中计算会跟着 token 一起重算,不会互相打架。
折叠态的图标居中尤其依赖这一点:antd 原生用 marginInline + paddingInline:calc(50% - 图标宽/2 - margin),
任何对 width / padding-inline 的 CSS 覆盖都会把它算歪。 */
.uj-menu.ant-menu-dark {
background: transparent;
}
/* 分组标题:只有字重/字距/大小写没有对应 token,故保留这三项;
字号与颜色已移到 themeConfig 的 groupTitleFontSize / darkGroupTitleColor。
间距一律不写——antd 自身会让标题与菜单项对齐,手动设 padding 反而容易错位。 */
.uj-menu.ant-menu-dark .ant-menu-item-group-title {
font-weight: 600;
letter-spacing: 2px;
text-transform: uppercase;
}
/* 选中态左侧指示条:用 inset 阴影画,不占盒模型空间,
因此不会改变组件的宽高,也不会干扰折叠态的居中计算。 */
.uj-menu.ant-menu-dark .ant-menu-item-selected {
box-shadow: inset 3px 0 0 0 #5b8def;
}
/* 收起态隐藏分组标题 —— 这是本区块唯一一处非颜色覆盖:
antd 折叠时并不隐藏分组标题,只做 text-overflow 省略(会留下比如「门…」这样的小字),
企业后台通常选择直接隐藏。若你想要组件原生行为,删掉这三条即可。 */
.uj-menu.ant-menu-inline-collapsed .ant-menu-item-group-title {
display: none;
}
/* ============ 应用骨架:Header ============ */
.uj-header {
height: 64px;
display: flex;
align-items: center;
gap: 16px;
padding-inline: 20px !important;
background: rgba(255, 255, 255, 0.86) !important;
backdrop-filter: blur(8px);
border-bottom: 1px solid #eef1f6;
}
.uj-header-left {
display: flex;
align-items: center;
gap: 8px;
white-space: nowrap;
}
.uj-header-fold {
font-size: 18px;
color: #4a5568;
margin-inline-end: 4px;
}
.uj-header-fold:hover {
color: #2b5ce6 !important;
background: #f2f4f9 !important;
}
/* 面包屑:antd Breadcrumb 承载结构,这里只定字号(末级=页题,其余=分组) */
.uj-header-crumb {
white-space: nowrap;
}
.uj-crumb-parent {
font-size: 13px;
color: #8a94a6;
}
.uj-crumb-current {
font-size: 16px;
font-weight: 600;
color: #1d2533;
}
/* 全局搜索:胶囊态,聚焦浮现品牌色描边 */
.uj-header-search {
position: relative;
flex: 1;
max-width: 420px;
margin-inline: auto;
}
.uj-header-search .ant-input-affix-wrapper {
height: 38px;
background: #f2f4f9;
border-radius: 999px;
padding: 0 14px;
display: flex;
align-items: center;
transition: all 0.25s ease;
}
.uj-header-search .ant-input-affix-wrapper .ant-input {
height: auto;
}
.uj-header-search .ant-input-affix-wrapper:hover,
.uj-header-search .ant-input-affix-wrapper-focused {
background: #fff;
box-shadow: 0 0 0 2px rgba(43, 92, 230, 0.14);
}
.uj-header-search-kbd {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
line-height: 1;
font-size: 11px;
color: #8a94a6;
background: #fff;
border: 1px solid #e2e7ef;
border-radius: 6px;
padding: 3px 7px;
pointer-events: none;
}
/* 右侧操作区 */
.uj-header-right {
display: flex;
align-items: center;
gap: 10px;
white-space: nowrap;
}
/* 图标按钮:antd Button type="text" 承载交互,这里只压掉默认内边距并定品牌悬浮色 */
.uj-header-icon-btn {
width: 34px;
height: 34px;
padding: 0;
border: none;
border-radius: 10px;
background: transparent !important;
color: #4a5568;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
}
.uj-header-icon-btn:hover {
background: #f2f4f9 !important;
color: #2b5ce6 !important;
}
.uj-header-divider {
width: 1px;
height: 22px;
background: #e8ecf3;
margin-inline: 2px;
}
.uj-header-user {
display: flex;
align-items: center;
gap: 10px;
border: none;
background: transparent;
cursor: pointer;
padding: 4px 8px 4px 4px;
border-radius: 999px;
transition: background 0.2s ease;
}
.uj-header-user:hover {
background: #f2f4f9;
}
.uj-header-user-text {
display: flex;
flex-direction: column;
align-items: flex-start;
line-height: 1.25;
}
.uj-header-user-text .n {
font-size: 13px;
font-weight: 600;
color: #1d2533;
}
.uj-header-user-text .r {
font-size: 11px;
color: #8a94a6;
}
/* ============ 工作台 Dashboard ============ */
.uj-dash {
display: flex;
flex-direction: column;
gap: 18px;
}
/* 品牌欢迎条:浅色卡片 + 品牌色点睛。
旧版用 brandGradient(#0B1437→#16245A) 整条铺底,明度过低显得压抑;
现改为高明度底色,品牌感交给「小面积渐变方块 + 右上角柔光」承载。 */
.uj-dash-hero {
position: relative;
overflow: hidden;
border-radius: 16px;
padding: 26px 30px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
background: linear-gradient(120deg, #ffffff 0%, #f5f7ff 100%);
border: 1px solid rgba(43, 92, 230, 0.1);
box-shadow: 0 2px 10px rgba(16, 24, 64, 0.04);
}
/* 右上角品牌柔光:给浅底加层次,不占大面积 */
.uj-dash-hero::after {
content: '';
position: absolute;
right: -60px;
top: -80px;
width: 260px;
height: 260px;
border-radius: 50%;
background: radial-gradient(circle, rgba(43, 92, 230, 0.1) 0%, rgba(43, 92, 230, 0) 70%);
pointer-events: none;
}
.uj-dash-hero-id {
position: relative;
z-index: 1;
min-width: 0;
}
.uj-dash-hero-brand {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
letter-spacing: 1.4px;
font-weight: 500;
color: #2b5ce6;
}
.uj-dash-hero-mark {
width: 16px;
height: 16px;
border-radius: 5px;
flex: none;
background: linear-gradient(135deg, #2b5ce6, #5b8def);
box-shadow: 0 4px 10px rgba(43, 92, 230, 0.3);
}
.uj-dash-hero-title {
font-size: 24px;
font-weight: 700;
color: #1d2533;
line-height: 1.25;
margin: 12px 0 6px;
}
.uj-dash-hero-sub {
font-size: 13px;
color: #6b7688;
margin: 0;
}
.uj-dash-hero-meta {
position: relative;
z-index: 1;
display: flex;
gap: 10px;
flex: none;
}
.uj-dash-meta-item {
display: flex;
flex-direction: column;
gap: 3px;
min-width: 132px;
padding: 10px 14px;
border-radius: 10px;
background: rgba(43, 92, 230, 0.05);
border: 1px solid rgba(43, 92, 230, 0.08);
}
.uj-dash-meta-label {
font-size: 11px;
color: #8a94a6;
}
.uj-dash-meta-value {
font-size: 13px;
font-weight: 600;
color: #1d2533;
word-break: break-all;
}
/* KPI 行 */
.uj-dash-kpis {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
}
.uj-kpi {
position: relative;
overflow: hidden;
border-radius: 14px;
transition:
transform 0.2s ease,
box-shadow 0.2s ease;
}
.uj-kpi:hover {
transform: translateY(-3px);
box-shadow: 0 16px 30px -18px rgba(16, 24, 40, 0.28);
}
.uj-kpi-bar {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
border-radius: 4px 0 0 4px;
}
.uj-kpi-head {
display: flex;
align-items: center;
justify-content: space-between;
}
.uj-kpi-icon {
width: 40px;
height: 40px;
border-radius: 11px;
display: flex;
align-items: center;
justify-content: center;
font-size: 19px;
}
.uj-kpi-label {
margin-top: 14px;
font-size: 13px;
color: #8a94a6;
}
.uj-kpi-value {
font-size: 30px;
font-weight: 700;
color: #1d2533;
line-height: 1.2;
margin-top: 2px;
}
.uj-kpi-delta {
margin-top: 8px;
font-size: 12px;
font-weight: 600;
display: flex;
align-items: center;
}
/* 主区:趋势 + 侧栏 */
.uj-dash-main {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 16px;
align-items: stretch;
}
.uj-dash-trend {
border-radius: 14px;
}
.uj-dash-side {
display: flex;
flex-direction: column;
gap: 16px;
}
.uj-dash-side .ant-card {
border-radius: 14px;
}
/* 底部快捷 */
.uj-dash-foot {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
}
.uj-dash-foot-item {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
border: 1px solid #eef1f6;
border-radius: 12px;
padding: 16px 18px;
font-size: 14px;
color: #1d2533;
cursor: pointer;
transition: all 0.2s ease;
}
.uj-dash-foot-item:hover {
border-color: rgba(43, 92, 230, 0.4);
box-shadow: 0 10px 22px -16px rgba(43, 92, 230, 0.6);
}
/* ============ 工作台 · 欢迎页 ============ */
.uj-welcome-title {
font-size: 14px;
font-weight: 600;
color: #1d2533;
margin-bottom: 12px;
}
.uj-welcome-quick {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 16px;
}
.uj-quick-card {
border-radius: 14px;
transition:
transform 0.2s ease,
box-shadow 0.2s ease;
}
.uj-quick-card:hover {
transform: translateY(-3px);
box-shadow: 0 16px 30px -18px rgba(16, 24, 40, 0.28);
}
.uj-quick-icon {
width: 38px;
height: 38px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
background: #eef3ff;
color: #2b5ce6;
margin-bottom: 12px;
}
.uj-quick-label {
font-size: 14px;
font-weight: 600;
color: #1d2533;
}
.uj-quick-desc {
font-size: 12px;
color: #8a94a6;
line-height: 1.5;
margin-top: 4px;
min-height: 36px;
}
.uj-quick-go {
font-size: 12px;
color: #2b5ce6;
margin-top: 6px;
}
.uj-welcome-sec {
display: flex;
align-items: center;
gap: 14px;
}
.uj-welcome-sec-icon {
width: 36px;
height: 36px;
border-radius: 10px;
flex: none;
display: flex;
align-items: center;
justify-content: center;
font-size: 17px;
background: #fff7e6;
color: #ba7517;
}
/* ============ 个人资料页 ============ */
.uj-profile {
display: flex;
flex-direction: column;
gap: 16px;
}
/* 顶部身份横幅 */
.uj-profile-hero-inner {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px 24px;
padding: 22px 24px;
}
.uj-profile-hero-id {
display: flex;
align-items: center;
gap: 16px;
}
.uj-profile-avatar {
background: linear-gradient(135deg, #2b5ce6, #5b8def);
box-shadow: 0 6px 16px rgba(43, 92, 230, 0.28);
flex: none;
}
.uj-profile-name {
font-size: 18px;
font-weight: 600;
color: #1d2533;
line-height: 1.3;
}
.uj-profile-account {
font-size: 13px;
}
.uj-profile-hero-meta {
display: flex;
flex-wrap: wrap;
gap: 14px 36px;
}
.uj-profile-chip {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 120px;
}
.uj-profile-chip-label {
font-size: 12px;
color: #8a94a6;
}
.uj-profile-chip-value {
font-size: 13px;
font-weight: 500;
color: #1d2533;
}
/* 下方双栏(强制等高) */
.uj-profile-grid {
display: grid;
grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
gap: 16px;
align-items: stretch;
}
.uj-profile-info,
.uj-profile-security {
display: flex;
flex-direction: column;
}
.uj-profile-card-title {
font-weight: 600;
font-size: 15px;
color: #1d2533;
}
.uj-profile-rows {
flex: 1 1 auto;
margin-top: 4px;
}
.uj-profile-roles {
display: inline-flex;
flex-wrap: wrap;
gap: 4px;
justify-content: flex-end;
}
.uj-profile-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 12px 0;
border-bottom: 1px dashed #f0f3f8;
font-size: 13px;
}
.uj-profile-row:last-child {
border-bottom: none;
}
.uj-profile-label {
color: #8a94a6;
flex: none;
}
.uj-profile-value {
color: #1d2533;
text-align: right;
word-break: break-all;
}
.uj-profile-note {
margin-top: 14px;
padding-top: 14px;
border-top: 1px dashed #eef1f6;
font-size: 12px;
line-height: 1.6;
color: #aab2c0;
}
@media (max-width: 1100px) {
.uj-dash-kpis,
.uj-dash-foot {
grid-template-columns: repeat(2, 1fr);
}
.uj-dash-main {
grid-template-columns: 1fr;
}
.uj-dash-hero {
flex-direction: column;
align-items: flex-start;
padding: 22px 20px;
}
.uj-dash-hero-meta {
width: 100%;
}
.uj-profile-grid {
grid-template-columns: 1fr;
}
}