/* ==============================================
   会员中心首页专用样式
   会员中心首页布局优化
   ============================================== */

/* 卡片高度设置 */
.xyx-account-card,
.xyx-finance-card,
.xyx-consume-card {
    min-height: 360px;
    height: auto;
}

.xyx-product-card,
.xyx-todo-card,
.xyx-notice-card {
    min-height: 360px;
    height: auto;
}

/* 卡片体内距调整 */
.xyx-account-card .card-body,
.xyx-finance-card .card-body,
.xyx-consume-card .card-body {
    padding: 20px;
}

.xyx-product-card .card-body,
.xyx-todo-card .card-body,
.xyx-notice-card .card-body {
    padding: 18px 20px;
}

/* ==============================================
   账户概览卡片样式
   ============================================== */

.xyx-member-profile {
    display: flex;
    gap: 15px;
    padding: 0 0 18px 0;
    border-bottom: 1px solid var(--xyx-glass-border);
    margin-bottom: 18px;
}

.xyx-avatar-wrapper {
    flex-shrink: 0;
    width: 80px;
}

.xyx-avatar-wrapper .user_avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--xyx-glass-border);
    object-fit: cover;
    transition: var(--xyx-glass-transition);
}

.xyx-avatar-wrapper .user_avatar:hover {
    border-color: var(--xyx-accent-color);
    box-shadow: 0 4px 12px var(--xyx-accent-color-alpha-30, rgba(0, 113, 227, 0.3), 0.3);
    transform: scale(1.05);
}

.xyx-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.xyx-welcome-line {
    font-size: 14px;
    color: var(--xyx-text-color-light);
    line-height: 1.6;
}

.xyx-welcome-line .user_name {
    font-size: 16px;
    font-weight: 600;
    color: var(--xyx-text-color);
    margin: 0 4px;
}

.xyx-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    flex-wrap: wrap;
}

.xyx-user-row .text-muted {
    color: var(--xyx-text-color-light);
    flex: 0 0 auto;
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xyx-username-display {
    font-size: 14px;
    font-weight: 600;
    color: var(--xyx-text-color);
}

/* 会员组显示 */
.xyx-group-badge {
    display: inline-block;
    padding: 2px 10px;
    /* 默认渐变背景，JS会动态覆盖 */
    background: linear-gradient(135deg, var(--xyx-accent-color), var(--xyx-primary-color));
    color: var(--xyx-text-color-inverse, #ffffff);
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    /* 默认阴影，JS会动态覆盖 */
    box-shadow: 0 2px 8px var(--xyx-accent-color-alpha-30, rgba(0, 113, 227, 0.3), 0.3);
    transition: all 0.3s ease;
    vertical-align: middle;
    line-height: 1.4;
    cursor: default;
}

.xyx-group-badge:hover {
    transform: translateY(-1px);
    /* 悬停时增强阴影，但不改变颜色 */
    filter: brightness(1.05);
}

/* 认证状态区域 */
.xyx-auth-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 0;
    border-bottom: 1px solid var(--xyx-glass-border);
    margin-bottom: 18px;
}

.xyx-status-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--xyx-glass-radius-sm);
    font-size: 13px;
    text-decoration: none;
    transition: var(--xyx-glass-transition);
    background: var(--xyx-glass-bg-light);
    border: 1px solid var(--xyx-glass-border);
}

.xyx-status-item.verified {
    color: var(--xyx-success-color);
    border-color: var(--xyx-success-color);
    background: var(--xyx-success-bg);
}

.xyx-status-item.unverified {
    color: var(--xyx-text-color-muted);
}

.xyx-status-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--xyx-shadow-md);
}

.xyx-status-item i {
    font-size: 16px;
}

/* 登录信息 */
.xyx-login-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid var(--xyx-glass-border);
    margin-top: 18px;
}

