:root {
    --bg: #f6f8fb;
    --card: #ffffff;
    --muted: #8b95a6;
    --accent: #4f46e5;
    --success: #06b6a4;
    --danger: #ef4444;
    --shadow: 0 6px 18px rgba(37, 51, 75, 0.08);
    --radius: 12px;
    --gap: 18px;
}

.wrap {
    margin: 0 auto;
}


.title {
    font-size: 20px;
    font-weight: 600;
}

.sub {
    color: var(--muted);
    font-size: 13px;
}

/* 卡片网格 */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
}

@media (max-width:820px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.pvuv-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.pvuv-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(37, 51, 75, 0.12);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.card-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.02));
}

/* 卡片色彩 */
.i-group {
    background: linear-gradient(135deg, #8b5cf6, #4f46e5);
}

.i-service {
    background: linear-gradient(135deg, #06b6a4, #059669);
}

.i-channel {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.i-short {
    background: linear-gradient(135deg, #ef4444, #fb7185);
}

.name-text {
    font-weight: 600;
    font-size: 15px;
}

.name-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.metrics {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.metric {
    background: #ffffff;
    border: 2px solid rgba(79, 70, 229, 0.08);
    padding: 16px 20px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* 数字样式 */
.m-label {
    font-size: 13px;
    color: #6b7280;
}

.m-value {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.5px;
}

/* 百分比样式 */
.m-sub {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    gap: 8px;
    align-items: center;
}

.delta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
    transform: scale(1);
}

.up {
    background: var(--success);
}

.down {
    background: var(--danger);
}

.flat {
    background: #eee;
    color: #999;
}

.foot {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.small-icon {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
    margin-right: 6px;
}

/* 弹跳动画 */
@keyframes pop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

.m-value,
.delta {
    animation: pop 0.5s ease-out;
}

/* 延迟依次弹出 */
#card-group .metric:nth-child(1) .m-value,
#card-group .metric:nth-child(1) .delta {
    animation-delay: 0.1s;
}

#card-group .metric:nth-child(2) .m-value,
#card-group .metric:nth-child(2) .delta {
    animation-delay: 0.2s;
}

#card-service .metric:nth-child(1) .m-value,
#card-service .metric:nth-child(1) .delta {
    animation-delay: 0.3s;
}

#card-service .metric:nth-child(2) .m-value,
#card-service .metric:nth-child(2) .delta {
    animation-delay: 0.4s;
}

#card-channel .metric:nth-child(1) .m-value,
#card-channel .metric:nth-child(1) .delta {
    animation-delay: 0.5s;
}

#card-channel .metric:nth-child(2) .m-value,
#card-channel .metric:nth-child(2) .delta {
    animation-delay: 0.6s;
}

#card-short .metric:nth-child(1) .m-value,
#card-short .metric:nth-child(1) .delta {
    animation-delay: 0.7s;
}

#card-short .metric:nth-child(2) .m-value,
#card-short .metric:nth-child(2) .delta {
    animation-delay: 0.8s;
}

.chart-container {
    width: 100%;
    height: 420px;
    position: relative;
    margin-top: 36px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(37, 51, 75, 0.08);
    width: 100%;
}

/* 表格容器卡片风格 */
.table-container {
    margin-top: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(37, 51, 75, 0.08);
    overflow-x: auto;
}

/* 表格样式 */
.pv-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    font-size: 14px;
}

.pv-table th,
.pv-table td {
    padding: 12px 16px;
    text-align: center;
}

.pv-table td {
    border-bottom: 1px solid #eee;
}

.pv-table th {
    background: rgb(78 109 227);
    color: white;
    font-weight: 600;
}

.pv-table tbody tr {
    background: #fbfdff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-bottom: 1px solid #e5e7eb;
}

.pv-table tbody tr:last-child {
    border-bottom: none;
}

.pv-table tbody tr:hover {
    background: #f8f8f8;
}

/* 筛选按钮和自定义样式 */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    margin-top: 30px;
}

button.filter-btn {
    width: 100px;
    background: rgb(78 109 227);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    padding: 6px 10px;
    cursor: pointer;
    transition: 0.2s;
}

button.filter-btn:hover {
    background: rgb(32 66 197);
}

button.filter-btn.active {
    background: rgb(32 66 197);
}

.custom-range {
    display: flex;
}
.custom-range input[type="date"] {
    height: 33px;
    margin-bottom: 0;
    border-radius: 8px;
    border: 1px solid rgb(78 109 227);
    font-size: 15px;
    padding: 15px;
}

.custom-range .range-to {
    width: 30px;
    height: 33px;
    line-height: 38px;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.custom-range .applyRange {
    height: 33px;
    border-radius: 8px;
    font-size: 15px;
    background: rgb(78 109 227);
    padding: 0 15px;
    border: none;
    color: #fff;
    margin-left: 15px;
}

.chart-container2 {
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(37, 51, 75, 0.08);
    width: 100%;
    height: 400px;
}

/* 分页容器 */
.pagination {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}

/* 普通按钮 */
.page-btn {
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 14px;
    border: none;
    background: rgb(78 109 227);
    color: white;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

/* 悬停效果 */
.page-btn:hover:not(:disabled) {
    background: rgb(32 66 197);
}

/* 禁用状态 */
.page-btn:disabled {
    background: #ccc;      /* 灰色背景 */
    color: #666;           /* 文字浅灰 */
    cursor: not-allowed;   /* 禁止符号 */
    opacity: 0.7;          /* 半透明 */
}


.data-pannel-title {
    font-size: 15px;
    color: #666;
}

/* 用户信息卡片样式 */
.user-info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 20px;
    width: calc(100% - 60px);
}

@media (max-width: 1200px) {
    .user-info-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .user-info-cards {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(37, 51, 75, 0.12);
}

.info-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.05));
    border-radius: 12px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.info-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.3px;
}

/* 详细类型信息样式 */
.type-details-container {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    width: calc(100% - 60px);
}

.type-details-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.type-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

@media (max-width: 768px) {
    .type-details-grid {
        grid-template-columns: 1fr;
    }
}

.type-detail-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.type-detail-item:hover {
    background: #f0f4ff;
    border-color: rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.type-detail-header {
    margin-bottom: 12px;
}

.type-detail-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.type-detail-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.type-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.type-detail-label {
    color: #6b7280;
    font-weight: 500;
}

.type-detail-value {
    color: #111827;
    font-weight: 600;
    font-size: 15px;
}

/* 会员套餐按钮样式 */
.info-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-open-vip,
.btn-redeem-vip {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-open-vip {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
}

.btn-open-vip:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.btn-redeem-vip {
    background: linear-gradient(135deg, #059669, #06b6a4);
    color: white;
}

.btn-redeem-vip:hover {
    background: linear-gradient(135deg, #047857, #059669);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

/* 购买按钮样式 */
.btn-buy-create,
.btn-buy-pv {
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-buy-create {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.btn-buy-create:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.btn-buy-pv {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-buy-pv:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

/* 数量调整按钮样式 */
.btn-quantity {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-quantity:hover {
    background: #f5f5f5;
    border-color: #4f46e5;
    color: #4f46e5;
}

.btn-quantity:active {
    transform: scale(0.95);
}