/**
 * 求片列表组件样式
 * 现代化、响应式设计
 */

/* 求片列表容器 */
.requests-sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 24px;
    height: calc(100vh - 120px);
    overflow: hidden;
    position: sticky;
    top: 60px;
}

.requests-sidebar h3 {
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 搜索栏 */
.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    background: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #90a4ae;
    font-size: 16px;
}

/* 统计信息 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.stat-card.success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.stat-card.info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 4px;
}

/* 求片列表 */
.requests-list {
    height: calc(100% - 200px);
    overflow-y: auto;
    scroll-behavior: smooth;
}

.requests-list::-webkit-scrollbar {
    width: 6px;
}

.requests-list::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.requests-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.requests-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 求片项目 */
.request-item {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.request-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #2196f3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.request-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #2196f3;
}

.request-item:hover::before {
    opacity: 1;
}

.request-item.status-pending::before {
    background: #ff9800;
}

.request-item.status-processing::before {
    background: #2196f3;
}

.request-item.status-completed::before {
    background: #4caf50;
}

.request-item.status-failed::before {
    background: #f44336;
}

/* 求片内容 */
.request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.request-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
    flex: 1;
    margin-right: 8px;
}

.request-type {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.request-type.fix {
    background: #fff3e0;
    color: #f57c00;
}

.request-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.75rem;
    color: #666;
}

.request-time {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-direction: column;
    align-items: flex-start;
}

.request-completed-time {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.7rem;
    color: #4caf50;
    font-weight: 500;
}

.request-status {
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
}

.request-status.pending {
    background: #fff3e0;
    color: #f57c00;
}

.request-status.processing {
    background: #e3f2fd;
    color: #1976d2;
}

.request-status.completed {
    background: #e8f5e8;
    color: #2e7d32;
}

.request-status.failed {
    background: #ffebee;
    color: #c62828;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 16px;
    display: block;
}

.empty-state h4 {
    color: #999;
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-state p {
    color: #bbb;
    font-size: 0.9rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .requests-sidebar {
        margin-top: 24px;
        height: auto;
        max-height: 500px;
        position: relative;
        top: auto;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .stat-card {
        padding: 12px 8px;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .request-item {
        padding: 12px;
    }

    .request-title {
        font-size: 0.9rem;
    }

    .requests-list {
        height: 300px;
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 刷新按钮 */
.refresh-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #f5f5f5;
    color: #2196f3;
    transform: rotate(180deg);
}

.refresh-btn.spinning {
    animation: spin 1s linear infinite;
}
