.materials-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

.materials-table td {
  padding: 6px 8px;
}

.materials-table th {
  background-color: #1976d2;
  color: white;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 2px solid #0d47a1;
}

.materials-table input {
  width: 100%;
  padding: 5px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.modal-tools {
  position: relative;
  width: 100%;
  height: 40px;
  margin-bottom: 12px;
}

.modal-tools button {
  width: 30px;
  height: 30px;
  font-size: 20px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
}

#addMaterialBtn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1976d2; /* Blue */
  color: white;
}

#addMaterialBtn:disabled {
  background-color: #90caf9;
  cursor: not-allowed;
}

#materialsModal .modal-content {
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

#materialsModal table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 20px 0;
  font-size: 14px;
  table-layout: fixed; /* important for keeping widths consistent */
}

#materialsModal th,
#materialsModal td {
  border: 1px solid #ccc;
  padding: 6px;
  text-align: left;
  vertical-align: middle;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

#materialsModal input[type="text"],
#materialsModal input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#removeMaterialBtn {
  position: absolute;
  right: 0;
  background-color: #e53935;
  color: white;
}

#removeMaterialBtn:disabled {
  background-color: #ef9a9a;
  cursor: not-allowed;
}
