/* BBO - Backend Back Office Styles */

.bbo-header {
    text-align: center;
    margin-bottom: 2rem;
}

.bbo-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.bbo-subtitle {
    font-size: 1.2rem;
    color: var(--light-gray);
    font-weight: 400;
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f8fffe;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(34, 197, 94, 0.05);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(34, 197, 94, 0.1);
    transform: scale(1.02);
}

.upload-content {
    color: var(--dark-gray);
}

.upload-content h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.upload-progress {
    margin-top: 1rem;
}

/* OCR Results */
.ocr-text {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.products-list {
    max-height: 300px;
    overflow-y: auto;
}

.product-item {
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.product-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-name {
    font-weight: 600;
    color: var(--dark-gray);
}

.product-price {
    color: var(--primary-color);
    font-weight: 700;
}

.product-confidence {
    font-size: 0.8rem;
    color: var(--light-gray);
}

/* Products Editor */
.products-editor {
    max-height: 500px;
    overflow-y: auto;
}

.product-editor-item {
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.product-editor-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-editor-title {
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0;
}

.product-editor-actions {
    display: flex;
    gap: 0.5rem;
}

.product-editor-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.25rem;
    display: block;
}

.form-control-sm {
    font-size: 0.9rem;
    padding: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

/* Statistics Cards */
.stat-card {
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.stat-icon {
    margin-bottom: 1rem;
}

.stat-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.stat-content p {
    color: var(--light-gray);
    font-weight: 500;
    margin: 0;
}

/* PDF Preview */
.pdf-preview {
    margin-top: 1rem;
}

.pdf-pages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.pdf-page {
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.pdf-page:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pdf-page img {
    width: 100%;
    height: auto;
    display: block;
}

.pdf-page-info {
    padding: 0.5rem;
    background: #f8f9fa;
    font-size: 0.8rem;
    color: var(--light-gray);
    text-align: center;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .product-editor-form {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .pdf-pages {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .bbo-title {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
}
