Files
BlackFruit-UI/clientarea/home/hgcloud_home/css/home.css
yiqiu 53c1cdccb8
All checks were successful
continuous-integration/drone/push Build is passing
redesign: 仪表盘全新高级简约风设计 — 完全重写布局和样式
- home.php: 三行卡片式网格布局(用户+统计/余额+推介/产品+工单)
- home.css: Stripe/Linear风格设计系统(16px圆角/微阴影/渐变头像/色彩标记统计卡)
- 响应式适配 @media 1200px 断点
- Element UI表格样式覆写
2026-03-20 21:39:27 +08:00

752 lines
12 KiB
CSS

/* ============================================
Dashboard — Premium Minimalist Design
============================================ */
/* --- Base --- */
.el-main {
padding: 0 !important;
}
.dashboard {
padding: 24px;
display: flex;
flex-direction: column;
gap: 20px;
max-width: 1440px;
margin: 0 auto;
}
/* --- Card Base --- */
.card {
background: #fff;
border-radius: 16px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
transition: box-shadow 0.2s ease;
}
.card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
/* ====== Row 1: User + Stats ====== */
.row-1 {
display: flex;
gap: 20px;
align-items: stretch;
}
/* -- User Card -- */
.card-user {
flex: 1;
padding: 28px 32px;
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: center;
gap: 20px;
}
.user-header {
display: flex;
align-items: center;
gap: 16px;
}
.user-avatar {
width: 56px;
height: 56px;
border-radius: 50%;
background: linear-gradient(135deg, #6366F1, #8B5CF6);
color: #fff;
font-size: 22px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
letter-spacing: 1px;
}
.user-greeting {
font-size: 18px;
color: #1a1a2e;
}
.user-greeting strong {
font-weight: 600;
}
.user-level {
margin-left: 6px;
font-size: 13px;
font-weight: 500;
}
.user-id {
font-size: 13px;
color: #9CA3AF;
margin-top: 2px;
}
.user-contacts {
display: flex;
gap: 24px;
}
.contact-item {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
color: #6B7280;
}
.contact-item i {
font-size: 16px;
color: #9CA3AF;
}
/* -- Stats Group -- */
.stats-group {
display: flex;
gap: 16px;
}
.card-stat {
width: 160px;
padding: 24px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
cursor: pointer;
text-align: center;
border-top: 3px solid transparent;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-stat:hover {
transform: translateY(-3px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.card-stat i {
font-size: 32px;
opacity: 0.7;
}
.stat-value {
font-size: 32px;
font-weight: 700;
letter-spacing: -1px;
line-height: 1;
}
.stat-label {
font-size: 12px;
color: #9CA3AF;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
}
/* Stat colors */
.stat-purple {
border-top-color: #8B5CF6;
}
.stat-purple i, .stat-purple .stat-value {
color: #8B5CF6;
}
.stat-blue {
border-top-color: #3B82F6;
}
.stat-blue i, .stat-blue .stat-value {
color: #3B82F6;
}
.stat-amber {
border-top-color: #F59E0B;
}
.stat-amber i, .stat-amber .stat-value {
color: #F59E0B;
}
/* ====== Row 2: Balance + Side ====== */
.row-2 {
display: flex;
gap: 20px;
align-items: flex-start;
}
/* -- Balance Card -- */
.card-balance {
flex: 1;
padding: 28px 32px;
}
.balance-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.balance-title {
font-size: 14px;
color: #6B7280;
font-weight: 500;
}
.balance-btn {
font-size: 13px;
color: #fff;
background: var(--color-primary, #3B82F6);
padding: 6px 16px;
border-radius: 999px;
cursor: pointer;
font-weight: 500;
transition: opacity 0.2s;
}
.balance-btn:hover {
opacity: 0.85;
}
.balance-amount {
font-size: 40px;
font-weight: 700;
color: #1a1a2e;
margin: 12px 0 4px;
line-height: 1.1;
letter-spacing: -1px;
}
.balance-amount .currency {
font-size: 24px;
margin-right: 4px;
font-weight: 500;
color: #6B7280;
}
.balance-extra {
margin-bottom: 8px;
}
.recharge-link {
font-size: 13px;
color: var(--color-primary, #3B82F6);
cursor: pointer;
}
.balance-footer {
display: flex;
align-items: center;
gap: 0;
padding-top: 20px;
margin-top: 20px;
border-top: 1px solid #F3F4F6;
}
.consume-item {
flex: 1;
display: flex;
align-items: center;
gap: 8px;
}
.consume-label {
font-size: 13px;
color: #9CA3AF;
}
.consume-value {
font-size: 14px;
font-weight: 600;
color: #1a1a2e;
}
.consume-divider {
width: 1px;
height: 16px;
background: #E5E7EB;
margin: 0 20px;
}
.trend-up {
font-size: 12px;
color: #10B981;
font-weight: 500;
}
.trend-down {
font-size: 12px;
color: #EF4444;
font-weight: 500;
}
/* Credit section */
.credit-section {
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid #F3F4F6;
display: flex;
flex-direction: column;
gap: 8px;
}
.credit-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.credit-label {
font-size: 13px;
color: #6B7280;
display: flex;
align-items: center;
gap: 6px;
}
.credit-val {
font-size: 14px;
font-weight: 600;
color: #1a1a2e;
}
.credit-tag {
font-size: 11px;
padding: 1px 6px;
border-radius: 4px;
border: 1px solid #E5E7EB;
color: #6B7280;
background: #F9FAFB;
}
/* Coin section */
.coin-section {
margin-top: 16px;
padding: 16px;
background: #F9FAFB;
border-radius: 10px;
}
.coin-header {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
color: #6B7280;
}
.coin-link {
font-size: 13px;
color: var(--color-primary, #3B82F6);
}
.coin-amount {
margin-top: 8px;
font-size: 24px;
font-weight: 700;
color: #1a1a2e;
}
/* Voucher */
.voucher-row {
margin-top: 12px;
font-size: 12px;
color: #9CA3AF;
}
.voucher-link {
color: var(--color-primary, #3B82F6);
margin-left: 4px;
}
/* -- Side Card (Cert + Referral) -- */
.card-side {
width: 420px;
flex-shrink: 0;
padding: 28px;
display: flex;
flex-direction: column;
gap: 20px;
}
/* Certification */
.cert-section {
display: flex;
flex-direction: column;
gap: 16px;
padding-bottom: 20px;
border-bottom: 1px solid #F3F4F6;
}
.cert-item {
display: flex;
align-items: center;
gap: 12px;
}
.cert-icon {
width: 40px;
height: 40px;
border-radius: 10px;
background: #F3F4F6;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.cert-icon i {
font-size: 20px;
color: #6B7280;
}
.cert-label {
font-size: 12px;
color: #9CA3AF;
}
.cert-value {
font-size: 14px;
color: #1a1a2e;
font-weight: 500;
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.cert-action {
font-size: 14px;
color: var(--color-primary, #3B82F6);
cursor: pointer;
font-weight: 500;
}
/* Referral Open */
.referral-open {
display: flex;
flex-direction: column;
gap: 16px;
}
.referral-title {
display: flex;
align-items: center;
justify-content: space-between;
}
.referral-title > span:first-child {
font-size: 16px;
font-weight: 600;
color: #1a1a2e;
}
.referral-reward {
font-size: 12px;
color: #fff;
background: linear-gradient(135deg, #EF4444, #F97316);
padding: 3px 10px;
border-radius: 999px;
cursor: pointer;
display: flex;
align-items: center;
gap: 4px;
}
.referral-reward i {
font-size: 14px;
}
.referral-url {
display: flex;
border: 1px solid #E5E7EB;
border-radius: 10px;
overflow: hidden;
}
.url-text {
flex: 1;
padding: 10px 14px;
font-size: 13px;
color: #6B7280;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
background: #F9FAFB;
}
.url-copy {
padding: 10px 20px;
font-size: 13px;
color: var(--color-primary, #3B82F6);
font-weight: 500;
cursor: pointer;
border-left: 1px solid #E5E7EB;
display: flex;
align-items: center;
transition: background 0.15s;
}
.url-copy:hover {
background: #F0F7FF;
}
.referral-stats {
display: flex;
gap: 12px;
}
.ref-stat {
flex: 1;
padding: 14px 16px;
background: #F9FAFB;
border-radius: 10px;
}
.ref-amount {
font-size: 20px;
font-weight: 700;
color: #1a1a2e;
}
.ref-label {
font-size: 12px;
color: #9CA3AF;
margin-top: 4px;
}
/* Referral Closed */
.referral-closed {
text-align: center;
padding: 24px 0;
}
.referral-closed > i {
font-size: 48px;
color: #D1D5DB;
}
.referral-closed h3 {
font-size: 16px;
color: #1a1a2e;
margin: 12px 0 4px;
}
.referral-closed p {
font-size: 13px;
color: #9CA3AF;
margin-bottom: 16px;
}
.referral-open-btn {
display: inline-block;
padding: 8px 24px;
background: var(--color-primary, #3B82F6);
color: #fff;
font-size: 13px;
border-radius: 999px;
cursor: pointer;
font-weight: 500;
}
.referral-disabled {
font-size: 13px;
color: #9CA3AF;
margin-top: 8px;
}
/* ====== Row 3: Products + Sidebar ====== */
.row-3 {
display: flex;
gap: 20px;
align-items: flex-start;
}
/* -- Products Card -- */
.card-products {
flex: 1;
padding: 28px 32px;
min-width: 0;
}
.section-title {
font-size: 16px;
font-weight: 600;
color: #1a1a2e;
margin: 0 0 20px;
}
.product-link {
color: var(--color-primary, #3B82F6);
font-weight: 500;
text-decoration: none;
}
.product-link:hover {
text-decoration: underline;
}
.text-danger {
color: #EF4444;
}
/* Empty state */
.empty-state {
text-align: center;
padding: 60px 0;
}
.empty-state > i {
font-size: 64px;
color: #D1D5DB;
}
.empty-state h3 {
font-size: 18px;
color: #374151;
margin: 16px 0 6px;
font-weight: 500;
}
.empty-state p {
font-size: 13px;
color: #9CA3AF;
margin-bottom: 20px;
}
.empty-state .el-button {
padding: 10px 28px;
font-size: 14px;
border: none;
background: var(--color-primary, #3B82F6);
color: #fff;
}
/* -- Sidebar Card -- */
.card-sidebar {
width: 360px;
flex-shrink: 0;
padding: 24px;
display: flex;
flex-direction: column;
gap: 24px;
}
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
}
.sidebar-header > span:first-child {
font-size: 15px;
font-weight: 600;
color: #1a1a2e;
}
.sidebar-more {
cursor: pointer;
font-size: 18px;
color: #9CA3AF;
letter-spacing: 2px;
padding: 2px 6px;
border-radius: 6px;
transition: background 0.15s;
}
.sidebar-more:hover {
background: #F3F4F6;
}
/* Tickets */
.ticket-list {
display: flex;
flex-direction: column;
gap: 10px;
}
.ticket-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
border-radius: 10px;
cursor: pointer;
transition: background 0.15s;
}
.ticket-item:hover {
background: #F9FAFB;
}
.ticket-status {
flex-shrink: 0;
font-size: 11px;
padding: 3px 8px;
border-radius: 6px;
color: #fff;
font-weight: 500;
}
.ticket-title {
font-size: 13px;
color: #374151;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ticket-dept {
font-size: 12px;
color: #9CA3AF;
}
/* Notices */
.notice-list {
display: flex;
flex-direction: column;
}
.notice-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px;
border-radius: 10px;
cursor: pointer;
transition: background 0.15s;
}
.notice-item:hover {
background: #F9FAFB;
}
.notice-title {
font-size: 13px;
color: #374151;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.notice-meta {
font-size: 12px;
color: #9CA3AF;
margin-top: 2px;
}
.notice-item > i {
font-size: 14px;
color: #D1D5DB;
flex-shrink: 0;
}
/* ====== Element UI Overrides ====== */
.card-products .el-table {
background: transparent;
color: #374151;
font-size: 13px;
}
.card-products .el-table th {
background: #F9FAFB !important;
color: #6B7280;
font-weight: 500;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.3px;
border-bottom: none !important;
}
.card-products .el-table td {
border-bottom: 1px solid #F3F4F6 !important;
}
.card-products .el-table tr:hover > td {
background: #FAFBFC !important;
}
.card-products .el-table::before {
display: none;
}
/* ====== Dialog ====== */
.open-dialog {
border-radius: 16px;
font-size: 14px;
}
.open-dialog .dialog-footer .btn-ok {
padding: 10px 24px;
background: var(--color-primary, #3B82F6);
border-radius: 999px;
color: #fff;
border: none;
}
.open-dialog .dialog-footer .btn-no {
padding: 10px 24px;
border-radius: 999px;
}
/* ====== WeChat ====== */
.wx-code {
position: fixed;
right: 30px;
bottom: 30px;
z-index: 100;
}
.wx-box .tit {
text-align: center;
font-size: 14px;
color: #374151;
margin-bottom: 10px;
}
.wx-box .img {
display: flex;
justify-content: center;
}
.wx-box .img img {
width: 160px;
height: 160px;
}
.wx-img {
width: 48px;
height: 48px;
border-radius: 50%;
background: #07C160;
cursor: pointer;
box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}
/* ====== Responsive ====== */
@media (max-width: 1200px) {
.row-1, .row-2, .row-3 {
flex-direction: column;
}
.stats-group {
width: 100%;
}
.card-side, .card-sidebar {
width: 100%;
}
.card-stat {
width: auto;
flex: 1;
}
}