/* Inventory Management Styles */
.inventory-section {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
    margin: 2rem 0;
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.inventory-header h2 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inventory-actions {
    display: flex;
    gap: 1rem;
}

.inventory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid #28a745;
}

.stat-card.alert {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.stat-card i {
    font-size: 2rem;
    color: #28a745;
}

.stat-card.alert i {
    color: #dc3545;
}

.stat-card h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.stat-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.inventory-table-container {
    overflow-x: auto;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.inventory-table th,
.inventory-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.inventory-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.inventory-row.low {
    background-color: #fff3cd;
}

.inventory-row.out {
    background-color: #f8d7da;
}

.stock-input {
    width: 80px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

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

.status-badge.good {
    background: #d4edda;
    color: #155724;
}

.status-badge.low {
    background: #fff3cd;
    color: #856404;
}

.status-badge.out {
    background: #f8d7da;
    color: #721c24;
}

/* Bulk Upload Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 1.5rem;
}

.upload-instructions {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.upload-instructions h4 {
    margin-top: 0;
    color: #333;
}

.upload-instructions code {
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

.upload-instructions a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.upload-dropzone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: #007bff;
    background: #f8f9ff;
}

.upload-dropzone i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.upload-dropzone:hover i,
.upload-dropzone.dragover i {
    color: #007bff;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.3s ease;
}

/* Dark Mode Styles */
[data-theme="dark"] .inventory-section {
    background: var(--card-bg);
    color: var(--text-primary);
}

[data-theme="dark"] .inventory-header h2 {
    color: var(--text-primary);
}

[data-theme="dark"] .stat-card {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .inventory-table th {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .inventory-table td {
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-content {
    background: var(--card-bg);
    color: var(--text-primary);
}

[data-theme="dark"] .upload-instructions {
    background: var(--bg-secondary);
}

[data-theme="dark"] .upload-dropzone {
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .inventory-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .inventory-actions {
        justify-content: center;
    }
    
    .inventory-stats {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .upload-dropzone {
        padding: 2rem 1rem;
    }
}