.xyx-login-info p {
    font-size: 12px;
    color: var(--xyx-text-color-light);
    margin: 0;
    flex: 0 0 49%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xyx-login-info p:first-child {
    text-align: left;
}

.xyx-login-info p:last-child {
    text-align: right;
}

.xyx-login-info a {
    color: var(--xyx-accent-color);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: var(--xyx-glass-transition);
}

.xyx-login-info a:hover {
    color: var(--xyx-primary-color);
    border-bottom-color: var(--xyx-primary-color);
}

/* ==============================================
   财务信息卡片样式
   ============================================== */

/* 财务统计卡片 */
.xyx-finance-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

/* 复用消费趋势的统计卡片样式 */
.xyx-finance-stats .xyx-stat-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--xyx-glass-bg-light);
    border-radius: var(--xyx-glass-radius-sm);
    border: 1px solid var(--xyx-glass-border);
    transition: var(--xyx-glass-transition);
}

.xyx-finance-stats .xyx-stat-card:hover {
    background: var(--xyx-glass-bg-hover);
    transform: translateY(-2px);
    /* 移除阴影 */
}

.xyx-finance-stats .xyx-stat-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--xyx-accent-color), var(--xyx-primary-color));
    border-radius: 10px;
    flex-shrink: 0;
}

.xyx-finance-stats .xyx-stat-icon i {
    font-size: 22px;
    color: var(--xyx-text-color-inverse, #ffffff);
}

/* icon-cny图标样式 */
.xyx-finance-stats .xyx-stat-icon i.icon-cny,
.xyx-consume-stats .xyx-stat-icon i.icon-cny {
    font-size: 22px;
    color: var(--xyx-text-color-inverse, #ffffff);
}

.xyx-finance-stats .xyx-stat-info {
    flex: 1;
    min-width: 0;
}

.xyx-finance-stats .xyx-stat-label {
    font-size: 12px;
    color: var(--xyx-text-color-light);
    margin-bottom: 4px;
}

.xyx-finance-stats .xyx-stat-value {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

/* 财务操作按钮 */
.xyx-finance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.xyx-finance-actions .button {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 10px 15px;
    font-size: 14px;
}

/* 财务快捷链接 */
.xyx-finance-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--xyx-glass-border);
}

.xyx-finance-links a {
    font-size: 13px;
    color: var(--xyx-text-color);
    text-decoration: none;
    transition: var(--xyx-glass-transition);
    padding: 4px 0;
    border-bottom: 1px solid transparent;
}

.xyx-finance-links a:hover {
    color: var(--xyx-accent-color);
    border-bottom-color: var(--xyx-accent-color);
}

/* ==============================================
   消费趋势卡片样式
   ============================================== */

/* 消费统计卡片 */
.xyx-consume-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.xyx-stat-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--xyx-glass-bg-light);
    border-radius: var(--xyx-glass-radius-sm);
    border: 1px solid var(--xyx-glass-border);
    transition: var(--xyx-glass-transition);
}

.xyx-stat-card:hover {
    background: var(--xyx-glass-bg-hover);
    transform: translateY(-2px);
    /* 移除阴影 */
}

.xyx-stat-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--xyx-accent-color), var(--xyx-primary-color));
    border-radius: 10px;
    flex-shrink: 0;
}

.xyx-stat-icon i {
    font-size: 22px;
    color: var(--xyx-text-color-inverse, #ffffff);
}

.xyx-stat-info {
    flex: 1;
    min-width: 0;
}

.xyx-stat-label {
    font-size: 12px;
    color: var(--xyx-text-color-light);
    margin-bottom: 4px;
}

.xyx-stat-value {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

/* 图表容器 */
.xyx-chart-wrapper {
    margin-top: 18px;
}

.xyx-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--xyx-glass-border);
}

.xyx-chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--xyx-text-color);
}

.xyx-chart-link {
    font-size: 12px;
    color: var(--xyx-accent-color);
    text-decoration: none;
    transition: var(--xyx-glass-transition);
}

.xyx-chart-link:hover {
    color: var(--xyx-primary-color);
    transform: translateX(3px);
}

.xyx-chart-container {
    background: var(--xyx-glass-bg-light);
    border-radius: var(--xyx-glass-radius-sm);
    padding: 12px;
    margin-top: 0;
}

/* ==============================================
   产品列表样式
   ============================================== */

