/* ============================================ Dashboard — Design System Based on UI/UX Pro Max Skill guidelines: - 8dp spacing scale - Semantic color tokens - Consistent elevation scale - Type scale: 12/13/14/16/18/24/32 - Transition: 200ms ease-out - Contrast ratio >= 4.5:1 ============================================ */ /* --- Design Tokens --- */ :root { /* Spacing (8dp scale) */ --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; /* Colors - Neutral */ --text-primary: #1F2937; --text-secondary: #6B7280; --text-tertiary: #9CA3AF; --surface: #FFFFFF; --surface-hover: #F9FAFB; --surface-muted: #F3F4F6; --border: #E5E7EB; --border-light: #F3F4F6; /* Colors - Semantic */ --accent: var(--color-primary, #4F46E5); --success: #059669; --danger: #DC2626; --warning: #D97706; /* Elevation */ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05); /* Radius */ --radius: 12px; --radius-sm: 8px; --radius-pill: 999px; /* Transition */ --ease: 200ms ease-out; } /* --- Base --- */ .el-main { padding: 0 !important; } .dashboard { padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5); max-width: 1400px; margin: 0 auto; } /* --- Card --- */ .card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); } /* ====== Row 1 ====== */ .row-1 { display: flex; gap: var(--sp-5); align-items: stretch; } /* User Card */ .card-user { flex: 1; padding: var(--sp-6); cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: var(--sp-4); transition: box-shadow var(--ease); } .card-user:hover { box-shadow: var(--shadow-md); } .user-header { display: flex; align-items: center; gap: var(--sp-3); } .user-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 18px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .user-greeting { font-size: 16px; color: var(--text-primary); line-height: 1.4; } .user-greeting strong { font-weight: 600; } .user-level { margin-left: var(--sp-1); font-size: 13px; font-weight: 500; } .user-id { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; } .user-contacts { display: flex; gap: var(--sp-5); } .contact-item { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; color: var(--text-secondary); } .contact-item i { font-size: 15px; color: var(--text-tertiary); } /* Stats */ .stats-group { display: flex; gap: var(--sp-4); } .card-stat { width: 148px; padding: var(--sp-5) var(--sp-4); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); cursor: pointer; text-align: center; transition: transform var(--ease), box-shadow var(--ease); } .card-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); } .card-stat:active { transform: scale(0.97); } .card-stat i { font-size: 28px; } .stat-value { font-size: 28px; font-weight: 700; line-height: 1; color: var(--text-primary); font-variant-numeric: tabular-nums; } .stat-label { font-size: 12px; color: var(--text-tertiary); font-weight: 500; } .stat-purple i { color: #7C3AED; } .stat-purple { border-top: 2px solid #7C3AED; } .stat-blue i { color: #2563EB; } .stat-blue { border-top: 2px solid #2563EB; } .stat-amber i { color: #D97706; } .stat-amber { border-top: 2px solid #D97706; } /* ====== Row 2 ====== */ .row-2 { display: flex; gap: var(--sp-5); align-items: flex-start; } /* Balance */ .card-balance { flex: 1; padding: var(--sp-6); } .balance-header { display: flex; align-items: center; justify-content: space-between; } .balance-title { font-size: 14px; color: var(--text-secondary); font-weight: 500; } .balance-btn { font-size: 13px; color: #fff; background: var(--accent); padding: 5px 14px; border-radius: var(--radius-pill); cursor: pointer; font-weight: 500; transition: opacity var(--ease); } .balance-btn:hover { opacity: 0.85; } .balance-amount { font-size: 36px; font-weight: 700; color: var(--text-primary); margin: var(--sp-3) 0 var(--sp-1); line-height: 1.1; font-variant-numeric: tabular-nums; } .balance-amount .currency { font-size: 20px; margin-right: 2px; font-weight: 500; color: var(--text-secondary); } .balance-extra { margin-bottom: var(--sp-2); } .recharge-link { font-size: 13px; color: var(--accent); cursor: pointer; } .balance-footer { display: flex; align-items: center; padding-top: var(--sp-4); margin-top: var(--sp-4); border-top: 1px solid var(--border-light); } .consume-item { flex: 1; display: flex; align-items: center; gap: var(--sp-2); } .consume-label { font-size: 13px; color: var(--text-tertiary); } .consume-value { font-size: 14px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; } .consume-divider { width: 1px; height: 14px; background: var(--border); margin: 0 var(--sp-4); } .trend-up { font-size: 12px; color: var(--success); font-weight: 500; } .trend-down { font-size: 12px; color: var(--danger); font-weight: 500; } /* Credit */ .credit-section { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border-light); display: flex; flex-direction: column; gap: var(--sp-2); } .credit-row { display: flex; align-items: center; justify-content: space-between; } .credit-label { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: var(--sp-2); } .credit-val { font-size: 14px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; } .credit-tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--text-secondary); background: var(--surface-muted); } /* Coin */ .coin-section { margin-top: var(--sp-4); padding: var(--sp-4); background: var(--surface-muted); border-radius: var(--radius-sm); } .coin-header { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text-secondary); } .coin-link { font-size: 13px; color: var(--accent); } .coin-amount { margin-top: var(--sp-2); font-size: 22px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; } /* Voucher */ .voucher-row { margin-top: var(--sp-3); font-size: 12px; color: var(--text-tertiary); } .voucher-link { color: var(--accent); margin-left: 4px; } /* Side Card */ .card-side { width: 400px; flex-shrink: 0; padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5); } /* Certification */ .cert-section { display: flex; flex-direction: column; gap: var(--sp-4); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--border-light); } .cert-item { display: flex; align-items: center; gap: var(--sp-3); } .cert-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--surface-muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .cert-icon i { font-size: 18px; color: var(--text-secondary); } .cert-label { font-size: 12px; color: var(--text-tertiary); } .cert-value { font-size: 14px; color: var(--text-primary); font-weight: 500; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cert-action { font-size: 14px; color: var(--accent); cursor: pointer; font-weight: 500; } /* Referral Open */ .referral-open { display: flex; flex-direction: column; gap: var(--sp-4); } .referral-title { display: flex; align-items: center; justify-content: space-between; } .referral-title > span:first-child { font-size: 15px; font-weight: 600; color: var(--text-primary); } .referral-reward { font-size: 12px; color: #fff; background: var(--danger); padding: 3px 10px; border-radius: var(--radius-pill); cursor: pointer; display: flex; align-items: center; gap: 4px; transition: opacity var(--ease); } .referral-reward:hover { opacity: 0.85; } .referral-reward i { font-size: 13px; } .referral-url { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; } .url-text { flex: 1; padding: var(--sp-2) var(--sp-3); font-size: 13px; color: var(--text-secondary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: var(--surface-muted); line-height: 1.6; } .url-copy { padding: var(--sp-2) var(--sp-4); font-size: 13px; color: var(--accent); font-weight: 500; cursor: pointer; border-left: 1px solid var(--border); display: flex; align-items: center; transition: background var(--ease); } .url-copy:hover { background: var(--surface-hover); } .referral-stats { display: flex; gap: var(--sp-3); } .ref-stat { flex: 1; padding: var(--sp-3) var(--sp-4); background: var(--surface-muted); border-radius: var(--radius-sm); } .ref-amount { font-size: 18px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; } .ref-label { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; } /* Referral Closed */ .referral-closed { text-align: center; padding: var(--sp-6) 0; } .referral-closed > i { font-size: 40px; color: var(--border); } .referral-closed h3 { font-size: 15px; color: var(--text-primary); margin: var(--sp-3) 0 var(--sp-1); font-weight: 500; } .referral-closed p { font-size: 13px; color: var(--text-tertiary); margin-bottom: var(--sp-4); } .referral-open-btn { display: inline-block; padding: 7px 20px; background: var(--accent); color: #fff; font-size: 13px; border-radius: var(--radius-pill); cursor: pointer; font-weight: 500; transition: opacity var(--ease); } .referral-open-btn:hover { opacity: 0.85; } .referral-disabled { font-size: 13px; color: var(--text-tertiary); margin-top: var(--sp-2); } /* ====== Row 3 ====== */ .row-3 { display: flex; gap: var(--sp-5); align-items: flex-start; } /* Products */ .card-products { flex: 1; padding: var(--sp-6); min-width: 0; } .section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0 0 var(--sp-4); } .product-link { color: var(--accent); font-weight: 500; text-decoration: none; } .product-link:hover { text-decoration: underline; } .text-danger { color: var(--danger); } /* Empty */ .empty-state { text-align: center; padding: var(--sp-10) 0; } .empty-state > i { font-size: 48px; color: var(--border); } .empty-state h3 { font-size: 16px; color: var(--text-primary); margin: var(--sp-4) 0 var(--sp-1); font-weight: 500; } .empty-state p { font-size: 13px; color: var(--text-tertiary); margin-bottom: var(--sp-5); } .empty-state .el-button { padding: 8px 24px; font-size: 14px; border: none; background: var(--accent); color: #fff; border-radius: var(--radius-pill); } /* Sidebar */ .card-sidebar { width: 340px; flex-shrink: 0; padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5); } .sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); } .sidebar-header > span:first-child { font-size: 15px; font-weight: 600; color: var(--text-primary); } .sidebar-more { cursor: pointer; font-size: 16px; color: var(--text-tertiary); padding: 2px 6px; border-radius: 4px; transition: background var(--ease); } .sidebar-more:hover { background: var(--surface-muted); } /* Tickets */ .ticket-list { display: flex; flex-direction: column; gap: var(--sp-2); } .ticket-item { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); cursor: pointer; transition: background var(--ease); } .ticket-item:hover { background: var(--surface-hover); } .ticket-status { flex-shrink: 0; font-size: 11px; padding: 2px 8px; border-radius: 4px; color: #fff; font-weight: 500; } .ticket-title { font-size: 13px; color: var(--text-primary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .ticket-dept { font-size: 12px; color: var(--text-tertiary); } /* Notices */ .notice-list { display: flex; flex-direction: column; } .notice-item { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3); border-radius: var(--radius-sm); cursor: pointer; transition: background var(--ease); } .notice-item:hover { background: var(--surface-hover); } .notice-title { font-size: 13px; color: var(--text-primary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .notice-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; } .notice-item > i { font-size: 13px; color: var(--border); flex-shrink: 0; } /* ====== Element UI Overrides ====== */ .card-products .el-table { background: transparent; color: var(--text-primary); font-size: 13px; } .card-products .el-table th { background: var(--surface-muted) !important; color: var(--text-secondary); font-weight: 500; font-size: 12px; border-bottom: none !important; padding: var(--sp-3) var(--sp-4) !important; } .card-products .el-table td { border-bottom: 1px solid var(--border-light) !important; padding: var(--sp-3) var(--sp-4) !important; } .card-products .el-table tr:hover > td { background: var(--surface-hover) !important; } .card-products .el-table::before { display: none; } /* ====== Dialog ====== */ .open-dialog { border-radius: var(--radius); font-size: 14px; } .open-dialog .dialog-footer .btn-ok { padding: 8px 20px; background: var(--accent); border-radius: var(--radius-pill); color: #fff; border: none; } .open-dialog .dialog-footer .btn-no { padding: 8px 20px; border-radius: var(--radius-pill); } /* ====== WeChat ====== */ .wx-code { position: fixed; right: 24px; bottom: 24px; z-index: 100; } .wx-box .tit { text-align: center; font-size: 14px; color: var(--text-primary); margin-bottom: var(--sp-2); } .wx-box .img { display: flex; justify-content: center; } .wx-box .img img { width: 160px; height: 160px; } .wx-img { width: 44px; height: 44px; border-radius: 50%; background: #07C160; cursor: pointer; box-shadow: 0 2px 8px rgba(7, 193, 96, 0.25); } /* ====== 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; } } /* ====== Reduced Motion ====== */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }