/* 记录页面专用样式 - 轻量级版本 */

/* 加载状态和空状态 */
.loading-state, .empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-icon {
    font-size: 72px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-text {
    font-size: 16px;
    color: #999;
    font-weight: 500;
}

/* 记录列表容器 */
#recordsList {
    display: none;
}

.records-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    position: relative;
    z-index: 1;
}

/* 确保记录页面的下拉菜单和用户卡片不被遮挡 */
.records-container .dropdown-menu {
    z-index: 9999 !important;
}

.records-container .user-menu {
    z-index: 99999 !important;
}

/* 防止内容区域遮挡下拉菜单 */
.records-container,
.records-content,
.records-header,
.tab-content {
    position: relative;
    z-index: 1;
}

/* 记录页面头部样式 */
.records-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.header-text {
    flex: 1;
}

.records-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: white;
}

.records-subtitle {
    font-size: 13px;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

/* 记录类型切换标签 */
.records-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    background: white;
    padding: 4px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-btn.active {
    background: linear-gradient(135deg, #5568d3 0%, #6941a0 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.2);
}

.tab-btn i {
    font-size: 16px;
}

.tab-btn.active i {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.2);
}

/* 记录状态筛选 */
.records-toolbar {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.filter-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

/* 记录内容区域 */
.records-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-content {
    display: none;
    padding: 0;
}

.tab-content.active {
    display: block;
}

/* 记录列表 */
.records-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.record-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    max-width: 100%;
    min-height: 56px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.record-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.record-item:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.record-item:hover::before {
    transform: scaleY(1);
}

.record-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.2);
}

.record-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.record-header {
    margin-bottom: 4px;
}

.record-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.record-details {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}

.record-details span {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.record-details span i {
    font-size: 10px;
    color: #9ca3af;
}

.record-time {
    font-size: 12px;
    color: #6b7280;
}

.record-quota {
    font-size: 12px;
    color: #6b7280;
}

.record-status {
    padding: 4px 12px !important;
    border-radius: 16px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12) !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    border: 1px solid transparent !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.record-status i {
    font-size: 8px;
    margin-right: 4px;
    opacity: 0.8;
}

.record-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.record-status:hover::before {
    left: 100%;
}

/* 成功状态 - 现代绿色渐变 */
.record-status.status-completed,
.record-status[class*="status-completed"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border: 1px solid rgba(5, 150, 105, 0.3) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

.record-status.status-completed:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* 进行中状态 - 现代蓝色渐变 */
.record-status.status-processing,
.record-status[class*="status-processing"] {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    border: 1px solid rgba(29, 78, 216, 0.3) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    animation: pulse 2s infinite;
}

.record-status.status-processing:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* 失败状态 - 现代红色渐变 */
.record-status.status-failed,
.record-status[class*="status-failed"] {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border: 1px solid rgba(220, 38, 38, 0.3) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}

.record-status.status-failed:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* 记录操作按钮 */
.record-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    align-self: center;
    flex-wrap: nowrap;
}

.action-btn {
    padding: 4px 12px !important;
    border: none !important;
    border-radius: 16px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

/* 下载按钮 - 现代绿色渐变 */
.action-btn.download,
.action-btn[class*="download"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border: 1px solid rgba(5, 150, 105, 0.3) !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
    font-size: 11px !important;
    padding: 4px 12px !important;
    border-radius: 16px !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    line-height: 1 !important;
}

.action-btn.download:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.action-btn.download i {
    font-size: 12px;
    margin-right: 6px;
}

/* 删除按钮 - 现代灰色渐变 */
.action-btn.delete,
.action-btn[class*="delete"] {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    font-size: 11px !important;
    padding: 4px 12px !important;
    border-radius: 16px !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    line-height: 1 !important;
}

.action-btn.delete:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #dc2626;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.action-btn.delete i {
    font-size: 12px;
    margin-right: 6px;
}

/* 详情按钮 - 次要按钮样式 */
.action-btn:not(.primary) {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-btn:not(.primary):hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #111827;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 10px;
}

/* 分页样式 */
.pagination-container {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #667eea;
    color: #667eea;
}

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

.page-info {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
}

.empty-state p {
    font-size: 14px;
    margin: 0;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .records-container {
        padding: 12px;
    }
    
    .records-header {
        padding: 12px 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .records-tabs {
        flex-direction: column;
        margin-bottom: 12px;
    }
    
    .records-filters {
        justify-content: center;
    }
    
    .record-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 12px;
        min-height: 48px;
    }
    
    .records-list {
        gap: 6px;
    }
    
    .record-info {
        width: 100%;
    }
    
    .record-title {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}