/* Product Inventory Management Styles */

/* Inventory Overview */
.inventory-overview {
    margin-bottom: 2rem;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.overview-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.overview-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 50%;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

/* Inventory Sections */
.inventory-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.inventory-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

/* Low Stock Alerts */
.alert-products {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    gap: 1rem;
}

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

.alert-product-info .product-name {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.alert-product-info .product-code {
    font-size: 12px;
    color: #b45309;
}

.alert-stock {
    text-align: center;
    margin: 0 1rem;
}

.stock-numbers {
    font-weight: 700;
    color: #92400e;
    font-size: 1.1rem;
}

.stock-percentage {
    font-size: 12px;
    color: #b45309;
}

.btn-adjust {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-adjust:hover {
    background: #d97706;
}

/* Inventory Table */
.inventory-table-container {
    overflow-x: auto;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.inventory-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-table tbody tr:hover {
    background: #f9fafb;
}

.product-info .product-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.product-info .product-code {
    font-size: 12px;
    color: #6b7280;
}

.stock-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.stock-badge.stock-unlimited {
    background: #dbeafe;
    color: #1d4ed8;
}

.stock-badge.stock-high {
    background: #d1fae5;
    color: #065f46;
}

.stock-badge.stock-medium {
    background: #fef3c7;
    color: #92400e;
}

.stock-badge.stock-low {
    background: #fee2e2;
    color: #991b1b;
}

.stock-badge.stock-out {
    background: #f3f4f6;
    color: #374151;
}

.stock-number {
    font-weight: 600;
    text-align: center;
}

.btn-adjust-small {
    background: #6366f1;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-adjust-small:hover {
    background: #4f46e5;
}

/* Stock Movements Table */
.movements-table-container {
    overflow-x: auto;
}

.movements-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.movements-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.movements-table tbody tr:hover {
    background: #f9fafb;
}

.movement-quantity {
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.movement-quantity.positive {
    background: #d1fae5;
    color: #065f46;
}

.movement-quantity.negative {
    background: #fee2e2;
    color: #991b1b;
}

.movement-type {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.movement-reference {
    color: #6b7280;
    font-size: 13px;
}

/* Stock Adjustment Modal */
.stock-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.stock-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stock-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.stock-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.stock-modal-body {
    padding: 1.5rem;
}

.stock-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.product-display {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    color: #374151;
}

.form-help {
    font-size: 12px;
    color: #6b7280;
    margin-top: 0.5rem;
}

.btn-cancel {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #e5e7eb;
}

.btn-save {
    background: #16a34a;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save:hover {
    background: #15803d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .overview-cards {
        grid-template-columns: 1fr;
    }
    
    .alert-product {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .alert-stock {
        margin: 0.5rem 0;
    }
    
    .inventory-table,
    .movements-table {
        font-size: 12px;
    }
    
    .inventory-table th,
    .inventory-table td,
    .movements-table th,
    .movements-table td {
        padding: 8px;
    }
    
    .stock-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .stock-modal-header,
    .stock-modal-body,
    .stock-modal-footer {
        padding: 1rem;
    }
}