.xyx-product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.xyx-product-list .list-group-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 15px;
    margin-bottom: 0;
    border-radius: var(--xyx-glass-radius-sm);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    text-align: center;
    background: var(--xyx-glass-bg-light);
    border: 1px solid var(--xyx-glass-border);
    min-height: 100px;
    position: relative;
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.xyx-product-list .list-group-item i {
    font-size: 28px;
    color: var(--xyx-accent-color);
    width: auto;
    text-align: center;
}

.xyx-product-list .list-group-item .pends {
    flex: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--xyx-text-color);
    line-height: 1.4;
}

.xyx-product-list .list-group-item .text-primary {
    font-size: 12px;
    margin-top: -4px;
}

.xyx-product-list .list-group-item:hover {
    background: var(--xyx-glass-bg-hover);
    transform: translate3d(0, -1px, 0);  /* 使用3D变换，减少移动距离 */
    box-shadow: var(--xyx-shadow-sm);
    z-index: 1;  /* 确保悬停元素在上层 */
}

/* ==============================================
   二维码区域样式
   ============================================== */

.xyx-qrcode-desc {
    padding: 10px 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--xyx-text-color-light);
}

/* ==============================================
   卡片最小高度统一
   ============================================== */

.panel-card[style*="min-height"] {
    display: flex;
    flex-direction: column;
}

.panel-card[style*="min-height"] .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==============================================
   响应式适配
   ============================================== */

@media (max-width: 991px) {
    /* 响应式卡片高度 */
    .xyx-account-card,
    .xyx-finance-card,
    .xyx-consume-card {
        min-height: auto;
    }
    
    .xyx-product-card,
    .xyx-todo-card,
    .xyx-notice-card {
        min-height: 200px;
    }
    
    .xyx-member-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .xyx-avatar-container .user_avatar {
        width: 80px;
        height: 80px;
    }
    
    .xyx-user-details {
        align-items: center;
    }
    
    .xyx-auth-status {
        justify-content: center;
        padding: 15px 0;
        margin-bottom: 15px;
    }
    
    .xyx-finance-actions {
        flex-direction: column;
        margin: 18px 0;
    }
    
    .xyx-finance-actions .button {
        width: 100%;
    }
    
    .xyx-finance-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .xyx-avatar-container .user_avatar {
        width: 60px;
        height: 60px;
    }
    
    .xyx-welcome-text {
        font-size: 14px;
    }
    
    .xyx-welcome-text .user_name {
        font-size: 16px;
    }
    
    .xyx-balance-amount {
        font-size: 24px;
    }
    
    .xyx-stat-value {
        font-size: 16px;
    }
    
    .xyx-stat-card {
        padding: 12px;
    }
    
    .xyx-stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .xyx-stat-icon i {
        font-size: 20px;
    }
    
    .xyx-finance-stats .xyx-stat-card {
        padding: 12px;
    }
    
    .xyx-finance-stats .xyx-stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .xyx-finance-stats .xyx-stat-icon i {
        font-size: 20px;
    }
    
    .xyx-status-item {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .xyx-chart-container {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .xyx-consume-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .xyx-stat-card {
        width: 100%;
    }
    
    .xyx-finance-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .xyx-finance-stats .xyx-stat-card {
        width: 100%;
    }
    
    .xyx-member-profile {
        padding-bottom: 10px;
    }
    
    .xyx-auth-status {
        gap: 8px;
    }
    
    .xyx-status-item {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
        min-width: 120px;
    }
    
    .xyx-finance-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .xyx-finance-links a {
        text-align: center;
    }
}

/* ==============================================
   滚动条美化
   ============================================== */

.xyx-product-list::-webkit-scrollbar {
    width: 6px;
}

.xyx-product-list::-webkit-scrollbar-track {
    background: var(--xyx-glass-bg-light);
    border-radius: 3px;
}

.xyx-product-list::-webkit-scrollbar-thumb {
    background: var(--xyx-accent-color);
    border-radius: 3px;
}

.xyx-product-list::-webkit-scrollbar-thumb:hover {
    background: var(--xyx-accent-color-hover);
}
