/* ================================
 * 用户订单管理页面样式
 * 按开发规则：深绿色主题，企业级标准
 * ================================ */

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 2px solid #2d5a2d;
}

.page-header h2 {
    color: #2d5a2d;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.page-header h2 i {
    margin-right: 0.5rem;
    color: #4a7c59;
}

/* 页面操作区域 */
.page-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* 搜索框 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: #6b8e6b;
    z-index: 1;
}

.search-box input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #d1e7d1;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 300px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #4a7c59;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.search-box input::placeholder {
    color: #9ca3af;
}

/* 操作按钮 */
.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn.primary {
    background: #4a7c59;
    color: white;
}

.action-btn.primary:hover {
    background: #3d6b4a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.action-btn i {
    font-size: 0.9rem;
}

/* 统计卡片 */
.recharge-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.recharge-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.recharge-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recharge-stat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recharge-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4a7c59, #6b8e6b);
    color: white;
    font-size: 1.5rem;
}

.recharge-stat-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d5a2d;
}

.recharge-stat-content p {
    margin: 0;
    color: #6b8e6b;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 表格容器 */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

/* 表格信息 */
.table-info {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
    color: #6b8e6b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 表格样式 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table thead {
    background: #f8fafc;
}

.admin-table th {
    padding: 1rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #2d5a2d;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.admin-table td {
    padding: 1rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

/* 用户邮箱列 */
.user-email {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



/* 充值金额列 */
.recharge-amount {
    font-weight: 600;
    color: #2d5a2d;
}

/* 状态标签 */
.recharge-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.recharge-status.pending {
    background: #fef3c7;
    color: #d97706;
}

.recharge-status.completed {
    background: #d1fae5;
    color: #059669;
}

.recharge-status.failed {
    background: #fee2e2;
    color: #dc2626;
}

.recharge-status.cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

/* 操作按钮 */
.recharge-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.recharge-action-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.recharge-action-btn.view {
    background: #dbeafe;
    color: #1d4ed8;
}

.recharge-action-btn.view:hover {
    background: #bfdbfe;
}

.recharge-action-btn.edit {
    background: #fef3c7;
    color: #d97706;
}

.recharge-action-btn.edit:hover {
    background: #fde68a;
}

.recharge-action-btn.delete {
    background: #fee2e2;
    color: #dc2626;
}

.recharge-action-btn.delete:hover {
    background: #fecaca;
}

.recharge-action-btn.approve {
    background: #d1fae5;
    color: #065f46;
}

.recharge-action-btn.approve:hover {
    background: #a7f3d0;
}

.recharge-action-btn.reject {
    background: #fef3c7;
    color: #92400e;
}

.recharge-action-btn.reject:hover {
    background: #fde68a;
}

.recharge-action-btn i {
    font-size: 0.8rem;
}

/* 加载状态 */
.loading-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b8e6b;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #4a7c59;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

/* 错误状态 */
.error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #dc2626;
}

.error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fca5a5;
}

.retry-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: #b91c1c;
}

/* 分页控件 */
.pagination {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

/* 分页信息 */
.pagination-info {
    display: flex;
    gap: 2rem;
    color: #6b8e6b;
    font-size: 0.9rem;
}

.pagination-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 分页控制按钮 */
.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1e7d1;
    background: white;
    color: #4a7c59;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(.disabled) {
    background: #4a7c59;
    color: white;
    border-color: #4a7c59;
}

.pagination-btn.active {
    background: #4a7c59;
    color: white;
    border-color: #4a7c59;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.prev,
.pagination-btn.next {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: auto;
    padding: 0.5rem 1rem;
}

/* 分页省略号 */
.pagination-ellipsis {
    padding: 0.5rem 0.25rem;
    color: #9ca3af;
    font-weight: 500;
}

/* 分页跳转 */
.pagination-jump {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b8e6b;
    font-size: 0.9rem;
}

.pagination-jump-input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid #d1e7d1;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
}

.pagination-jump-input:focus {
    outline: none;
    border-color: #4a7c59;
}

.pagination-jump-btn {
    padding: 0.5rem 0.75rem;
    background: #4a7c59;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.pagination-jump-btn:hover {
    background: #3d6b4a;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .recharge-stats {
        grid-template-columns: 1fr;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .pagination-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
} 