/* static/css/common.css */
:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
}

.result-img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
}

.material-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.material-card.selected {
    border-color: var(--primary-color);
    background: #e8eaf6;
}

.material-card img {
    width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: contain;
    border-radius: 8px;
}

.product-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-item.selected {
    background: #e8eaf6;
    border-left: 3px solid var(--primary-color);
}

.product-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.product-item .info {
    flex: 1;
}

.product-item .title {
    font-size: 14px;
    font-weight: 500;
}

.product-item .code {
    font-size: 11px;
    color: #6c757d;
}

.dual-material .material-section strong {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    padding-left: 8px;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

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

.status-pending { background: #fff3cd; color: #856404; }
.status-processing { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }
.status-failed { background: #f8d7da; color: #721c24; }

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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