/* ========================================
   账户中心 - 全新现代化设计
   ======================================== */

/* ========== 整体布局 ========== */
#page-cost-center {
    background: #f8f9fa !important;
    padding: 0 !important;
    min-height: calc(100vh - 45px) !important;
}

/* ========== 顶部操作栏重新设计 ========== */
#page-cost-center .cost-top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 32px 40px !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* 顶部装饰背景 */
#page-cost-center .cost-top-bar::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    right: -20% !important;
    width: 400px !important;
    height: 400px !important;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%) !important;
    border-radius: 50% !important;
}

#page-cost-center .cost-actions {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 24px !important;
    position: relative !important;
    z-index: 1 !important;
}

/* 在线充值按钮重新设计 */
#page-cost-center #rechargeBtn {
    background: white !important;
    color: #667eea !important;
    border: none !important;
    padding: 14px 32px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#page-cost-center #rechargeBtn::before {
    content: '💳' !important;
    font-size: 18px !important;
}

#page-cost-center #rechargeBtn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4) !important;
    background: #f8f9fa !important;
}

/* 余额显示重新设计 */
#page-cost-center .balance-display {
    display: flex !important;
    align-items: baseline !important;
    gap: 12px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    padding: 16px 28px !important;
    border-radius: 16px !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

#page-cost-center .balance-label {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
}

#page-cost-center .balance-amount {
    font-size: 18px !important;
    color: white !important;
    font-weight: 600 !important;
}

#page-cost-center .balance-number {
    font-size: 22px !important;
    color: white !important;
    font-weight: 700 !important;
    font-family: 'Courier New', monospace !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* ========== 套餐信息卡片 ========== */
#page-cost-center .package-info-section {
    background: white !important;
    margin: 24px 40px !important;
    border-radius: 16px !important;
    padding: 28px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

#page-cost-center .section-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

#page-cost-center .section-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

#page-cost-center .section-title::before {
    content: '' !important;
    width: 4px !important;
    height: 20px !important;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 2px !important;
}

#page-cost-center .view-details-btn {
    background: transparent !important;
    border: 1.5px solid #667eea !important;
    color: #667eea !important;
    padding: 8px 20px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#page-cost-center .view-details-btn:hover {
    background: #667eea !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

/* 套餐卡片网格 */
#page-cost-center .package-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

#page-cost-center .package-card-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 20px !important;
    transition: all 0.3s ease !important;
}

#page-cost-center .package-card-item:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15) !important;
    border-color: #667eea !important;
}

#page-cost-center .package-name {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-bottom: 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#page-cost-center .package-name::before {
    content: '📦' !important;
    font-size: 18px !important;
}

#page-cost-center .package-stats {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

#page-cost-center .package-stat-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 13px !important;
}

#page-cost-center .package-stat-label {
    color: #6b7280 !important;
    font-weight: 500 !important;
}

#page-cost-center .package-stat-value {
    color: #667eea !important;
    font-weight: 700 !important;
    font-size: 16px !important;
}

#page-cost-center .package-expire-date {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px dashed #e5e7eb !important;
    font-size: 12px !important;
    color: #f59e0b !important;
    font-weight: 600 !important;
    text-align: center !important;
}

/* ========== 交易记录表格重新设计 ========== */
#page-cost-center .transaction-section {
    background: white !important;
    margin: 24px 40px 40px 40px !important;
    border-radius: 16px !important;
    padding: 28px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

#page-cost-center .transaction-table-wrapper {
    overflow-x: auto !important;
    margin-top: 20px !important;
}

#page-cost-center .transaction-table {
    width: 100% !important;
    min-width: 1200px !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    table-layout: auto !important;
}

#page-cost-center .transaction-table thead th {
    background: #f8f9fa !important;
    color: #4b5563 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 14px 16px !important;
    border: none !important;
    white-space: nowrap !important;
}

/* 设置各列宽度 */
#page-cost-center .transaction-table thead th:nth-child(1) { width: 140px !important; } /* 时间 */
#page-cost-center .transaction-table thead th:nth-child(2) { width: 100px !important; } /* 交易金额 */
#page-cost-center .transaction-table thead th:nth-child(3) { width: 100px !important; } /* 账户余额 */
#page-cost-center .transaction-table thead th:nth-child(4) { width: 100px !important; } /* 支付方式 */
#page-cost-center .transaction-table thead th:nth-child(5) { width: 80px !important; } /* 订单类型 */
#page-cost-center .transaction-table thead th:nth-child(6) { width: 180px !important; } /* 订单号 */
#page-cost-center .transaction-table thead th:nth-child(7) { width: auto !important; } /* 交易详情 */

