/* AJAX数据刷新系统样式 */

/* 加载状态样式 */
.ajax-loading {
    position: relative;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

/* 加载动画 */
.loading-spinner {
    display: flex;
    gap: 4px;
}

.spinner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #1677ff;
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-dot:nth-child(2) { animation-delay: -0.16s; }
.spinner-dot:nth-child(3) { animation-delay: 0; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* 理赔列表样式 */
.claim-item {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #e8f4fd;
}

.claim-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.claim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.claim-number {
    font-weight: 600;
    color: #1677ff;
    font-size: 16px;
}

.claim-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-submitted {
    background: #e6f4ff;
    color: #1677ff;
}

.status-reviewing {
    background: #fff7e6;
    color: #fa8c16;
}

.status-approved {
    background: #f6ffed;
    color: #52c41a;
}

.status-rejected {
    background: #fff2f0;
    color: #ff4d4f;
}

.status-paid {
    background: #f0f5ff;
    color: #722ed1;
}

.claim-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.claim-type {
    color: #666;
    font-size: 14px;
}

.claim-amount {
    font-weight: 600;
    color: #262626;
    font-size: 16px;
}

.claim-time {
    color: #999;
    font-size: 12px;
    margin-bottom: 12px;
}

.claim-actions {
    display: flex;
    gap: 8px;
}

.btn-detail {
    background: #1677ff;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-detail:hover {
    background: #0958d9;
}

/* 理赔详情样式 */
.claim-detail-container {
    max-height: 70vh;
    overflow-y: auto;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-header h3 {
    margin: 0;
    font-size: 18px;
    color: #262626;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #262626;
    font-weight: 600;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.detail-item span {
    font-size: 14px;
    color: #262626;
}

/* 文件列表样式 */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}

.file-name {
    font-weight: 500;
    color: #262626;
    flex: 1;
}

.file-size {
    font-size: 12px;
    color: #999;
    margin: 0 12px;
}

.file-time {
    font-size: 12px;
    color: #999;
}

/* 统计数据样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #1677ff;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.stats-update-time {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 8px;
}

/* 通知徽章样式 */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4d4f;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* 用户头像和信息样式 */
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f2f5;
    border: 2px solid #1677ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

/* SVG头像图标样式 */
.avatar-icon {
    width: 80%;
    height: 80%;
}

.avatar-icon circle[fill="#f0f2f5"] {
    fill: #f0f2f5;
}

.avatar-icon circle[fill="#1677ff"],
.avatar-icon path[stroke="#1677ff"] {
    fill: #1677ff;
    stroke: #1677ff;
}

.user-name {
    font-size: 14px;
    color: #262626;
    font-weight: 500;
}

/* 刷新按钮样式 */
.refresh-btn {
    background: #f0f0f0;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.refresh-btn:hover {
    background: #e6f4ff;
    border-color: #1677ff;
    color: #1677ff;
}

.refresh-btn.refreshing {
    pointer-events: none;
    opacity: 0.6;
}

.refresh-icon {
    animation: refresh-spin 1s linear infinite;
}

@keyframes refresh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式适配 */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .claim-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-size,
    .file-time {
        margin: 0;
    }
}

/* 数据更新动画 */
@keyframes data-refresh {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.refreshing-data {
    animation: data-refresh 0.5s ease-in-out;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 14px;
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 12px;
    color: #bbb;
}