#page-cost-center .transaction-table thead th:first-child {
    border-radius: 8px 0 0 8px !important;
}

#page-cost-center .transaction-table thead th:last-child {
    border-radius: 0 8px 8px 0 !important;
}

#page-cost-center .transaction-table tbody tr {
    background: white !important;
}

#page-cost-center .transaction-table tbody td {
    padding: 14px 12px !important;
    font-size: 14px !important;
    border-top: 1px solid #f0f0f0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    background: white !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 300px !important;
}

/* 订单号列 - 可以换行 */
#page-cost-center .transaction-table tbody td:nth-child(6) {
    white-space: normal !important;
    word-break: break-all !important;
    max-width: 180px !important;
}

/* 交易详情列 - 可以换行 */
#page-cost-center .transaction-table tbody td:nth-child(7) {
    white-space: normal !important;
    word-break: break-word !important;
    max-width: none !important;
}

#page-cost-center .transaction-table tbody td:first-child {
    border-left: 1px solid #f0f0f0 !important;
    border-radius: 8px 0 0 8px !important;
}

#page-cost-center .transaction-table tbody td:last-child {
    border-right: 1px solid #f0f0f0 !important;
    border-radius: 0 8px 8px 0 !important;
}

/* 交易金额样式 */
#page-cost-center .transaction-table .amount-positive,
#page-cost-center .amount-positive {
    color: #10b981 !important;
    font-weight: 700 !important;
}

#page-cost-center .transaction-table .amount-negative,
#page-cost-center .amount-negative {
    color: #ef4444 !important;
    font-weight: 700 !important;
}

#page-cost-center .transaction-table .amount-zero,
#page-cost-center .amount-zero {
    color: #9ca3af !important;
    font-weight: 600 !important;
}

/* 交易类型标签 */
#page-cost-center .transaction-type-badge {
    display: inline-block !important;
    padding: 4px 12px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

#page-cost-center .transaction-type-recharge {
    background: #dbeafe !important;
    color: #1e40af !important;
}

#page-cost-center .transaction-type-package {
    background: #fef3c7 !important;
    color: #92400e !important;
}

/* ========== 分页重新设计 ========== */
#page-cost-center .pagination-wrapper {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 24px !important;
    padding-top: 20px !important;
    border-top: 1px solid #e5e7eb !important;
}

#page-cost-center .pagination-info {
    font-size: 13px !important;
    color: #6b7280 !important;
}

#page-cost-center .pagination-controls {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#page-cost-center .pagination-btn {
    padding: 8px 16px !important;
    border: 1px solid #e5e7eb !important;
    background: white !important;
    color: #4b5563 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#page-cost-center .pagination-btn:hover:not(:disabled) {
    border-color: #667eea !important;
    color: #667eea !important;
    background: #f3f4f6 !important;
}

#page-cost-center .pagination-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

#page-cost-center .pagination-btn.active {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

#page-cost-center .page-size-select {
    padding: 8px 12px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    color: #4b5563 !important;
    background: white !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#page-cost-center .page-size-select:hover {
    border-color: #667eea !important;
}

#page-cost-center .page-size-select:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* ========== 空状态 ========== */
#page-cost-center .empty-state {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 60px 20px !important;
    color: #9ca3af !important;
}

#page-cost-center .empty-state-icon {
    font-size: 64px !important;
    margin-bottom: 16px !important;
    opacity: 0.5 !important;
}

#page-cost-center .empty-state-text {
    font-size: 15px !important;
    color: #6b7280 !important;
}

/* ========== 响应式 ========== */
@media (max-width: 1400px) {
    #page-cost-center .package-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 1024px) {
    #page-cost-center .package-cards-grid {
        grid-template-columns: 1fr !important;
    }
    
    #page-cost-center .cost-top-bar {
        padding: 24px 20px !important;
    }
    
    #page-cost-center .package-info-section,
    #page-cost-center .transaction-section {
        margin: 16px 20px !important;
        padding: 20px !important;
    }
}

